Skip to content

Commit b1c332b

Browse files
committed
Move interface + capitalize
1 parent 6f9a8e1 commit b1c332b

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Extension/src/LanguageServer/client.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ interface InactiveRegionParams {
7575
ranges: vscode.Range[];
7676
}
7777

78+
interface DecorationRangesPair {
79+
decoration: vscode.TextEditorDecorationType;
80+
ranges: vscode.Range[];
81+
}
82+
7883
// Requests
7984
const NavigationListRequest: RequestType<TextDocumentIdentifier, string, void, void> = new RequestType<TextDocumentIdentifier, string, void, void>('cpptools/requestNavigationList');
8085
const GoToDeclarationRequest: RequestType<void, void, void, void> = new RequestType<void, void, void, void>('cpptools/goToDeclaration');
@@ -194,11 +199,6 @@ export function createNullClient(): Client {
194199
return new NullClient();
195200
}
196201

197-
interface decorationRangesPair {
198-
decoration: vscode.TextEditorDecorationType;
199-
ranges: vscode.Range[];
200-
}
201-
202202
class DefaultClient implements Client {
203203
private languageClient: LanguageClient; // The "client" that launches and communicates with our language "server" process.
204204
private disposables: vscode.Disposable[] = [];
@@ -211,7 +211,7 @@ class DefaultClient implements Client {
211211
private crashTimes: number[] = [];
212212
private failureMessageShown = new PersistentState<boolean>("DefaultClient.failureMessageShown", false);
213213
private isSupported: boolean = true;
214-
private inactiveRegionsDecorations = new Map<string, decorationRangesPair>();
214+
private inactiveRegionsDecorations = new Map<string, DecorationRangesPair>();
215215

216216
// The "model" that is displayed via the UI (status bar).
217217
private model: ClientModel = {
@@ -399,7 +399,7 @@ class DefaultClient implements Client {
399399
public onDidChangeVisibleTextEditors(editors: vscode.TextEditor[]): void {
400400
//Apply text decorations to inactive regions
401401
for (let e of editors) {
402-
let valuePair: decorationRangesPair = this.inactiveRegionsDecorations.get(e.document.uri.toString());
402+
let valuePair: DecorationRangesPair = this.inactiveRegionsDecorations.get(e.document.uri.toString());
403403
//if (valuePair !== undefined) {
404404
e.setDecorations(valuePair.decoration, valuePair.ranges); // VSCode clears the decorations when the text editor becomes invisible
405405
//}
@@ -653,15 +653,15 @@ class DefaultClient implements Client {
653653
let decoration: vscode.TextEditorDecorationType = vscode.window.createTextEditorDecorationType(renderOptions);
654654

655655
// Recycle the active text decorations when we receive a new set of inactive regions
656-
let valuePair: decorationRangesPair = this.inactiveRegionsDecorations.get(params.uri);
656+
let valuePair: DecorationRangesPair = this.inactiveRegionsDecorations.get(params.uri);
657657
if (valuePair !== undefined) {
658658
// Disposing of and resetting the decoration will undo previously applied text decorations
659659
valuePair.decoration.dispose();
660660
valuePair.decoration = decoration;
661661

662662
valuePair.ranges = params.ranges; // As vscode.TextEditor.setDecorations only applies to visible editors, we must cache the range for when another editor becomes visible
663663
} else { // The entry does not exist. Make a new one
664-
let toInsert: decorationRangesPair = {
664+
let toInsert: DecorationRangesPair = {
665665
decoration: decoration,
666666
ranges: params.ranges
667667
};

0 commit comments

Comments
 (0)