-
Notifications
You must be signed in to change notification settings - Fork 831
VS: Use IViewElementFactory as intended #15098
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
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. |
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. |
|
I have re-targeted it to 17.7, so we don't wait for bot to merge it. |
|
Does it need to be merged into main also? |
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 |
|
/backport to main |
|
Started backporting to main: https://github.com/dotnet/fsharp/actions/runs/4925202806 |
|
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>)>])