Skip to content
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

VS Navigation consolidation #12105

Merged
merged 7 commits into from
Nov 15, 2021
Merged

VS Navigation consolidation #12105

merged 7 commits into from
Nov 15, 2021

Conversation

TIHan
Copy link
Contributor

@TIHan TIHan commented Sep 3, 2021

We have several ways to do navigation in VS, but a lot of it was spread out. This PR aims to consolidate it into a single type FSharpNavigation.

We have some quirks between quick-info and go-to-definition such as if one doesn't work the other one will? The goal was to address that, but it turns out it's going to be a bit more involved because the different navigation calls are catered to their respective VS feature. We will need to address that part in a separate PR.

@dsyme
Copy link
Contributor

dsyme commented Sep 6, 2021

This is great!

| FSharpGoToDefinitionResult.NavigableItem(navItem), _ ->
gtd.NavigateToItem(navItem, statusBar)
// 'true' means do it, like Sheev Palpatine would want us to.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do it

| FSharpGoToDefinitionResult.ExternalAssembly(targetSymbolUse, metadataReferences), _ ->
gtd.NavigateToExternalDeclaration(targetSymbolUse, metadataReferences, cancellationToken, statusBar)
// 'true' means do it, like Sheev Palpatine would want us to.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do it

Copy link
Contributor

@cartermp cartermp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More a nit about calling this navigation. We also have a FSharpNavigateToSearchService that is technically a form of navigation, but has nothing to do with navigating to the definition of a symbol.

@TIHan TIHan self-assigned this Oct 25, 2021
@TIHan
Copy link
Contributor Author

TIHan commented Nov 12, 2021

This is ready

@dsyme dsyme merged commit 2cddc36 into dotnet:main Nov 15, 2021
@dsyme
Copy link
Contributor

dsyme commented Nov 15, 2021

Great work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants