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 10:49
romain ognier is currently offline romain ognier
Messages: 18
Registered: September 2013
Junior Member
Hello,

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: Tue Jul 29 23:07:52 EDT 2014

Powered by FUDForum. Page generated in 0.01778 seconds