Community
Participate
Working Groups
My application uses a view menu to add new controls to the toolbar using IToolBarManager.add(..). Since upgrading to Eclipse 4.2, the toolbar is not redrawn correctly. We can trigger a redraw by resizing some element of Eclipse (e.g. a view or the main window). I can recreate by using the hello view sample and making it so that clicking action1 calls this method: protected void updateToolBar() { IActionBars actionBars = getViewSite().getActionBars(); IToolBarManager manager = actionBars.getToolBarManager(); manager.add(action2); manager.update(true); } In Eclipse 3.6.2, this adds a new toolbar button successfully. In Eclipse 4.2.2, the toolbar button does not show until something is resized.
That's missing a step, if you modify the actionBar toolbars you need to call org.eclipse.ui.IActionBars.updateActionBars(). From the doc: * Updates the action bars. * <p> * Clients who add or remove items from the menu, tool bar, or status line * managers, or that update global action handlers, should call this method * to propagated the changes throughout the workbench. * </p> But if you add that step and it still doesn't update, that's a problem. PW
Fantastic! If only you were on our development team :-D It is a change in behaviour from Eclipse 3.6.2, but easy to compensate for. Finding that bit of doc is a bit tricky - you need to know that the method's there before you can find out you need to call it :-)
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.