Merge branch 'master' into getTypeDefinitionAtPosition

Conflicts:
	src/services/services.ts
This commit is contained in:
Mohamed Hegazy
2015-05-04 10:02:37 -07:00
698 changed files with 16913 additions and 12420 deletions

View File

@@ -559,6 +559,14 @@ module ts.server {
throw new Error("Not Implemented Yet.");
}
getEncodedSyntacticClassifications(fileName: string, span: TextSpan): Classifications {
throw new Error("Not Implemented Yet.");
}
getEncodedSemanticClassifications(fileName: string, span: TextSpan): Classifications {
throw new Error("Not Implemented Yet.");
}
getProgram(): Program {
throw new Error("SourceFile objects are not serializable through the server protocol.");
}

View File

@@ -424,7 +424,7 @@ module ts.server {
getFormatCodeOptions(file?: string) {
if (file) {
var info = this.filenameToScriptInfo[file];
var info = this.filenameToScriptInfo[file];
if (info) {
return info.formatCodeOptions;
}
@@ -750,6 +750,7 @@ module ts.server {
if (content !== undefined) {
var indentSize: number;
info = new ScriptInfo(this.host, fileName, content, openedByClient);
info.setFormatOptions(this.getFormatCodeOptions());
this.filenameToScriptInfo[fileName] = info;
if (!info.isOpen) {
info.fileWatcher = this.host.watchFile(fileName, _ => { this.watchedFileChanged(fileName); });

View File

@@ -542,7 +542,7 @@ module ts.server {
IndentSize: formatOptions.IndentSize,
TabSize: formatOptions.TabSize,
NewLineCharacter: "\n",
ConvertTabsToSpaces: true,
ConvertTabsToSpaces: formatOptions.ConvertTabsToSpaces,
};
var indentPosition =
compilerService.languageService.getIndentationAtPosition(file, position, editorOptions);