How to always enable command handler in Egit [message #1442291] |
Fri, 10 October 2014 22:43 |
Ruhong Cai Messages: 4 Registered: October 2014 |
Junior Member |
|
|
In Egit, ..... when right click the project, then click "Show in History", the history View shows the list of all commits, select one commit, right click , the pop up menu shows (Checkout, Create Branch, Create Tag, .....Revision Comment). What I need to do is to add a new item in this pop up menu called "Add To Factory", then when click it , go to "AddToFactoryHandler" to do the implementation.
I want this menu item always there when right click the commit in history View.
<extension point="org.eclipse.ui.menus">
<menuContribution locationURI="popup:org.eclipse.egit.ui.historyPageContributions">
<command defaultHandler="xxxxxxxxxxx.AddToFactoryHandler"
commandId="xxxxxxxxxx.AddToFactory"
label="Add To Factory"
style="push" >
</command>
</menuContribution>
</extension>
<extension point="org.eclipse.ui.handlers">
<handler class="xxxxxxxxxxx.AddToFactoryHandler"
commandId="xxxxxxxxxx.AddToFactory">
</handler>
</extension>
Then in history view, the first time I select any commit, right click , the popup menu shows grayed out "Add To Factory". then the second time, right click , it goes away.
I do appreciate any help .. Thanks!
[Updated on: Fri, 10 October 2014 22:45] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.01302 seconds