Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » hide action from toolbar
hide action from toolbar [message #463702] Wed, 14 February 2007 12:41 Go to next message
Eclipse UserFriend
Originally posted by: eclipse-ng.tobiasm.de

Hi there,

I am trying to hide an action from the toolbar without success. Removing
the menubarPath-Attribute hides it from the menu, but doing the same
with toolbarPath still results in an icon on the toolbar.
How do i avoid this? Are there other/better ways to contribute only to
the menubar from within a pluign?

TIA

Tobi
Re: hide action from toolbar [message #463771 is a reply to message #463702] Thu, 15 February 2007 08:37 Go to previous messageGo to next message
Eclipse UserFriend
Are you using actionSet?

an <action/> element with only a menubarPath will only place the action
in the menu ... it can't do anything without a toolbarPath attribute.

Odds are whatever you are seeing in the toolbar is coming from somewhere
else. Did you add something in your ApplicationActionBarAdvisor?

Later,
PW
Re: hide action from toolbar [message #463799 is a reply to message #463771] Thu, 15 February 2007 12:34 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse-ng.tobiasm.de

Paul Webster wrote:
> Are you using actionSet?

Yes, forgot to mention it.

> an <action/> element with only a menubarPath will only place the action
> in the menu ... it can't do anything without a toolbarPath attribute.

Here it does!?
Removing the toolbarPath-Attribute still places an icon on the toolbar.
After commenting the action out it is gone.

> Odds are whatever you are seeing in the toolbar is coming from somewhere
> else. Did you add something in your ApplicationActionBarAdvisor?

My ApplicationActionBarAdvisor is untouched, no contributions there.

The plugin.xml says:

<extension
point="org.eclipse.ui.actionSets">
<actionSet
id="ntls.econ.rcp.actionSet"
label="Mainmenu Action Set"
visible="true">
<menu
id="windowMenu"
label="&amp;Window">
<separator name="extrasGroup"/>
</menu>
<action
class="ntls.econ.rcp.actions.OpenPreferencesWindowAction"
icon="icons/sample.gif"
id="ntls.econ.rcp.actions.OpenPreferencesWindowAction"
label="&amp;Preferences ..."
menubarPath="windowMenu/extrasGroup"
toolbarPath="doesntmatter"
tooltip="Preferences"/>
</actionSet>
</extension>

Tobi
Re: hide action from toolbar [message #463843 is a reply to message #463799] Fri, 16 February 2007 09:15 Go to previous message
Eclipse UserFriend
Tobias Mayer wrote:

>
> The plugin.xml says:
>
> <extension
> point="org.eclipse.ui.actionSets">
> <actionSet
> id="ntls.econ.rcp.actionSet"
> label="Mainmenu Action Set"
> visible="true">
> <menu
> id="windowMenu"
> label="&amp;Window">
> <separator name="extrasGroup"/>
> </menu>
> <action
> class="ntls.econ.rcp.actions.OpenPreferencesWindowAction"
> icon="icons/sample.gif"
> id="ntls.econ.rcp.actions.OpenPreferencesWindowAction"
> label="&amp;Preferences ..."
> menubarPath="windowMenu/extrasGroup"
> toolbarPath="doesntmatter"
> tooltip="Preferences"/>
> </actionSet>
> </extension>


Comment out the action, so that nothing appears.

Then make sure you don't have a toolbarPath="doesntmatter" (which will
currently create a toolbar for that action).

Later,
PW
Previous Topic:IntegerFieldEditor
Next Topic:How to automatically refresh a view without any action by the user
Goto Forum:
  


Current Time: Thu Mar 20 08:44:16 EDT 2025

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

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

Back to the top