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: 56
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:How to remove popup menus for a perspective
Next Topic:How to remove popup menus in a perspective
Goto Forum:

Current Time: Mon Sep 25 13:21:37 GMT 2017

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

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