Add configured projects to the list of projects when searching

This commit is contained in:
Mohamed Hegazy
2016-04-23 14:10:26 -07:00
parent 5ed6f30f1f
commit 39d64a2709
3 changed files with 34 additions and 0 deletions

View File

@@ -919,6 +919,7 @@ namespace ts.server {
configuredProject.updateGraph();
if (configuredProject.getSourceFile(info)) {
info.defaultProject = configuredProject;
referencingProjects.push(configuredProject);
}
}
return referencingProjects;

View File

@@ -0,0 +1,20 @@
/// <reference path="../fourslash.ts"/>
// Global class reference.
// @Filename: referencesForGlobals_1.ts
////class /*2*/globalClass {
//// public f() { }
////}
// @Filename: referencesForGlobals_2.ts
////var c = /*1*/globalClass();
// @Filename: tsconfig.json
////{ "files": ["referencesForGlobals_1.ts", "referencesForGlobals_2.ts"] }
goTo.marker("1");
verify.referencesCountIs(2);
goTo.marker("2");
verify.referencesCountIs(2);

View File

@@ -0,0 +1,13 @@
/// <reference path="../fourslash.ts"/>
// @Filename: referencesForGlobals_1.ts
////var [|globalName|] = 0;
// @Filename: referencesForGlobals_2.ts
////var y = /*1*/[|globalName|];
// @Filename: tsconfig.json
////{ "files": ["referencesForGlobals_1.ts", "referencesForGlobals_2.ts"] }
goTo.marker("1");
verify.renameLocations(/*findInStrings:*/ true, /*findInComments:*/ true);