Skip to content

Commit 7769b4c

Browse files
Update names.
1 parent b49e07c commit 7769b4c

File tree

4 files changed

+33
-33
lines changed

4 files changed

+33
-33
lines changed

src/harness/harnessLanguageService.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ module Harness.LanguageService {
241241
class ClassifierShimProxy implements ts.Classifier {
242242
constructor(private shim: ts.ClassifierShim) {
243243
}
244-
getLexicalClassifications2(text: string, lexState: ts.EndOfLineState, classifyKeywordsInGenerics?: boolean): ts.Classifications {
244+
getEncodedLexicalClassifications(text: string, lexState: ts.EndOfLineState, classifyKeywordsInGenerics?: boolean): ts.Classifications {
245245
throw new Error("NYI");
246246
}
247247
getClassificationsForLine(text: string, lexState: ts.EndOfLineState, classifyKeywordsInGenerics?: boolean): ts.ClassificationResult {
@@ -309,11 +309,11 @@ module Harness.LanguageService {
309309
getSemanticClassifications(fileName: string, span: ts.TextSpan): ts.ClassifiedSpan[] {
310310
return unwrapJSONCallResult(this.shim.getSemanticClassifications(fileName, span.start, span.length));
311311
}
312-
getSyntacticClassifications2(fileName: string, span: ts.TextSpan): ts.Classifications {
313-
return unwrapJSONCallResult(this.shim.getSyntacticClassifications2(fileName, span.start, span.length));
312+
getEncodedSyntacticClassifications(fileName: string, span: ts.TextSpan): ts.Classifications {
313+
return unwrapJSONCallResult(this.shim.getEncodedSyntacticClassifications(fileName, span.start, span.length));
314314
}
315-
getSemanticClassifications2(fileName: string, span: ts.TextSpan): ts.Classifications {
316-
return unwrapJSONCallResult(this.shim.getSemanticClassifications2(fileName, span.start, span.length));
315+
getEncodedSemanticClassifications(fileName: string, span: ts.TextSpan): ts.Classifications {
316+
return unwrapJSONCallResult(this.shim.getEncodedSemanticClassifications(fileName, span.start, span.length));
317317
}
318318
getCompletionsAtPosition(fileName: string, position: number): ts.CompletionInfo {
319319
return unwrapJSONCallResult(this.shim.getCompletionsAtPosition(fileName, position));

src/server/client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -533,11 +533,11 @@ module ts.server {
533533
throw new Error("Not Implemented Yet.");
534534
}
535535

536-
getSyntacticClassifications2(fileName: string, span: TextSpan): Classifications {
536+
getEncodedSyntacticClassifications(fileName: string, span: TextSpan): Classifications {
537537
throw new Error("Not Implemented Yet.");
538538
}
539539

540-
getSemanticClassifications2(fileName: string, span: TextSpan): Classifications {
540+
getEncodedSemanticClassifications(fileName: string, span: TextSpan): Classifications {
541541
throw new Error("Not Implemented Yet.");
542542
}
543543

src/services/services.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -973,18 +973,18 @@ module ts {
973973
getCompilerOptionsDiagnostics(): Diagnostic[];
974974

975975
/**
976-
* @deprecated Use getSyntacticClassifications2 instead.
976+
* @deprecated Use getEncodedSyntacticClassifications instead.
977977
*/
978978
getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[];
979979

980980
/**
981-
* @deprecated Use getSemanticClassifications2 instead.
981+
* @deprecated Use getEncodedSemanticClassifications instead.
982982
*/
983983
getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[];
984984

985985
// Encoded as triples of [start, length, ClassificationType].
986-
getSyntacticClassifications2(fileName: string, span: TextSpan): Classifications;
987-
getSemanticClassifications2(fileName: string, span: TextSpan): Classifications;
986+
getEncodedSyntacticClassifications(fileName: string, span: TextSpan): Classifications;
987+
getEncodedSemanticClassifications(fileName: string, span: TextSpan): Classifications;
988988

989989
getCompletionsAtPosition(fileName: string, position: number): CompletionInfo;
990990
getCompletionEntryDetails(fileName: string, position: number, entryName: string): CompletionEntryDetails;
@@ -1330,7 +1330,7 @@ module ts {
13301330
* @deprecated Use getLexicalClassifications instead.
13311331
*/
13321332
getClassificationsForLine(text: string, lexState: EndOfLineState, syntacticClassifierAbsent: boolean): ClassificationResult;
1333-
getLexicalClassifications2(text: string, endOfLineState: EndOfLineState, syntacticClassifierAbsent: boolean): Classifications;
1333+
getEncodedLexicalClassifications(text: string, endOfLineState: EndOfLineState, syntacticClassifierAbsent: boolean): Classifications;
13341334
}
13351335

13361336
/**
@@ -5847,10 +5847,10 @@ module ts {
58475847
}
58485848

58495849
function getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]{
5850-
return convertClassifications(getSemanticClassifications2(fileName, span));
5850+
return convertClassifications(getEncodedSemanticClassifications(fileName, span));
58515851
}
58525852

5853-
function getSemanticClassifications2(fileName: string, span: TextSpan): Classifications {
5853+
function getEncodedSemanticClassifications(fileName: string, span: TextSpan): Classifications {
58545854
synchronizeHostData();
58555855

58565856
let sourceFile = getValidSourceFile(fileName);
@@ -5963,10 +5963,10 @@ module ts {
59635963
}
59645964

59655965
function getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]{
5966-
return convertClassifications(getSyntacticClassifications2(fileName, span));
5966+
return convertClassifications(getEncodedSyntacticClassifications(fileName, span));
59675967
}
59685968

5969-
function getSyntacticClassifications2(fileName: string, span: TextSpan): Classifications {
5969+
function getEncodedSyntacticClassifications(fileName: string, span: TextSpan): Classifications {
59705970
// doesn't use compiler - no need to synchronize with host
59715971
let sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName);
59725972

@@ -6489,8 +6489,8 @@ module ts {
64896489
getCompilerOptionsDiagnostics,
64906490
getSyntacticClassifications,
64916491
getSemanticClassifications,
6492-
getSyntacticClassifications2,
6493-
getSemanticClassifications2,
6492+
getEncodedSyntacticClassifications,
6493+
getEncodedSemanticClassifications,
64946494
getCompletionsAtPosition,
64956495
getCompletionEntryDetails,
64966496
getSignatureHelpItems,
@@ -6686,12 +6686,12 @@ module ts {
66866686
}
66876687

66886688
function getClassificationsForLine(text: string, lexState: EndOfLineState, syntacticClassifierAbsent: boolean): ClassificationResult {
6689-
return convertClassifications(getLexicalClassifications2(text, lexState, syntacticClassifierAbsent), text);
6689+
return convertClassifications(getEncodedLexicalClassifications(text, lexState, syntacticClassifierAbsent), text);
66906690
}
66916691

66926692
// If there is a syntactic classifier ('syntacticClassifierAbsent' is false),
66936693
// we will be more conservative in order to avoid conflicting with the syntactic classifier.
6694-
function getLexicalClassifications2(text: string, lexState: EndOfLineState, syntacticClassifierAbsent: boolean): Classifications {
6694+
function getEncodedLexicalClassifications(text: string, lexState: EndOfLineState, syntacticClassifierAbsent: boolean): Classifications {
66956695
let offset = 0;
66966696
let token = SyntaxKind.Unknown;
66976697
let lastNonTriviaToken = SyntaxKind.Unknown;
@@ -7022,7 +7022,7 @@ module ts {
70227022

70237023
return {
70247024
getClassificationsForLine,
7025-
getLexicalClassifications2
7025+
getEncodedLexicalClassifications
70267026
};
70277027
}
70287028

src/services/shims.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ module ts {
9999

100100
getSyntacticClassifications(fileName: string, start: number, length: number): string;
101101
getSemanticClassifications(fileName: string, start: number, length: number): string;
102-
getSyntacticClassifications2(fileName: string, start: number, length: number): string;
103-
getSemanticClassifications2(fileName: string, start: number, length: number): string;
102+
getEncodedSyntacticClassifications(fileName: string, start: number, length: number): string;
103+
getEncodedSemanticClassifications(fileName: string, start: number, length: number): string;
104104

105105
getCompletionsAtPosition(fileName: string, position: number): string;
106106
getCompletionEntryDetails(fileName: string, position: number, entryName: string): string;
@@ -191,7 +191,7 @@ module ts {
191191
}
192192

193193
export interface ClassifierShim extends Shim {
194-
getLexicalClassifications2(text: string, lexState: EndOfLineState, syntacticClassifierAbsent?: boolean): string;
194+
getEncodedLexicalClassifications(text: string, lexState: EndOfLineState, syntacticClassifierAbsent?: boolean): string;
195195
getClassificationsForLine(text: string, lexState: EndOfLineState, syntacticClassifierAbsent?: boolean): string;
196196
}
197197

@@ -469,23 +469,23 @@ module ts {
469469
});
470470
}
471471

472-
public getSyntacticClassifications2(fileName: string, start: number, length: number): string {
472+
public getEncodedSyntacticClassifications(fileName: string, start: number, length: number): string {
473473
return this.forwardJSONCall(
474-
"getSyntacticClassifications('" + fileName + "', " + start + ", " + length + ")",
474+
"getEncodedSyntacticClassifications('" + fileName + "', " + start + ", " + length + ")",
475475
() => {
476476
// directly serialize the spans out to a string. This is much faster to decode
477477
// on the managed side versus a full JSON array.
478-
return convertClassifications(this.languageService.getSyntacticClassifications2(fileName, createTextSpan(start, length)));
478+
return convertClassifications(this.languageService.getEncodedSyntacticClassifications(fileName, createTextSpan(start, length)));
479479
});
480480
}
481481

482-
public getSemanticClassifications2(fileName: string, start: number, length: number): string {
482+
public getEncodedSemanticClassifications(fileName: string, start: number, length: number): string {
483483
return this.forwardJSONCall(
484-
"getSemanticClassifications('" + fileName + "', " + start + ", " + length + ")",
484+
"getEncodedSemanticClassifications('" + fileName + "', " + start + ", " + length + ")",
485485
() => {
486486
// directly serialize the spans out to a string. This is much faster to decode
487487
// on the managed side versus a full JSON array.
488-
return convertClassifications(this.languageService.getSemanticClassifications2(fileName, createTextSpan(start, length)));
488+
return convertClassifications(this.languageService.getEncodedSemanticClassifications(fileName, createTextSpan(start, length)));
489489
});
490490
}
491491

@@ -780,9 +780,9 @@ module ts {
780780
this.classifier = createClassifier();
781781
}
782782

783-
public getLexicalClassifications2(text: string, lexState: EndOfLineState, syntacticClassifierAbsent?: boolean): string {
784-
return forwardJSONCall(this.logger, "getLexicalClassifications2",
785-
() => convertClassifications(this.classifier.getLexicalClassifications2(text, lexState, syntacticClassifierAbsent)),
783+
public getEncodedLexicalClassifications(text: string, lexState: EndOfLineState, syntacticClassifierAbsent?: boolean): string {
784+
return forwardJSONCall(this.logger, "getEncodedLexicalClassifications",
785+
() => convertClassifications(this.classifier.getEncodedLexicalClassifications(text, lexState, syntacticClassifierAbsent)),
786786
/*noPerfLogging:*/ true);
787787
}
788788

0 commit comments

Comments
 (0)