Fsharp: Suggestion: Allow Copy & Paste in Tooltips

Created on 1 May 2017  路  10Comments  路  Source: dotnet/fsharp

Maybe it makes sense, maybe not. I'd like to copy&paste this info somehow. Is this possible today?

image

Area-IDE Language Service Feature Improvement

Most helpful comment

There is some progress:

copy

All 10 comments

Yeah I agree - I really like how you can select text in VS Code.

@majocha As our XAML guru, tell us if it possible to make the tooltip selectable?

Can be done by replacing TextBlock with read only RichTextBox. It may be not very performant. Already there are slowdowns when there are few dozen links in a tooltip. WPF is dead and not well optimized, unfortunately.
I'll experiment with this.

Not so easy.

We now use Roslyn's implementation of QuickInfo and it does a unsafe cast to TextBlock here:
http://source.roslyn.io/#Microsoft.CodeAnalysis.EditorFeatures/Implementation/Intellisense/QuickInfo/Providers/QuickInfoDisplayPanel.cs,31
so we can't pass any other control but TextBlock, which doesn't support selection.

It's either reimplement this from scratch or augment TextBlock control with styles or subclassing to our liking.
...we could also ask Roslyn team to change the code.

@Pilchie, and context here?

On second thought just making a fully custom tooltip is not that hard. There is not that much going on in that code. It can be replicated.

Does: "Edit.CopyParameterTip" already work (Ctrl+Shift+Alt+C) already work to do this?

(legitimately not sure).

@Pilchie doesn't seem to do anything, C# or F# editor.

There is some progress:

copy

When will this feature be added to visual studio?such as vs 2019

Was this page helpful?
0 / 5 - 0 ratings