提交 d2bb304c 编写于 作者: S Sandeep Somavarapu

Fix #27745

上级 e98c09c8
......@@ -62,7 +62,7 @@ export class TreeView extends CollapsibleViewletView {
this.menus.onDidChangeTitle(() => this.updateActions(), this, this.disposables);
this.themeService.onThemeChange(() => this.tree.refresh() /* soft refresh */, this, this.disposables);
if (!options.collapsed) {
this.triggerActivation();
this.activate();
}
}
......@@ -82,14 +82,15 @@ export class TreeView extends CollapsibleViewletView {
protected changeState(state: CollapsibleState): void {
super.changeState(state);
if (state === CollapsibleState.EXPANDED) {
this.triggerActivation();
this.activate();
}
}
private triggerActivation() {
private activate() {
if (!this.activated && this.extensionService) {
this.extensionService.activateByEvent(`onView:${this.id}`);
this.activated = true;
this.setInput();
}
}
......@@ -123,10 +124,6 @@ export class TreeView extends CollapsibleViewletView {
return createActionItem(action, this.keybindingService, this.messageService);
}
public create(): TPromise<void> {
return this.setInput();
}
public setVisible(visible: boolean): TPromise<void> {
return super.setVisible(visible);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册