-
Notifications
You must be signed in to change notification settings - Fork 416
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
Add V2 version of GotoDefinitionService #2168
Conversation
The V1 GotoDefinitionService can only return one definition for a symbol. This is particularly annoying for partial types, which have multiple locations, and the location the service returns is pretty much never the one I want. The V2 service is very similar, but it uses V2 location models and returns a list of definitions, not a single one.
@filipw @david-driscoll could you take a look? |
src/OmniSharp.Roslyn.CSharp/Services/Navigation/GoToDefinitionHelpers.cs
Outdated
Show resolved
Hide resolved
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.
Thank, you this is a very good idea - I left some small comments only
src/OmniSharp.Roslyn.CSharp/Services/Navigation/GoToDefinitionHelpers.cs
Show resolved
Hide resolved
@filipw addressed your feedback, thanks. |
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.
thanks!
@@ -260,7 +260,7 @@ private static async Task<CodeElement> TranslateAsync(this CodeElement element, | |||
continue; | |||
} | |||
|
|||
builder.AddChild(childElement); | |||
builder.AddChild(translatedElement); |
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.
This only ever worked because mutation.
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.
🙈
The V1 GotoDefinitionService can only return one definition for a symbol. This is particularly annoying for partial types, which have multiple locations, and the location the service returns is pretty much never the one I want. The V2 service is very similar, but it uses V2 location models and returns a list of definitions, not a single one.