Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Change label of UIElement when command handler is disabled
Change label of UIElement when command handler is disabled [message #335853] Tue, 05 May 2009 09:07 Go to next message
Eclipse UserFriend
Hello together,

I have the following situation with our RCP application based on eclipse
3.3:

- I contributed a command without a default handler
- I added a menu contribution for this command -> displaying the standard
label "New"

- Now I have several handlers for the command which get activated
depending on the currently active perspective. They all implement
IElementUpdater and set their specific label ("New A", "New B") to the
UIElement.

My problem is:

When the handlers are deactivated again, the label is not reset to the
initial default "New". How can I realize this behavior?
Re: Change label of UIElement when command handler is disabled [message #335857 is a reply to message #335853] Tue, 05 May 2009 13:33 Go to previous message
Eclipse UserFriend
In 3.3 you would need to provide a default handler that returns
isEnabled()==false and set the text to "New"

You might want to open an enhancement request at
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Platform &component=UI

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:Per-user plugin/dependencies broken between 3.4.1->3.4.2 (and beyond)
Next Topic:Command / handler issue - Ctrl+S won't work
Goto Forum:
  


Current Time: Fri Apr 25 19:40:52 EDT 2025

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

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

Back to the top