-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
New Quick Info API #20554
New Quick Info API #20554
Conversation
…o QuickInfoAPI2
@jasonmalinowski: Are VS integration tests known to be broken? Both failed with the following before they even started running tests.
|
Tagging @dotnet/roslyn-infrastructure. I saw the same in #20558 |
Looks like integration tests are working again. I re-ran them and both passed. |
Tagging @Therzok |
reviewing now. have been discussing offline ideas with therzok about how to make this sort of thing work well with VS4Mac as well. |
using Microsoft.VisualStudio.Language.Intellisense; | ||
using Microsoft.VisualStudio.Text.Editor; | ||
using Microsoft.VisualStudio.Text.Projection; | ||
using Roslyn.Test.Utilities; | ||
using Xunit; | ||
using Microsoft.CodeAnalysis.QuickInfo; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sort!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
OK. Do note the TODO list above which indicates that I've yet to go through your comments on Matt's original PR yet. |
workspace.GetService<ITextEditorFactoryService>(), | ||
workspace.GetService<IGlyphService>(), | ||
workspace.GetService<ClassificationTypeMap>()); | ||
return new CSharpSyntacticQuickInfoProvider(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider making a singleton.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, this is tests. n/m
|
||
internal TextBlock MainDescription => _textBlocks.FirstOrDefault(tb => tb.Kind == QuickInfoTextKinds.Description)?.Block; | ||
internal TextBlock Documentation => _textBlocks.FirstOrDefault(tb => tb.Kind == QuickInfoTextKinds.DocumentationComments)?.Block; | ||
internal TextBlock TypeParameterMap => _textBlocks.FirstOrDefault(tb => tb.Kind == QuickInfoTextKinds.TypeParameters)?.Block; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So is this the display for C#/VB? Will other languages create their own display panel?
using System.ComponentModel.Composition; | ||
using Microsoft.CodeAnalysis.Editor.Shared.Utilities; | ||
using Microsoft.VisualStudio.Language.Intellisense; | ||
using Microsoft.VisualStudio.Text; | ||
using Microsoft.VisualStudio.Text.Editor; | ||
using Microsoft.VisualStudio.Utilities; | ||
using System.Collections.Generic; | ||
using System; | ||
using Microsoft.VisualStudio.Text.Projection; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sort!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
So, one thing we'd like here is to have a similar model as CompletionItem where there is an |
@DustinCampbell the primary thing i want to look at are the APIs a language implements to produce the quick-info data, and teh API defining the quick-info data itself. Can you directly point out where these APIs are in this PR? I just want to look at it from the perspective of what this would be like for F#/TS/JS. The internal details of how that data gets passed around and eventually shown is less interesting for me :) |
@CyrusNajmabadi: Please look at the TODO list at the top of this PR. I'm not there yet. 😄 The goal of this PR was just to get the old Quick Info API moved forward and building (success!). |
Ah ok. When you get there, let me know. |
So, will this PR break F#/TS/JS? Or is that all still fine? |
No idea. They terrify me. Also, I'm not sure if they can forward to a type in the same assembly. The documentation says, "Specifies a destination Type in another assembly." |
@CyrusNajmabadi @DustinCampbell
You can't type forward between namespaces as the namespace name is part of the type's identity. You can only bridge assembly differences.
They should. THEY TOTALLY SHOULD. |
Besides, look at all the trouble @terrajobst has gotten us into with type forwarders. 😃 |
This commit has a few significant changes beyond correcting minor nit picks: 1. It unifies the GlyphExtensions classes in the Workspaces and non-WPF EditorFeatures layers. 2. It significantly cleans up the super-ugly mocking code in QuickInfoControlTests.vb 3. Tweaks the QuickInfo API to remove QuickInfoItem.Empty and QuickInfoItem.IsEmpty properties.
555eca7
to
03d4d3c
Compare
03d4d3c
to
b9f774b
Compare
@dotnet-bot retest this please |
@dotnet-bot retest this please |
|
@dotnet-bot retest this please |
@dotnet-bot retest this please |
excuse the noise from closing/reopening. I'm trying to get CI to run on this branch and on this PR. |
This is a PR to create a new public Quick Info API (#11103)
cc @dotnet/roslyn-ide