export class Workspace { public observeTextEditors(editor: any) {} } export class EditorEvent { buffer: Buffer = new Buffer(); lineCount: number = 0; grammar: any = { name: "" } changes: TextDocumentContentChangeEvent[] = []; constructor(file: EditorFile) { this.buffer.file = file; } public setGrammar(name: string) { this.grammar.name = name; } public getGrammar() { return this.grammar; } public setLineCount(count: number) { this.lineCount = count; } public getLineCount() { return this.lineCount; } } export class Buffer { public file: EditorFile = new EditorFile(""); length: number = 0; public onDidDestroy(event: any) { } public onDidChange(event: any) { } public getLength() { return this.length; } } export class EditorFile { path: string = ""; constructor(path: string) { this.path = path; } } export class TextDocumentContentChangeEvent { oldRange: Range = new Range(new Point(0, 0), new Point(0, 0)); newRange: Range = new Range(new Point(0, 0), new Point(0, 0)); oldText: string = ""; newText: string = ""; } export class Range { end: Point = new Point(0, 0); start: Point = new Point(0, 0); // ranges start counts at 1. subtract 1 to get to expected values rowCount: number = 1; constructor(start: Point, end: Point) { this.start = start this.end = end; } public setRowCount(rowCount: number) { this.rowCount = rowCount; } public getRowCount() { return this.rowCount; } } export class Point { column: number = 0; row: number = 0; constructor(column: number, row: number) { this.column = column; this.row = row; } }