This project is read-only.

Signature Help in Razor isn't colorized


Signature help (from Ctrl+Shift+Space, not mouseover) in any projection buffer (eg, C# or VB code in a Razor file) is not colorized.


SSL wrote Dec 1, 2014 at 6:12 PM

I really wonder what causes this; could it have to do with the GetDataTipText() methods in the IVsTextViewFilter?

Pilchie wrote Dec 1, 2014 at 9:16 PM

I suspect that the issue is that we export a classifier for the CSharp-SignatureHelp content type (or whatever it's called), but in projection buffers, we actually trigger signature help on the surface buffer, which has different content type.

SSL wrote Dec 1, 2014 at 10:23 PM

You mean the signature ends up being HTMLXProjection-SignatureHelp?
Wouldn't that fail because no such content type exists?

PS: Why did you switch from WpfTextViews in tooltips to manually-classified TextBlocks?

Pilchie wrote Dec 1, 2014 at 10:51 PM

Content types can be (and are) created dynamically. The way that signature-help works is that it creates a derived content type for signature help so that you can have a specific classifier for signature help, but because it's a derived content type, it will fall back to the default classifier for the content type. The problem here is that we export a classifier for csharp-SignatureHelp. not HTMLXProjection-SignatureHelp, so our classifier isn't picked up.

For the switch to TextBlocks, it was a long time ago now, but IIRC, the reason was to support adding the glyph to quick info.

SSL wrote Dec 2, 2014 at 3:33 AM

I see.

Yes; I had noticed the TextBlock change a while ago (IIRC, when setting a breakpoint in WpfTextView's ctor to figure out how the quick info invocation changed from CTP3 to VS2015 Preview)