Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » org.eclipse.ui.menus(Rename menu items)
org.eclipse.ui.menus [message #997559] Tue, 08 January 2013 05:14 Go to next message
Markus John is currently offline Markus John
Messages: 2
Registered: January 2013
Junior Member
Hello,

i have created a menuContribution over the extension point : org.eclipse.ui.menus (see uploaded screenshot). My problem is that i have to rename the "Softwarebuild" label at runtime. Is this possible? I have spent some hours on this problem can one help me?

Best regards,

Markes
  • Attachment: Untitled.png
    (Size: 35.01KB, Downloaded 44 times)
Re: org.eclipse.ui.menus [message #998014 is a reply to message #997559] Wed, 09 January 2013 02:35 Go to previous message
Simon Scholz is currently offline Simon Scholz
Messages: 73
Registered: April 2012
Location: Germany
Member
Hi Markus,

Could you tell me/us where the desired menu should appear?

If the menu is a kind of a pulldown menu(i.e. in a Toolbar), then you could use a command instead of a menu.
For that command you then choose the style "pulldown" and in order to attach items to that pulldown-command you have to create a second menuContribution with menu:"id of the pulldown-command". To that second menuContribution you can now attach all the childelements of the pulldown command.

To modify the pulldown command at runtime you´ll then have to implement the org.eclipse.ui.commands.IElementUpdater and use the org.eclipse.ui.menus.UIElement.setText(String) method to alternate the text or whatever you want.

If this solution does not fit, you´ll have to use a dynamic instead of a menu.


Could you please go a bit more into detail, so that I/we get to know what your aim is?
The better the question, the better the answer Wink

Do not hesitate to ask, if you need further information...

Best regards,

Simon
Previous Topic:Tutorial for excluding and including specific graphical workbench elements in rcp application
Next Topic:re-factoring rcp application structure
Goto Forum:
  


Current Time: Thu Aug 28 07:21:32 EDT 2014

Powered by FUDForum. Page generated in 0.02462 seconds