Merge branch 'master' into glob2_merged

This commit is contained in:
Richard Knoll
2016-06-17 15:34:06 -07:00
653 changed files with 290179 additions and 274327 deletions

View File

@@ -459,7 +459,7 @@ namespace ts.server {
kindModifiers: item.kindModifiers || "",
spans: item.spans.map(span => createTextSpanFromBounds(this.lineOffsetToPosition(fileName, span.start), this.lineOffsetToPosition(fileName, span.end))),
childItems: this.decodeNavigationBarItems(item.childItems, fileName),
indent: 0,
indent: item.indent,
bolded: false,
grayed: false
}));

View File

@@ -268,7 +268,7 @@ namespace ts.server {
}
removeRoot(info: ScriptInfo) {
if (!this.filenameToScript.contains(info.path)) {
if (this.filenameToScript.contains(info.path)) {
this.filenameToScript.remove(info.path);
this.roots = copyListRemovingItem(info, this.roots);
this.resolvedModuleNames.remove(info.path);
@@ -315,6 +315,10 @@ namespace ts.server {
return this.host.directoryExists(path);
}
getDirectories(path: string): string[] {
return this.host.getDirectories(path);
}
/**
* @param line 1 based index
*/
@@ -1142,7 +1146,7 @@ namespace ts.server {
else {
this.log("No config files found.");
}
return {};
return configFileName ? { configFileName } : {};
}
/**

View File

@@ -1242,6 +1242,11 @@ declare namespace ts.server.protocol {
* Optional children.
*/
childItems?: NavigationBarItem[];
/**
* Number of levels deep this item should appear.
*/
indent: number;
}
export interface NavBarResponse extends Response {

View File

@@ -872,7 +872,8 @@ namespace ts.server {
start: compilerService.host.positionToLineOffset(fileName, span.start),
end: compilerService.host.positionToLineOffset(fileName, ts.textSpanEnd(span))
})),
childItems: this.decorateNavigationBarItem(project, fileName, item.childItems)
childItems: this.decorateNavigationBarItem(project, fileName, item.childItems),
indent: item.indent
}));
}
@@ -1206,7 +1207,11 @@ namespace ts.server {
// Handle cancellation exceptions
}
this.logError(err, message);
this.output(undefined, request ? request.command : CommandNames.Unknown, request ? request.seq : 0, "Error processing request. " + err.message);
this.output(
undefined,
request ? request.command : CommandNames.Unknown,
request ? request.seq : 0,
"Error processing request. " + (<StackTraceError>err).message + "\n" + (<StackTraceError>err).stack);
}
}
}