Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » How to integrate EGit into a mixed e3/e4 RCP application(How can I call an EGit handler from a custom popup menu to bring up a compare window?)
How to integrate EGit into a mixed e3/e4 RCP application [message #1777875] Tue, 05 December 2017 14:11
Wernke zur Borg is currently offline Wernke zur BorgFriend
Messages: 23
Registered: December 2011
Junior Member
In a mixed e4/e3 RCP application I would like to bring up the EGit compare view from a custom popup menu item.

I have experimentally found out that EGit adds its menu contribution ("Compare with", "Replace with", ...) to any popup menu invoked on a StructuredSelection containing IResource objects or objects adaptable to IResource. This is nice, but I need to provide my own custom popup menu with only a subset of the options and with custom menu labels.

If I define my own popup menu in plugin.xml referring to the EGit handlers, I am getting both the standard EGit menu contribution plus my own menu. The question here is how could I suppress the EGit menu?

My preferred option would be an own popup menu in a fragment.e4xmi with an own e4 handler, but the question is how to call the e3 EGit handler from my e4 handler. I have tried to call the EGit CompareUtils directly but they are restricted API and not exported. I can work around that by overriding access rules in Eclipse, but I do not really want to do that in a product.

Why are the CompareUtils not exported API?

Does anybody have an idea how to invoke the CompareUtils.Compare...() methods either directly or through the EGit Handler classes, but without showing the EGit menu contribution?

Thanks for any hint.
Wernke
Previous Topic:Eclipse can't download update
Next Topic:How to ignore .ssh/config?
Goto Forum:
  


Current Time: Sun Sep 23 21:34:53 GMT 2018

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

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

Back to the top