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: 61
Registered: September 2010
Member
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: Thu Apr 25 01:31:52 GMT 2024

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

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

Back to the top