I need total control of the perspective menu.
To disable, I already cut the forum
context menu:
private zero disablePerspectiveToolbarMenu () {perspectiveBarManager perspectiveBarManager = ((WorkbenchWindow) PlatformUI.getWorkbench () GetActiveWorkbenchWindow ().) GetPerspectiveBar () ;. If (perspectiveBarManager = null!) {Toolbar = toolbar = perspectiveBarManager.getControl (); Audience [] listeners = toolbar.getListeners (SWT.MenuDetect); {ToolBar.removeListener (SWT.MenuDetect, listeners) for if (! Listeners = null) {(listener listener: listeners); }}}} But I also need to control the default content of the Contextual Menu . There is an option that always exists that gives access to the perspective list shell. I have to remove that option from the menu. It is a shame that the perspective menu is completely out of user control, I just need to have the approach menu, and nothing more to be added to!
Thank you.
< There are 3 possible options to get rid of div class = "post-text" itemprop = "text">
Other:
-
org in your RCP app. Set eclipse.ui.IWorkbenchPreferenceConstants.SHOW_OTHER_IN_PERSPECTIVE_MENU preference false This can be done with your product definition by including a plugin_customization.ini file. -
Patch the workspace in your RCP app, take a look at org.eclipse.ui.internal.PerspectiveBarNewContributionItem and org.eclipse. Ui.actions.ContributionItemFactory.PERSPECTIVES_SHORTLIST - Do not include the default perspective bar in your RCP app, instead, org.eclipse.ui.menus, a toolbar, and open context Use the command from the perspective bar.
Comments
Post a Comment