vNext Rewrite

This commit cleans up and reorganizes the code base, as well as fixes some issues. The intent of the vNext branch is to make the extension more conducive to an open-source environment.
This commit is contained in:
Josh Johnson 2016-01-06 15:55:11 -05:00
parent 1b9caa3265
commit eb43a467c8
16 changed files with 617 additions and 192 deletions

13
src/utils/RangeUtil.ts Normal file
View file

@ -0,0 +1,13 @@
'use strict';
import * as vsc from 'vscode';
export class RangeUtil {
static getRangeForDocument(document: vsc.TextDocument): vsc.Range {
let lastLineIndex = (document.lineCount - 1);
let range = new vsc.Range(new vsc.Position(0, 0), new vsc.Position(lastLineIndex, Number.MAX_VALUE));
range = document.validateRange(range);
return range;
}
}

View file

@ -1,12 +0,0 @@
'use strict';
import { TextDocument, Range, Position } from 'vscode';
export function getRangeForDocument(document: TextDocument): Range {
let lastLineIndex = (document.lineCount - 1);
let range = new Range(new Position(0, 0), new Position(lastLineIndex, Number.MAX_VALUE));
range = document.validateRange(range);
return range;
}