Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Toolbar not resize after IElementUpdater
Toolbar not resize after IElementUpdater [message #1830617] Wed, 29 July 2020 21:53 Go to next message
Esteban Avila is currently offline Esteban AvilaFriend
Messages: 49
Registered: June 2012
Member
Hello everyone,
i have a handler that switch between perspectives, this handler change his text depending on a selection from other menu. I update the text using

@Override
public void updateElement(UIElement element, Map parameters)
{
String aux = Chip.getInstance().getVersion().substring(0, 1) + Chip.getInstance().getVersion().substring(1).toLowerCase();
element.setText(aux);
}


The text changes, but if the new text is a bit large on the toolbar, all elements move to the right and remain hidden from the other toolbar.
If I move the toolbar, this is rearranged and all controls are displayed.

Someone can tell me how i can make a refresh the toolbar layout programmatically?

Thanks. Regards.
Re: Toolbar not resize after IElementUpdater [message #1830670 is a reply to message #1830617] Thu, 30 July 2020 20:34 Go to previous message
Rolf Theunissen is currently offline Rolf TheunissenFriend
Messages: 260
Registered: April 2012
Senior Member
I think that you have to mark your contribution item as dynamic, i.e. override the isDynamic() method to return true. And mark your contribution item as dirty after the change you made.

Otherwise, you can try to call update(true) on the ToolBarManager.
Previous Topic:MenuService WorkbenchContext/TrimmedWindowImpl
Next Topic:Dynamically create popup menu with parameterized values
Goto Forum:
  


Current Time: Fri Apr 26 17:59:08 GMT 2024

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

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

Back to the top