Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Invasion of context menu by Team, Compare With, ...(Want to block other plugins adding to my context menu)
Invasion of context menu by Team, Compare With, ... [message #1828588] Sat, 13 June 2020 16:54 Go to next message
Steve Vestal is currently offline Steve VestalFriend
Messages: 16
Registered: March 2013
Junior Member
I am creating a context menu for a tree view. Some other plugin is adding items to that context menu, specifically adding menu items for:

Team
Compare With
Replace With
Source
Validate

This may not happen immediately on start, but as soon as I switch to a view such as Project Explorer and back, they appear. My context menu does have a unique id assigned.

How do I insure that only the menu items that I put on my context menu appear?

(If this is not the proper forum, can someone suggest one that might help?)
Re: Invasion of context menu by Team, Compare With, ... [message #1828596 is a reply to message #1828588] Sun, 14 June 2020 07:53 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31909
Registered: July 2009
Senior Member
This isn't really an EGit question because all kinds of things generally get added to popup/context menus. I'm not sure how you are creating the menu but probably you are calling org.eclipse.ui.IWorkbenchPartSite.registerContextMenu(MenuManager, ISelectionProvider) to register it and that makes it available for all the registered extensions to the popup menu.

To avoid the context menu filling up with things that I don't want, I use a hack like this one:

https://git.eclipse.org/c/oomph/org.eclipse.oomph.git/tree/plugins/org.eclipse.oomph.setup.editor/src/org/eclipse/oomph/setup/presentation/SetupEditor.java#n1850


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Invasion of context menu by Team, Compare With, ... [message #1828603 is a reply to message #1828596] Sun, 14 June 2020 17:49 Go to previous message
Steve Vestal is currently offline Steve VestalFriend
Messages: 16
Registered: March 2013
Junior Member
Worked like a charm, thanks!
Previous Topic:JGit Build Failure by maven
Next Topic:Merging repositories with JGit + altering commit messages
Goto Forum:
  


Current Time: Sun Jun 20 02:15:56 GMT 2021

Powered by FUDForum. Page generated in 0.02197 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top