Community
Participate
Working Groups
Created attachment 253108 [details] Sample plugin Using Eclipse 4.5-I20150502-1500 1. Import the attached sample plugin 2. Open the toolbar.target file with the Target Platform Editor. Set as target platform (top-right corner of the editor) 3. Run as Eclipse Application. Make sure the product selected in the launch is org.eclipse.sdk.ide because this affects the initial perspective (Java). The debug toolbar has a large empty space followed by a drop-down button containing some commands. I will attach a screenshot to show the result. This only happens the first time, when the welcome screen is shown. To reproduce the issue again, you can edit your launch configuration to have the workspace cleared automatically.
Created attachment 253109 [details] Drop-down in toolbar screenshot
I should add that switching to the Debug perspective fixes the problem, the toolbar items are drawn properly.
New Gerrit change created: https://git.eclipse.org/r/46994
In the sample plugin, there are two commands in the toolbar of interest: "Test command" and Skip breakpoints. Test Command is added to the toolbar first. Then the toolbar and the toolbar's parent are packed in ToolBarManagerRenderer.subscribeTopicUpdateToBeRendered. At that point, the TrimBarLayout has a cache filled with the toolbar's size accounting only for the size of the Test Command. Then the Skip breakpoints is added but the TrimBarLayout's cache is never flushed or refreshed. This is similar to what I mentioned in bug 463245 comment 20. This layout does not adhere to the computeSize/layout methods contract to flush the cache when the flushCache == true. I tried this and it fixes this issue. In bug 463245 comment 20, I mentioned that this broke dragging the toolbars but I do not see any problem on GTK2/GTK3. I will test it on Windows and Mac to make sure.
+1 from me to include in 4.5. I can reproduce the bug on GTK3 only (GTK2 is not affected), the fix makes sense, works on GTK3 and has no visible impact on GTK2. @Tom, Lars - can you please review if you have time, we need a second +1?
(In reply to Andrey Loskutov from comment #5) > +1 from me to include in 4.5. I can reproduce the bug on GTK3 only (GTK2 is > not affected), the fix makes sense, works on GTK3 and has no visible impact > on GTK2. > > @Tom, Lars - can you please review if you have time, we need a second +1? I suggested a minor change in the review, but if that is adjusted +1 from me.
(In reply to Andrey Loskutov from comment #5) > @Tom, Lars - can you please review if you have time, we need a second +1? Done, feel free to merge.
Gerrit change https://git.eclipse.org/r/46994 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=eeb7a74f1699f48df5de1ced578ff14e8f05ca08
Thanks Marc-Andre.