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

Refactor composite bar

- Create a composite model
- Show the context menu in the same order
- Retain the position after unpin
上级 6662b08d
...@@ -182,6 +182,11 @@ export class ActivitybarPart extends Part { ...@@ -182,6 +182,11 @@ export class ActivitybarPart extends Part {
const canShow = this.canShow(viewlet); const canShow = this.canShow(viewlet);
if (canShow) { if (canShow) {
this.compositeBar.addComposite(viewlet, false); this.compositeBar.addComposite(viewlet, false);
const activeViewlet = this.viewletService.getActiveViewlet();
if (activeViewlet && activeViewlet.getId() === viewlet.id) {
this.compositeBar.pin(viewlet.id);
this.compositeBar.activateComposite(viewlet.id);
}
} else { } else {
this.compositeBar.removeComposite(viewlet.id); this.compositeBar.removeComposite(viewlet.id);
} }
......
...@@ -172,6 +172,10 @@ export class PanelPart extends CompositePart<Panel> implements IPanelService { ...@@ -172,6 +172,10 @@ export class PanelPart extends CompositePart<Panel> implements IPanelService {
descriptor.enabled = enabled; descriptor.enabled = enabled;
if (enabled) { if (enabled) {
this.compositeBar.addComposite(descriptor, true); this.compositeBar.addComposite(descriptor, true);
this.openPanel(descriptor.id, true).done(() => {
this.compositeBar.pin(descriptor.id);
this.compositeBar.activateComposite(descriptor.id);
});
} else { } else {
this.compositeBar.removeComposite(id); this.compositeBar.removeComposite(id);
} }
......
...@@ -49,6 +49,10 @@ export class OutputPanel extends AbstractTextResourceEditor { ...@@ -49,6 +49,10 @@ export class OutputPanel extends AbstractTextResourceEditor {
return OUTPUT_PANEL_ID; return OUTPUT_PANEL_ID;
} }
public getTitle(): string {
return nls.localize('output', "Output");
}
public getActions(): IAction[] { public getActions(): IAction[] {
if (!this.actions) { if (!this.actions) {
this.actions = [ this.actions = [
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册