1 11 package org.eclipse.ui.internal; 12 13 import org.eclipse.ui.IWorkbenchWindow; 14 15 18 public class ShowViewMenuAction extends ShowPartPaneMenuAction { 19 20 24 public ShowViewMenuAction(IWorkbenchWindow window) { 25 super(window); 26 window.getWorkbench().getHelpSystem().setHelp(this, 28 IWorkbenchHelpContextIds.SHOW_VIEW_MENU_ACTION); 29 setActionDefinitionId("org.eclipse.ui.window.showViewMenu"); } 31 32 35 protected void initText() { 36 setText(WorkbenchMessages.ShowViewMenuAction_text); 37 setToolTipText(WorkbenchMessages.ShowViewMenuAction_toolTip); 38 } 39 40 43 protected void showMenu(PartPane pane) { 44 pane.showPaneMenu(); 45 } 46 47 50 protected void updateState() { 51 super.updateState(); 52 53 if (isEnabled()) { 56 PartPane pane = (((PartSite) getActivePart().getSite()).getPane()); 57 setEnabled((pane instanceof ViewPane) 58 && ((ViewPane) pane).hasViewMenu()); 59 } 60 } 61 62 } 63 | Popular Tags |