Skip to main content



      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 12:54 Go to next message
Eclipse UserFriend
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 03:53 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: Invasion of context menu by Team, Compare With, ... [message #1828603 is a reply to message #1828596] Sun, 14 June 2020 13:49 Go to previous message
Eclipse UserFriend
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: Sat Jul 05 11:20:30 EDT 2025

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

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

Back to the top