Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » removing annoying coolbar actionsets
removing annoying coolbar actionsets [message #461567] Fri, 12 January 2007 08:38 Go to next message
Eclipse UserFriend
hello,

im trying to remove the default coolbar actionsets using this code:
http://www.richclient2.eu/2006_03_20/getting-rid-of-convert- line-delimiters-to/

ActionSetRegistry reg = WorkbenchPlugin.getDefault().getActionSetRegistry();
IActionSetDescriptor[] actionSets = reg.getActionSets();

for (int i=0; i<actionSets.length; i++) {
System.out.println(actionSets[i].getId());
}

eclipse tells me the following:
Discouraged access: The method getDefault() from the type
WorkbenchPlugin is not accessible due to restriction on required library
D:\eclipse-rcp\eclipse-sdk\plugins\org.eclipse.ui.workbench_ 3.2.1.M20060906-0800.jar

what about this warning?
there are no extension-points or packages named *.ui.workbench or
*.ui.internal which i may import...

thanks,
kai
Re: removing annoying coolbar actionsets [message #461593 is a reply to message #461567] Fri, 12 January 2007 15:59 Go to previous messageGo to next message
Eclipse UserFriend
Kai Meder schrieb:
> hello,
>
> im trying to remove the default coolbar actionsets using this code:
> http://www.richclient2.eu/2006_03_20/getting-rid-of-convert- line-delimiters-to/

i added my own actions programatically:
creating Action-Objects and register()ing them to the
ApplicationActionBarAdvisor.

protected void fillCoolBar(ICoolBarManager coolBar) {

IToolBarManager toolbar = new ToolBarManager(SWT.SHADOW_OUT);
coolBar.add(new ToolBarContributionItem(toolbar, "main"));

toolbar.add(loadAction);
toolbar.add(saveAction);
....

how may i remove all the default coolbar-buttons?

thanks,
kai
Re: removing annoying coolbar actionsets [message #461623 is a reply to message #461593] Sat, 13 January 2007 20:21 Go to previous messageGo to next message
Eclipse UserFriend
Kai Meder schrieb:
> Kai Meder schrieb:
>> hello,
>>
>> im trying to remove the default coolbar actionsets using this code:
>> http://www.richclient2.eu/2006_03_20/getting-rid-of-convert- line-delimiters-to/
>
>
> i added my own actions programatically:
> creating Action-Objects and register()ing them to the
> ApplicationActionBarAdvisor.
>
> protected void fillCoolBar(ICoolBarManager coolBar) {
>
> IToolBarManager toolbar = new ToolBarManager(SWT.SHADOW_OUT);
> coolBar.add(new ToolBarContributionItem(toolbar, "main"));
>
> toolbar.add(loadAction);
> toolbar.add(saveAction);
> ....
>
> how may i remove all the default coolbar-buttons?

please, may give me someone advice?

kai
Re: removing annoying coolbar actionsets [message #461626 is a reply to message #461623] Sun, 14 January 2007 09:21 Go to previous message
Eclipse UserFriend
To remove actionSets, especially programmatically, you want to use
IWorkbenchPage#hideActionSet(actionSetId). You can find out action set
IDs using the Plug-in Registry View ... expand org.eclipse.ui>Extension
Points>org.eclipse.ui.actionSets.

If you mean you want to remove other programmatic contributions ...
there should only be things in the main coolbar from action sets and
from your ApplicationActionBarAdvisor.

Later,
PW
Previous Topic:Runnable asynExec
Next Topic:RCP and JNI lib
Goto Forum:
  


Current Time: Wed Mar 26 20:40:30 EDT 2025

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

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

Back to the top