Skip to content

Commit 97a3e71

Browse files
Merge pull request #2682 from Microsoft/GetOccurrencesSingleFile
Ensure that getOccurrences not return items not in the file asked for.
2 parents b1c93d3 + fc512b2 commit 97a3e71

File tree

4 files changed

+600
-469
lines changed

4 files changed

+600
-469
lines changed

src/harness/harnessLanguageService.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,9 @@ module Harness.LanguageService {
336336
getOccurrencesAtPosition(fileName: string, position: number): ts.ReferenceEntry[] {
337337
return unwrapJSONCallResult(this.shim.getOccurrencesAtPosition(fileName, position));
338338
}
339+
getDocumentHighlights(fileName: string, position: number, filesToSearch: string[]): ts.DocumentHighlights[] {
340+
return unwrapJSONCallResult(this.shim.getDocumentHighlights(fileName, position, JSON.stringify(filesToSearch)));
341+
}
339342
getNavigateToItems(searchValue: string): ts.NavigateToItem[] {
340343
return unwrapJSONCallResult(this.shim.getNavigateToItems(searchValue));
341344
}

src/server/client.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,10 @@ module ts.server {
488488
});
489489
}
490490

491+
getDocumentHighlights(fileName: string, position: number): DocumentHighlights[] {
492+
throw new Error("Not Implemented Yet.");
493+
}
494+
491495
getOutliningSpans(fileName: string): OutliningSpan[] {
492496
throw new Error("Not Implemented Yet.");
493497
}

0 commit comments

Comments
 (0)