| Summary: | [Contributions] Part toolbar does not refresh after adding or removing items to it | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Josh Davis <josh.davis> | ||||||||
| Component: | UI | Assignee: | Platform UI Triaged <platform-ui-triaged> | ||||||||
| Status: | CLOSED WONTFIX | QA Contact: | |||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | andreix, ben.cox, bsd, christian.pontesegger, cidhawk, cwiscount, daniel_megert, dirk.fauth, emoffatt, john.palof, ledina.hido, markus.kell.r, nobody, pwebster, remy.suen, rollsisu, rouven.mueck | ||||||||
| Version: | 4.2.1 | ||||||||||
| Target Milestone: | --- | ||||||||||
| Hardware: | All | ||||||||||
| OS: | All | ||||||||||
| See Also: | https://bugs.eclipse.org/bugs/show_bug.cgi?id=550268 | ||||||||||
| Whiteboard: | stalebug | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Josh Davis
I have also found that this issue also exists when removing a tool or menu item. The render is not properly resizing the toolbar or menu This is almost certainly a layout issue; we're simply not causing the CTabFolder to re-calculate its layout once the toolbar changes its items. Wherever we're calling the TBManager's 'update' we should likely be adding some layout code. At least the TB should be 'packed', we could (maybe already do) listen for size changes to the TB in the Stack renderer (which is the one that 'knows' the TB is should as part of a CTabFolder... Fix pushed to master. http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=37b3b45c0a81ec12e49aa9dec1bc2e63696a12c3 Thanks for the bug report, Josh. Sorry it took us a while to get this fixed. Please do not hesitate to let us know if you find other problems with Eclipse. Verified by source code inspection with I20120312-1730. (In reply to comment #4) > Verified by source code inspection with I20120312-1730. I am trying to test this fix locally and I can't get it to work What I did was download eclipse-4.2-I20120314-2200-repository and am using those jars in my target There are two swt renderer jars in that repository 0.10.0.v20120314-1758 0.10.100.201203160704 If I use 0314 the bug is not fixed. If I use 201203160704 I get java.lang.ClassNotFoundException: org.eclipse.e4.ui.internal.workbench.renderers.swt.IUpdateService I saw you verified this on 3/13 and it appears the code was moved to the master so I am assumed the fix would be in the 20120314 repo. Is that correct? (In reply to comment #5) > I am trying to test this fix locally and I can't get it to work I unzipped I20120315-1300 and imported your project and it worked for me. Does this work for you? (In reply to comment #6) > (In reply to comment #5) > > I am trying to test this fix locally and I can't get it to work > > I unzipped I20120315-1300 and imported your project and it worked for me. Does > this work for you? I think problem is I don't know how to properly install the integration build. I am trying to find documentation on how to do it, and will try again. (In reply to comment #7) > (In reply to comment #6) > > (In reply to comment #5) > > > I am trying to test this fix locally and I can't get it to work > > > > I unzipped I20120315-1300 and imported your project and it worked for me. Does > > this work for you? > > I think problem is I don't know how to properly install the integration build. > I am trying to find documentation on how to do it, and will try again. I figured it out and got it working. It worked with 4.2 but is broken again in 4.2.1 (In reply to comment #9) > It worked with 4.2 but is broken again in 4.2.1 I'm a little confused. The specific case tested by Josh's sample project seems to work for me in both 4.2.0 and 4.2.1. The case of removing toolbar items as mentioned in comment 1 seems to be broken in both 4.2.0 and 4.2.1. To test that case I just used Josh's example project and added another button that does the following: mPart.getToolbar().getChildren().remove(mPart.getToolbar().getChildren().get(0)); When I do that I don't see the toolbar button go away. Dirk - which case is it that you were referring to? Created attachment 223334 [details]
Small project for visible state refresh not working
Hi Ben, you are right, removing the button doesn't work in both cases. What worked in 4.2.0 is the refresh of the toolbar when changing the visible state of a toolbar item. This doesn't work with 4.2.1 anymore. I added a small project showing that case. @Paul If you are running the example on Windows, this example should also show Bug 391741. Not sure how it behaves on other OS. Bug 409008 is a similar scenario. Created attachment 249871 [details]
Sample application with toolbar on non-modal dialog
I am seeing the same issue with a toolbar on a non-modal dialog in 4.4. This sample app uses a source provider (provides selection from a list in the dialog) to enable a toolbar contribution. The toolbar contribution on the dialog will not refresh unless the user moves focus over to the main application window. Can also bee seen in the Search view, see bug 474787. *** Bug 474787 has been marked as a duplicate of this bug. *** Mass move to 4.7 as M7 is approaching. Please move back in case you are planning to fix it for Neon. Still seeing this issue in 4.6.3. See Bug 525775 *** Bug 511519 has been marked as a duplicate of this bug. *** 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. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. 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. |