Uh oh!
There was an error while loading. Please reload this page.
VS: Use IViewElementFactory as intended - #15098
Conversation
T-Gro
commented
Apr 17, 2023
Thanks for the quick turnaround @majocha . Since the original regression happened as a perf regression for CPlusPlus coding tooltips, could we test that it isn't happening again? As in F# MEF-registered service is not being loaded in non-F# context. |
majocha
commented
Apr 17, 2023
Probably we could, the starting point would be to obtain IViewElementFactoryService and create a few standard elements. The next step would be to check if MEF loaded anything from FSharp.Editor. I'm not sure how to do it. |
vzarytovskii
commented
Apr 17, 2023
I have re-targeted it to 17.7, so we don't wait for bot to merge it. |
majocha
commented
Apr 24, 2023
Does it need to be merged into main also? |
vzarytovskii
commented
Apr 24, 2023
Not necessary, I usually don't bother with such changes. It will get there once 17.7 is merged back, but if you'd like to, you can cherry pick and PR it |
vzarytovskii
commented
May 9, 2023
/backport to main |
Started backporting to main: https://github.com/dotnet/fsharp/actions/runs/4925202806 |
vzarytovskii
commented
May 9, 2023
Reason for backporting - I want it in main and my branch, where I publish custom VSIX |
Alternative approach to styling QuickInfo, to address the issue with our
IViewElementFactorybeing picked up by other packages in VS.Now we provide content using the cross platform objects (
ClassifiedTextElementat al.) and let VS render them. Custom visuals are provided by our internalFSharpStyleso the type conversion should never be available to other VS inhabitants.To make the links look nicer we imperatively touch up the visual tree created by VS. Maybe not a standard, but still a legit way to do this.
FSharpStyleoverridesToStringto render paragraphs and separators cross platform. (To see this in action in VS on Windows just comment out[<Export(typeof<IViewElementFactory>)>])