blob: 781dbfe029381ee454667fc33f5fe442104ca406 (
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
|
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 lines: vscode.TextLine[];
public constructor(lines: vscode.TextLine[]) {
this.lines = lines;
}
public save(): Thenable<boolean> {
throw new Error("Method not implemented.");
}
public lineAt(line: number | vscode.Position): vscode.TextLine;
public lineAt(position: any): any {
if (position >= this.lines.length) {
return new MockLine(";");
}
return this.lines[position];
}
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.");
}
}
|