Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to remove popup menus for a perspective(How to remove popup menus for a perspective)
How to remove popup menus for a perspective [message #668732] Fri, 06 May 2011 21:24 Go to next message
Rosa Mising name is currently offline Rosa Mising nameFriend
Messages: 16
Registered: December 2009
Junior Member
Hello, I am working with Eclipse. I am developing a new perspective. I need to remove some Eclipse platform contributions (defined via org.eclipse.ui.popupMenus) in this perspective. Some of these popup menu options to be removed ar "Debug As...", for example.

Please help. Thanks.
Re: How to remove popup menus for a perspective [message #720420 is a reply to message #668732] Tue, 30 August 2011 14:48 Go to previous message
Marco Lopes is currently offline Marco LopesFriend
Messages: 59
Registered: September 2010
NOTE: this is a "core" hack!

PerspectiveBarManager perspectiveBarManager=((WorkbenchWindow)PlatformUI.getWorkbench().getActiveWorkbenchWindow()).getPerspectiveBar();

if (perspectiveBarManager!=null){
ToolBar toolBar = perspectiveBarManager.getControl();
Listener[] listeners = toolBar.getListeners(SWT.MenuDetect);
if (listeners != null){
for (Listener listener : listeners){
toolBar.removeListener(SWT.MenuDetect, listener);
Previous Topic:taking control of the StatusLine
Next Topic:How to bind "standard" key sequence to custom action?
Goto Forum:

Current Time: Tue Dec 07 22:22:38 GMT 2021

Powered by FUDForum. Page generated in 0.01696 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top