Bug 49751 [Contributions] IWorkbenchActionConstants inconsistency
IWorkbenchActionConstants has M_VIEW but not M_PERSPECTIVE. The M_VIEW comment references the Perspective menu. Also it has M_WORKBENCH which I don't think is used any more. /** * Name of standard Perspective menu (value <code>"view"</code>). */ public static final String M_VIEW = MENU_PREFIX+"view"; //$NON-NLS-1$ /** * Name of standard Workbench menu (value <code>"workbench"</code>). */ public static final String M_WORKBENCH = MENU_PREFIX+"workbench"; // $NON-NLS-1$
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/WorkbenchActionBuilder.java
* Returns the window to which this action builder is contributing.
	 */
	private IWorkbenchWindow getWindow() {
		return window;
	}
	
	/**
	 * Hooks listeners on the preference store and the window's page, perspective and selection services.
	 */
	private void hookListeners() {
		
		
		getWindow().addPageListener(new IPageListener() {
			public void pageActivated(IWorkbenchPage page) {
				enableActions(page.getPerspective() != null);
			}
			public void pageClosed(IWorkbenchPage page) {
				IWorkbenchPage pg = getWindow().getActivePage();
				enableActions(pg != null && pg.getPerspective() != null);
			}
			public void pageOpened(IWorkbenchPage page) {
				
			}
		});
		getWindow().addPerspectiveListener(new IPerspectiveListener() {
			public void perspectiveActivated(IWorkbenchPage page, IPerspectiveDescriptor perspective) {
				enableActions(true);
			}
			public void perspectiveChanged(IWorkbenchPage page, IPerspectiveDescriptor perspective, String changeId) {