@@ -913,7 +913,6 @@ const invalidSyntacticModeCommands: readonly protocol.CommandTypes[] = [
913913 protocol . CommandTypes . SignatureHelpFull ,
914914 protocol . CommandTypes . Navto ,
915915 protocol . CommandTypes . NavtoFull ,
916- protocol . CommandTypes . Occurrences ,
917916 protocol . CommandTypes . DocumentHighlights ,
918917 protocol . CommandTypes . DocumentHighlightsFull ,
919918] ;
@@ -1768,24 +1767,6 @@ export class Session<TMessage = string> implements EventSender {
17681767 implementations . map ( Session . mapToOriginalLocation ) ;
17691768 }
17701769
1771- private getOccurrences ( args : protocol . FileLocationRequestArgs ) : readonly protocol . OccurrencesResponseItem [ ] {
1772- const { file, project } = this . getFileAndProject ( args ) ;
1773- const position = this . getPositionInFile ( args , file ) ;
1774- const occurrences = project . getLanguageService ( ) . getOccurrencesAtPosition ( file , position ) ;
1775- return occurrences ?
1776- occurrences . map < protocol . OccurrencesResponseItem > ( occurrence => {
1777- const { fileName, isWriteAccess, textSpan, isInString, contextSpan } = occurrence ;
1778- const scriptInfo = project . getScriptInfo ( fileName ) ! ;
1779- return {
1780- ...toProtocolTextSpanWithContext ( textSpan , contextSpan , scriptInfo ) ,
1781- file : fileName ,
1782- isWriteAccess,
1783- ...( isInString ? { isInString } : undefined )
1784- } ;
1785- } ) :
1786- emptyArray ;
1787- }
1788-
17891770 private getSyntacticDiagnosticsSync ( args : protocol . SyntacticDiagnosticsSyncRequestArgs ) {
17901771 const { configFile } = this . getConfigFileAndProject ( args ) ;
17911772 if ( configFile ) {
@@ -3386,9 +3367,6 @@ export class Session<TMessage = string> implements EventSender {
33863367 [ protocol . CommandTypes . NavTreeFull ] : ( request : protocol . FileRequest ) => {
33873368 return this . requiredResponse ( this . getNavigationTree ( request . arguments , /*simplifiedResult*/ false ) ) ;
33883369 } ,
3389- [ protocol . CommandTypes . Occurrences ] : ( request : protocol . FileLocationRequest ) => {
3390- return this . requiredResponse ( this . getOccurrences ( request . arguments ) ) ;
3391- } ,
33923370 [ protocol . CommandTypes . DocumentHighlights ] : ( request : protocol . DocumentHighlightsRequest ) => {
33933371 return this . requiredResponse ( this . getDocumentHighlights ( request . arguments , /*simplifiedResult*/ true ) ) ;
33943372 } ,
0 commit comments