Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » <visibleWhen checkEnabled=true/> not always working
<visibleWhen checkEnabled=true/> not always working [message #331479] Tue, 09 September 2008 15:46 Go to next message
David  Pérez is currently offline David PérezFriend
Messages: 228
Registered: July 2009
Senior Member
Hi,

I've checked that the <visibleWhen checkEnabled=true/> for a command
inside a menuContribution works ok when inserted inside the main pull down
menu (i.e. menu:window?after=additions), but the toolbar item is always
hidden when inserted inside the main toolbar
(toolbar:org.eclipse.ui.main.toolbar?after=additions).

The enablement state of the command depends only on the active view part.
Some views register a handler for the command, whereas for others there is
no handler.

Is this a known bug?
Re: <visibleWhen checkEnabled=true/> not always working [message #331531 is a reply to message #331479] Thu, 11 September 2008 13:11 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

David Pérez wrote:
> Hi,
>
> I've checked that the <visibleWhen checkEnabled=true/> for a command
> inside a menuContribution works ok when inserted inside the main pull
> down menu (i.e. menu:window?after=additions), but the toolbar item is
> always hidden when inserted inside the main toolbar
> (toolbar:org.eclipse.ui.main.toolbar?after=additions).

org.eclipse.ui.main.toolbar is the location of the main coolbar :-)
which is a toolbar container. You need to create a toolbar in that menu
contribution and then add commands to it.

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/guide/workbench.htm


Previous Topic:Source and Test Folder
Next Topic:Is there a "Workbench User Guide" for RCP?
Goto Forum:
  


Current Time: Thu Jul 25 18:48:13 GMT 2024

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

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

Back to the top