Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Is it possible to extend a context menu that is created programmatically by RTC?

 Hi, I'd like to add an "Restore" item to the history view of RTC. Unlucky, after debugging, I found the context menu is created programmactically by "com.ibm.team.process.internal.ide.ui.history.ProcessHistoryPage" and no matter how I config my plugin.xml, the new item will only appear in the eclipse common context menu. I know this is a eclipse development question, but wanna to check with you experts to see if there's any solution. Thanks in advance!

Attach my plugin.xml here as well
<extension
         point="org.eclipse.ui.popupMenus">
      <objectContribution
            objectClass="com.ibm.team.process.common.IProcessContainer"
            id="SimplePopupMenu.contribution1">
         <action
               label="Restore"
               class="processtemplaterestore.popup.actions.NewAction"
               menubarPath="additions"
               enablesFor="1"
               id="SimplePopupMenu.newAction">
         </action>
      </objectContribution>
   </extension>

0 votes



One answer

Permanent link
 Let me clarify my question with more details. In the RTC component, it creates the popup menu in following way

MenuManager menuMgr = new MenuManager("#PopupMenu");
Action openFile = new Action(....);
menuMgr.add(openFile);
Action compare = new Action(...);
menuMgr.add(compare);
Menu menu = menuMgr.createContextMenu(fViewer.getControl());
fViewer.getControl().setMenu(menu);

so that no matter how I configure my plugin.xml, my menu item won't appear in this context menu. Is it possible to write a plugin with startup extension to change this popup menu during startup? or any other way to add my item in this menu?

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,941

Question asked: Apr 27 '15, 3:13 a.m.

Question was seen: 2,795 times

Last updated: Apr 27 '15, 11:59 p.m.

Confirmation Cancel Confirm