Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 13:07 Go to next message
Philip Corlatan is currently offline Philip CorlatanFriend
Messages: 4
Registered: July 2009
Junior Member
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 17:33 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

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: Thu Jul 25 18:46:52 GMT 2024

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

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

Back to the top