Community
Participate
Working Groups
Created attachment 248188 [details] duplicated icons Breakpoins view - Debug Perspective The Actions icons duplicated when the view is not the default and focused and then we click on reset perspective menu option How to reproduce : 1- Run Eclipse 4.4.1 or 4.4.0 2- Change to debug perspective 3- Select Breakpoins view (Breakpoins focused) 4- Go to Window -> Reset Perspective... 5- Reopen the Breakpoins view Expected: We have the same icons before the reset Actual : all the action icons duplicated (see the attached) Important notes : 1- this bug not reproduced on 4.3 2- this bug reproduced on all perspective with the above steps and when the view not the default on in the perspective 3- with my own perspective also reproduced when I build the view using code also with plugin.xml tags
Menu items in view menu are duplicated as well. Repeating provided steps adds another set of duplicated icons and menu items. A workaround is to close and reopen the view.
Hi I investigate deeply on this issue and I have some finds: This bug reproduced just when we use org.eclipse.ui.viewActions extension point for the view tool bar actions instead of org.eclipse.ui.menus and org.eclipse.ui.commands , as you see in the attached project "test" plugin.xml I added view "SampleView" under Java Perspective with two actions one using the viewActions "duplecated" and the Other using menuContribution "No duplication" . then when I tried to reproduce the bug , just the viewActions action icon duplicated. Also from the eclipse docs I noted that the viewActions deprecated "WARNING: This extension point is DEPRECATED. Do not use this extension point, it will be removed in future versions of this product. Instead, use the extension point org.eclipse.ui.commands You can now use org.eclipse.ui.menus to place commands in menus and toolbars as well. " Important questions : 1- what the main difference between viewActions and menuContribution ? 2- is there any plan to change eclipse views like Project Explorer , Debug breakpoints , Navigator ..etc to use menuContribution instead viewActions ? if this solution the right one? please advice ? Thanks
Created attachment 248201 [details] Duplication icons test project
Hi Any updates ? is there any chance to create a patch or mention the root cause for this issue to create our own local patch , unfortunately am still debugging with no results until now , please advice ? Thanks
This bug has been introduced with commit http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=1c012e53763fb76d851642928fd1ccb7d9844deb which was a fix for bug 425928.
Hi I don't follow you sorry , How this commit related to my reported bug ? do you have a chance to take a look to the attached plugin project ? Thanks
(In reply to Wojciech Sudol from comment #5) > This bug has been introduced with commit > http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/ > ?id=1c012e53763fb76d851642928fd1ccb7d9844deb which was a fix for bug 425928. Hi I don't follow you sorry , How this commit related to my reported bug ? do you have a chance to take a look to the attached plugin project ? Thanks
(In reply to Wojciech Sudol from comment #5) > This bug has been introduced with commit > http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/ > ?id=1c012e53763fb76d851642928fd1ccb7d9844deb which was a fix for bug 425928. Hi I checked out the source code for org.eclipse.e4.ui.workbench.renderers.swt StackRenderer.java and I changed the code as below but icon duplication bug still reproduced , please advice ? if (needsTB) { part.getToolbar().setVisible(true); newViewTB = (ToolBar) renderer.createGui(part.getToolbar(),ctf.getTopRight(), part.getContext()); if (newViewTB == null) { adjusting = false; return; } newViewTB.moveAbove(null); newViewTB.pack(); } Thanks
Hi I am trying to resolve this bug by adding a code for ignoring the duplicated items depend on item "id" in ContributionManager class @ itemAdded method please find the attached patch, please advice if this patch accepted or we should solve it in a different way ? Thanks
Created attachment 248531 [details] ContibutionManager patch
Created attachment 248533 [details] ContributionManeger patch
(In reply to Wael Mashal from comment #8) > I checked out the source code for org.eclipse.e4.ui.workbench.renderers.swt > StackRenderer.java and I changed the code as below but icon duplication bug > still reproduced , please advice ? Did you test this change with IDE or with your project? It works fine for me with IDE. Anyway a more complex fix is necessary to avoid reintroducing bug 425928. I will try to take a look at your patch this week.
(In reply to Wojciech Sudol from comment #12) > (In reply to Wael Mashal from comment #8) > > I checked out the source code for org.eclipse.e4.ui.workbench.renderers.swt > > StackRenderer.java and I changed the code as below but icon duplication bug > > still reproduced , please advice ? > > Did you test this change with IDE or with your project? It works fine for me > with IDE. Anyway a more complex fix is necessary to avoid reintroducing bug > 425928. I will try to take a look at your patch this week. Yes , its work fine , and I have two local patches version now for 4.4.0 and 4.4.1
(In reply to Wael Mashal from comment #13) > (In reply to Wojciech Sudol from comment #12) > > (In reply to Wael Mashal from comment #8) > > > I checked out the source code for org.eclipse.e4.ui.workbench.renderers.swt > > > StackRenderer.java and I changed the code as below but icon duplication bug > > > still reproduced , please advice ? > > > > Did you test this change with IDE or with your project? It works fine for me > > with IDE. Anyway a more complex fix is necessary to avoid reintroducing bug > > 425928. I will try to take a look at your patch this week. > > Yes , its work fine , and I have two local patches version now for 4.4.0 and > 4.4.1 I mean my patch works fine , :-)
(In reply to Wael Mashal from comment #14) > I mean my patch works fine , :-) And I meant the code from comment 8 :) . Anyway, could you push your patch to Gerrit - https://wiki.eclipse.org/Platform_UI/How_to_Contribute#Creating_a_Gerrit_review_or_a_patch ?
(In reply to Wojciech Sudol from comment #15) > (In reply to Wael Mashal from comment #14) > > I mean my patch works fine , :-) > > And I meant the code from comment 8 :) . Anyway, could you push your patch > to Gerrit - > https://wiki.eclipse.org/Platform_UI/ > How_to_Contribute#Creating_a_Gerrit_review_or_a_patch ? Yes I commit to master , but I face an issue with pushing I Got this Message http://wmashalu5i@git.eclipse.org/gitroot/platform/eclipse.platform.ui.git: git-receive-pack not permitted
It looks like an URL to Git repository - not Gerrit. Did you follow the article mentioned in the link from comment 15? You can find more information about Gerrit configuration here: https://wiki.eclipse.org/EGit/Contributor_Guide#Using_Gerrit_at_Eclipse .
*** Bug 448865 has been marked as a duplicate of this bug. ***
(In reply to Wojciech Sudol from comment #17) > It looks like an URL to Git repository - not Gerrit. Did you follow the > article mentioned in the link from comment 15? You can find more information > about Gerrit configuration here: > https://wiki.eclipse.org/EGit/Contributor_Guide#Using_Gerrit_at_Eclipse . Yes, and I used Gerrit before , the commit Message ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Bug 448873 - [Perspectives] [Contributions] View Actions Icons Duplication after Reset Perspectives The Actions icons duplicated when the view is not the default and focused and then we click on reset perspective menu option Change-Id: I0000000000000000000000000000000000000000 Signed-off-by: wmashalu5i <Wael.mashal@softwareag.com> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ <Changed ID auto generated> but when I click on Commit and Push button I got the Error <See attached>
Created attachment 248685 [details] Commit and Push Message
Created attachment 248686 [details] Commit and Push Error Message
I've uploaded the (modified) patch: https://git.eclipse.org/r/39074
(In reply to Andrey Loskutov from comment #22) > I've uploaded the (modified) patch: https://git.eclipse.org/r/39074 According to Paul the patch is not OK: "For legacy reasons, it's perfectly valid to have 2 IContributionItems with the same ID in one ContributionManager, as long as they're not the same ICI instance." I also agree that the problem should be fixed at the root. I've played now how this duplication happens. 1) if one creates perspective with a single breakpoints view, the buttons aren't duplicated on reset. 2) if one creates perspective with a the variables and breakpoints views next to each other (not in the same stack), the buttons aren't duplicated on reset. 3) if one creates perspective with a the variables and breakpoints views behind (in the same stack): 3.1) if the breakpoints view is visible the buttons aren't duplicated on reset. 3.2) if the breakpoints view is NOT visible the buttons ARE duplicated on reset. So the problem can be reproduced only by resetting perspective while the view is hidden behind other views. Visible views aren't affected. The fixes for bug 383569 and bug 420956 (https://git.eclipse.org/r/39349) aren't affecting this behavior, so this is most likely not a page/window/toolbar/coolbar issue but the org.eclipse.ui.internal.e4.compatibility.ActionBars problem. I will try to debug it.
(In reply to Wojciech Sudol from comment #5) > This bug has been introduced with commit > http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/ > ?id=1c012e53763fb76d851642928fd1ccb7d9844deb which was a fix for bug 425928. That's true. Reverting this change fixes this issue. CompatibilityView.createPartControl() installs IContextFunction on the view to populate the view's toolbar via actionBuilder.readActionExtensions(getView()) and this happens now *twice*. Details: ### StackRenderer.adjustTopRight() is called now twice (on StackRenderer.showTab() and on ActionBars.updateActionBars()) and inside the adjustTopRight() renderer is asked to create toolbar's GUI: if (needsTB && part != null && part.getObject() != null) { part.getToolbar().setVisible(true); newViewTB = (ToolBar) renderer.createGui(part.getToolbar(), ctf.getTopRight(), part.getContext()); ToolBarManagerRenderer.postProcess() checks if there is POST_PROCESSING_FUNCTION installed and finds the IContextFunction from CompatibilityView, which is then called. This function lets ViewActionBuilder to read and contribute extensions to the view toolbar => therefore only "legacy" contributions are affected. ### One can fix it in the CompatibilityView so that IContextFunction computes the toolbar contributions only once, but I'm not sure if this is the right solution because it still not a fix for the root cause, also one of the POST_PROCESSING_DISPOSE callbacks will be then lost (even if they aren't used yet at all). Anyway, next try: https://git.eclipse.org/r/39352
Fixed in 4.5 M5 via https://git.eclipse.org/r/39352.