Merge from vscode 64980ea1f3f532c82bb6c28d27bba9ef2c5b4463 (#7206)

* Merge from vscode 64980ea1f3f532c82bb6c28d27bba9ef2c5b4463

* fix config changes

* fix strictnull checks
This commit is contained in:
Anthony Dresser
2019-09-15 22:38:26 -07:00
committed by GitHub
parent fa6c52699e
commit ea0f9e6ce9
1226 changed files with 21541 additions and 17633 deletions

View File

@@ -99,6 +99,11 @@ export class ExtHostTreeViews implements ExtHostTreeViewsShape {
checkProposedApiEnabled(extension);
treeView.message = message;
},
get title() { return treeView.title; },
set title(title: string) {
checkProposedApiEnabled(extension);
treeView.title = title;
},
reveal: (element: T, options?: IRevealOptions): Promise<void> => {
return treeView.reveal(element, options);
},
@@ -200,6 +205,15 @@ export class ExtHostTreeView<T> extends Disposable {
constructor(private viewId: string, options: vscode.TreeViewOptions<T>, private proxy: MainThreadTreeViewsShape, private commands: CommandsConverter, private logService: ILogService, private extension: IExtensionDescription) {
super();
if (extension.contributes && extension.contributes.views) {
for (const location in extension.contributes.views) {
for (const view of extension.contributes.views[location]) {
if (view.id === viewId) {
this._title = view.name;
}
}
}
}
this.dataProvider = options.treeDataProvider;
// {{SQL CARBON EDIT}}
if (this.proxy) {
@@ -282,6 +296,16 @@ export class ExtHostTreeView<T> extends Disposable {
this._onDidChangeData.fire({ message: true, element: false });
}
private _title: string = '';
get title(): string {
return this._title;
}
set title(title: string) {
this._title = title;
this.proxy.$setTitle(this.viewId, title);
}
setExpanded(treeItemHandle: TreeItemHandle, expanded: boolean): void {
const element = this.getExtensionElement(treeItemHandle);
if (element) {