Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » change handled tool item label
change handled tool item label [message #1106000] Tue, 10 September 2013 14:49
romain ognier is currently offline romain ognierFriend
Messages: 21
Registered: September 2013
Junior Member

I am developing an application with a toolbar and handled tool item.
I want to change dynamically the label of the handled tool item when i click on a specify handled tool item.
Here is the code i made in a first place :

List<MTrimElement> element = window.getTrimBars().get(1).getChildren();
ToolBarImpl toolbar = (ToolBarImpl)element.get(0);
((HandledToolItemImpl) toolbar.getChildren().get(0)).setLabel("new name");

My question is :
is there any other way to change the label ? Cause this code does not work if the new name is too long (either my toolbar disappear, or some handled tool item disappear).

Thank you for your help.
Previous Topic:eventBroker to a particular perspective
Next Topic:Each Editor part to uniquely track navigator state
Goto Forum:

Current Time: Thu Feb 20 04:04:39 GMT 2020

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

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

Back to the top