Toggle Mark Occurrences is part of the action set “org.eclipse.cdt.ui.text.c.actionSet.presentation”.
Open Element Is part of action set “org.eclipse.cdt.ui.NavigationActionSet”.
You might also consider hiding specifc items using Eclipse capabilites/activities. See extension point org.eclipse.ui.activities.
HTH,
Toni
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx]
On Behalf Of Juncao Li
Sent: Tuesday, October 04, 2011 07:37
To: cdt-dev@xxxxxxxxxxx
Subject: [cdt-dev] Remove "Open Element" and "Toggle Mark Occurrences" actions in the cool bar
Hi,
I am writing an Eclipse RCP program based on the CDT plugin. There are two buttons I want to remove from the cool bar: "Open Element" and "Toggle Mark Occurrences". Is there any way I can do that?
I tried the following code in ApplicationWorkbenchWindowAdvisor.postWindowOpen:
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
page.hideActionSet("org.eclipse.cdt.internal.ui.editor.ToggleMarkOccurrencesAction");
However, it does not work. Any suggestion will be appreciated!
Thanks,
Juncao