blob: 447adc920237d28ff80fffd3626781b855169b08 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
import * as vscode from "vscode";
import MockLine from "./MockLine";
export default class MockDocument implements vscode.TextDocument {
public uri: vscode.Uri;
public fileName: string;
public isUntitled: boolean;
public languageId: string;
public version: number;
public isDirty: boolean;
public isClosed: boolean;
public eol: vscode.EndOfLine;
public lineCount: number;
private line: vscode.TextLine;
private firstCall: boolean;
public constructor(line: vscode.TextLine) {
this.line = line;
this.firstCall = true;
}
public save(): Thenable<boolean> {
throw new Error("Method not implemented.");
}
public lineAt(line: number | vscode.Position): vscode.TextLine;
public lineAt(position: any): any {
if (this.firstCall) {
this.firstCall = false;
return this.line;
} else {
return new MockLine(";");
}
}
public offsetAt(position: vscode.Position): number {
throw new Error("Method not implemented.");
}
public positionAt(offset: number): vscode.Position {
throw new Error("Method not implemented.");
}
public getText(range?: vscode.Range): string {
throw new Error("Method not implemented.");
}
public getWordRangeAtPosition(position: vscode.Position, regex?: RegExp): vscode.Range {
throw new Error("Method not implemented.");
}
public validateRange(range: vscode.Range): vscode.Range {
throw new Error("Method not implemented.");
}
public validatePosition(position: vscode.Position): vscode.Position {
throw new Error("Method not implemented.");
}
}
|