Community
Participate
Working Groups
I'm not 100 % what our guidelines are for putting something in the right-click menu of an editor but Team feels definitely misplaced.
(In reply to Lars Vogel from comment #0) > I'm not 100 % what our guidelines are for putting something in the > right-click menu of an editor but Team feels definitely misplaced. I agree, but this comes from EGit (I don't see it when using CVS). Note that it appears in the left and the right ruler.
Matthias, can you remove the EGit Team entries from the ruler?
The code looks OK, to fix this bug one must restrict the menu NOT to show in particular popup, because currently it should be added to every popup with "additions" group: <menuContribution locationURI="popup:org.eclipse.ui.popup.any?after=additions"> <menu id="team.main" label="%TeamMenu.label"> It would be nice to add some restrictions, like: <visibleWhen> <not> <equals value="#AbstractTextEditorRulerContext"> </equals> </not> </visibleWhen> but how one can check in which context menu the entry is shown? Ideas? Or should we restrict egit menu only to be shown in few known "explorers"? I was not involved in the original design decisions and it would be nice to know why the menu was contributed to every "additions" popup.
(In reply to Andrey Loskutov from comment #3) > but how one can check in which context menu the entry is shown? Ideas? Look at the Eclipse CVS plug-in which does it correctly.
The correct approach would be to use <extension point="org.eclipse.ui.popupMenus"> <objectContribution which makes sure the menu (only) appears when the selection contains the targeted object(s).
Adding Thomas, how fixed a similar issue in EGerrit, via https://git.eclipse.org/r/#/c/81244/
(In reply to Lars Vogel from comment #6) > Adding Thomas, how fixed a similar issue in EGerrit, via > https://git.eclipse.org/r/#/c/81244/ That was a completely different case :-) Re comment #5: I'm not fond at all of using officially deprecated extension points. (And they've been deprecated for quite some while already.) Anyway: in this case EGit *does* contribute its items only when the edited file as determined from the IEditorInput is indeed in a git repository. So it does already make sure "the menu (only) appears when the selection contains the targeted object(s)." I think Andrey had the right idea: exclude it specifically for the "#AbstractTextEditorRulerContext" menu id. The menu id can be tested using <with variable="activeMenu">.
New Gerrit change created: https://git.eclipse.org/r/81395
Gerrit change https://git.eclipse.org/r/81395 was merged to [stable-4.5]. Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=d4a9be808decaee72119ba6f0d21f6f0c8c6cf54