Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 501543

Summary: Many undesirable menu entries in random places
Product: [Technology] Egerrit Reporter: Pascal Rapicault <pascal>
Component: DashboardAssignee: Project Inbox <egerrit-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: critical    
Priority: P3 CC: eclipse, lmcbout, marc.khouzam, matthias.sohn, mistria, psuzzi, twolf
Version: 1.1.0   
Target Milestone: 1.2   
Hardware: All   
OS: All   
See Also: https://git.eclipse.org/r/81244
https://git.eclipse.org/c/egerrit/org.eclipse.egerrit.git/commit/?id=0b3d796e305d1d5a2359ba96dda47ed67ed05380
Whiteboard:
Attachments:
Description Flags
Picture of the problem
none
submenus 1
none
submenus 2
none
submenus 3 none

Description Pascal Rapicault CLA 2016-09-15 17:29:06 EDT
I'm running Oxygen M2, EGerrit 1.1.0.657 (can be obtained from the Eclipse Market place or from http://download.eclipse.org/egerrit/updates/release), EGit 4.4

Steps to reproduce the issue:
- Open the EGerrit dashboard (Gerrit dashboard view)
- Run a query to get a list of reviews loaded
- Go to the package explorer
- Select a java project (which is connected to a Git repo)
- Go back to the EGerrit Dashboard
- Right click on a review

The popup menu contains a number of entries, two of which are undesirable which I suspect are contributed by Team (Team and Compare with).
Comment 1 Pascal Rapicault CLA 2016-09-15 17:31:32 EDT
Created attachment 264186 [details]
Picture of the problem
Comment 2 Pascal Rapicault CLA 2016-09-15 17:34:21 EDT
The same happens on Neon.1
Comment 3 Matthias Sohn CLA 2016-09-15 18:31:06 EDT
Created attachment 264189 [details]
submenus 1
Comment 4 Matthias Sohn CLA 2016-09-15 18:31:29 EDT
Created attachment 264190 [details]
submenus 2
Comment 5 Matthias Sohn CLA 2016-09-15 18:31:54 EDT
Created attachment 264191 [details]
submenus 3
Comment 6 Matthias Sohn CLA 2016-09-15 18:33:41 EDT
looks like these undesirable menu entries are EGit menus
Comment 7 Matthias Sohn CLA 2016-09-15 18:34:25 EDT
I could reproduce the same problem with EGit latest master
Comment 8 Matthias Sohn CLA 2016-09-15 18:35:57 EDT
Thomas, Max: could you have a look ?
Comment 9 Pascal Rapicault CLA 2016-09-15 18:37:03 EDT
Thanks for the investigation Matthias!
Comment 10 Mickael Istria CLA 2016-09-16 02:18:17 EDT
I'm raising priority here as this is the kind of issue that's is critical for the IDE usability (although not necessarily for EGit itself).
Comment 11 Max Hohenegger CLA 2016-09-16 03:47:09 EDT
I will have a look at the Gitflow menu contributions.
Pascal, do the "Team" and "Compare With" sub menus in the EGerrit view also show Gitflow menu entries?
Comment 12 Matthias Sohn CLA 2016-09-16 05:23:58 EDT
(In reply to Max Hohenegger from comment #11)
> I will have a look at the Gitflow menu contributions.
> Pascal, do the "Team" and "Compare With" sub menus in the EGerrit view also
> show Gitflow menu entries?

yes, they do, see the screenshots I attached
Comment 13 Thomas Wolf CLA 2016-09-16 08:36:12 EDT
This is an Egerrit bug. They need to set a SelectionProvider in their Gerrit dashboard. Class /org.eclipse.egerrit.dashboard.ui/src/org/eclipse/egerrit/internal/dashboard/ui/views/GerritTableView.java, line 313, add "getSite().setSelectionProvider(fViewer);".
Comment 14 Thomas Wolf CLA 2016-09-16 09:06:15 EDT
BTW, without a selection provider in that Gerrit dashboard, I can also make it display other menu entries that do not come from EGit. For instance:

* Create a Java project (outside of any git repo; just a plain Java project in the workspace)
* Create a class with a "main" method
* Have the Gerrit dashboard open and populated
* Go to the outline view, select the "main" function
* Right-click on some change in the Gerrit Dashboard.

I get an extra menu entry "Compare With->API Baseline..." in the context menu of the Gerrit dashboard. (Even though in my runtime eclipse, there are no API baselines configured.)
Comment 15 Eclipse Genie CLA 2016-09-16 09:36:36 EDT
New Gerrit change created: https://git.eclipse.org/r/81244
Comment 17 Lars Vogel CLA 2016-09-16 12:10:43 EDT
*** Bug 501544 has been marked as a duplicate of this bug. ***
Comment 18 Pascal Rapicault CLA 2016-11-04 10:03:18 EDT
This has been fixed as part of 1.1.1