Skip to content

Add implementation for getNavigateToItems for the new compiler #677

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

Merged
merged 4 commits into from
Sep 16, 2014

Conversation

mhegazy
Copy link
Contributor

@mhegazy mhegazy commented Sep 16, 2014

Mostly kept the original behavior. Some minor changes:

  • Include local variables for functions, as it felt inconsistent that we included them for modules but not functions
  • use name of the declaration instead of the fully qualified name for the container, this felt less cluttered in the navigateTo list, and there is no way of getting a less qualified name, as we do not have a reference location.

@@ -5211,8 +5211,7 @@ module ts {
var otherKind = node.kind === SyntaxKind.GetAccessor ? SyntaxKind.SetAccessor : SyntaxKind.GetAccessor;
var otherAccessor = <AccessorDeclaration>getDeclarationOfKind(node.symbol, otherKind);
if (otherAccessor) {
var visibilityFlags = NodeFlags.Private | NodeFlags.Public;
if (((node.flags & visibilityFlags) !== (otherAccessor.flags & visibilityFlags))) {
if (((node.flags & NodeFlags.AccessibilityModifier) !== (otherAccessor.flags & NodeFlags.AccessibilityModifier))) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need to check accessibility for the getNavigateToItems ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no. we show local variables and local functions anyways, so private vs. public is not an issue. think of this more as a semantic search.

@vladima
Copy link
Contributor

vladima commented Sep 16, 2014

👍

Conflicts:
	src/services/services.ts
mhegazy added a commit that referenced this pull request Sep 16, 2014
Add implementation for getNavigateToItems for the new compiler
@mhegazy mhegazy merged commit 07e3c7f into master Sep 16, 2014
@mhegazy mhegazy deleted the navigateTo branch September 16, 2014 23:57
@microsoft microsoft locked and limited conversation to collaborators Jun 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants