diff --git a/src/vs/workbench/browser/parts/views/viewPane.ts b/src/vs/workbench/browser/parts/views/viewPane.ts index e6ba12a5794..4df6b15d299 100644 --- a/src/vs/workbench/browser/parts/views/viewPane.ts +++ b/src/vs/workbench/browser/parts/views/viewPane.ts @@ -192,7 +192,8 @@ export abstract class ViewPane extends Pane implements IView { return this._titleDescription; } - private readonly menuActions: ViewMenuActions; + readonly menuActions: ViewMenuActions; + private progressBar!: ProgressBar; private progressIndicator!: IProgressIndicator; @@ -478,7 +479,7 @@ export abstract class ViewPane extends Pane implements IView { private setActions(): void { if (this.toolbar) { - this.toolbar.setActions(prepareActions(this.getActions()), prepareActions(this.getSecondaryActions())); + this.toolbar.setActions(prepareActions(this.menuActions.getPrimaryActions()), prepareActions(this.menuActions.getSecondaryActions())); this.toolbar.context = this.getActionsContext(); } } @@ -496,18 +497,6 @@ export abstract class ViewPane extends Pane implements IView { this._onDidChangeTitleArea.fire(); } - getActions(): IAction[] { - return this.menuActions.getPrimaryActions(); - } - - getSecondaryActions(): IAction[] { - return this.menuActions.getSecondaryActions(); - } - - getContextMenuActions(): IAction[] { - return this.menuActions.getContextMenuActions(); - } - getActionViewItem(action: IAction): IActionViewItem | undefined { return createActionViewItem(this.instantiationService, action); } diff --git a/src/vs/workbench/browser/parts/views/viewPaneContainer.ts b/src/vs/workbench/browser/parts/views/viewPaneContainer.ts index ababf9c2bbb..f4b875cd080 100644 --- a/src/vs/workbench/browser/parts/views/viewPaneContainer.ts +++ b/src/vs/workbench/browser/parts/views/viewPaneContainer.ts @@ -583,13 +583,13 @@ export class ViewPaneContainer extends Component implements IViewPaneContainer { const result = []; result.push(...this.menuActions.getPrimaryActions()); if (this.isViewMergedWithContainer()) { - result.push(...this.paneItems[0].pane.getActions()); + result.push(...this.paneItems[0].pane.menuActions.getPrimaryActions()); } return result; } getSecondaryActions(): IAction[] { - const viewPaneActions = this.isViewMergedWithContainer() ? this.paneItems[0].pane.getSecondaryActions() : []; + const viewPaneActions = this.isViewMergedWithContainer() ? this.paneItems[0].pane.menuActions.getSecondaryActions() : []; let menuActions = this.menuActions.getSecondaryActions(); const viewsSubmenuActionIndex = menuActions.findIndex(action => action instanceof SubmenuItemAction && action.item.submenu === ViewsSubMenu); @@ -768,7 +768,7 @@ export class ViewPaneContainer extends Component implements IViewPaneContainer { event.stopPropagation(); event.preventDefault(); - const actions: IAction[] = viewPane.getContextMenuActions(); + const actions: IAction[] = viewPane.menuActions.getContextMenuActions(); let anchor: { x: number, y: number } = { x: event.posx, y: event.posy }; this.contextMenuService.showContextMenu({