Skip to content

Implement NavigateTo for single files, instead of the project.#10885

Merged
paulvanbrenk merged 3 commits into
masterfrom
navtosinglefile
Sep 14, 2016
Merged

Implement NavigateTo for single files, instead of the project.#10885
paulvanbrenk merged 3 commits into
masterfrom
navtosinglefile

Conversation

@paulvanbrenk
Copy link
Copy Markdown
Contributor

This implements a new API which allows you to limit the NavigateTo results to a single file. This is in response to recent VS changes.

Comment thread src/services/services.ts Outdated
function getNavigateToItems(searchValue: string, maxResultCount?: number, fileName?: string): NavigateToItem[] {
synchronizeHostData();

const sourceFiles = !fileName ? program.getSourceFiles() : [program.getSourceFile(fileName)];
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

can you invert the if so the condition is just fileName?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sure

@sandersn
Copy link
Copy Markdown
Member

👍

@vladima
Copy link
Copy Markdown
Contributor

vladima commented Sep 13, 2016

👍

1 similar comment
@mhegazy
Copy link
Copy Markdown
Contributor

mhegazy commented Sep 13, 2016

👍

@mhegazy
Copy link
Copy Markdown
Contributor

mhegazy commented Sep 13, 2016

We need to port this to release-2.0.5 branch at some point in the future. and also make the corresponding VS changes to call the new API.

@paulvanbrenk paulvanbrenk merged commit e9178a5 into master Sep 14, 2016
@paulvanbrenk paulvanbrenk deleted the navtosinglefile branch September 14, 2016 21:28
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 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.

5 participants