Skip to main content

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 10:14 Go to next message
Markus John is currently offline Markus JohnFriend
Messages: 2
Registered: January 2013
Junior Member

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,

  • Attachment: Untitled.png
    (Size: 35.01KB, Downloaded 1010 times)
Re: org.eclipse.ui.menus [message #998014 is a reply to message #997559] Wed, 09 January 2013 07:35 Go to previous message
Simon Scholz is currently offline Simon ScholzFriend
Messages: 73
Registered: April 2012
Location: Germany
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,

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: Tue Dec 07 12:01:16 GMT 2021

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

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

Back to the top