Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 39060 - [Contributions] interactions: API to add menus programmatically
Summary: [Contributions] interactions: API to add menus programmatically
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P3 enhancement with 1 vote (vote)
Target Milestone: 3.3   Edit
Assignee: Paul Webster CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 29709
Blocks:
  Show dependency tree
 
Reported: 2003-06-18 06:28 EDT by Tom Hofmann CLA
Modified: 2007-06-20 13:19 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Hofmann CLA 2003-06-18 06:28:44 EDT
I would like to be able to contribute a menu (or actions) programmatically.

I want to add a submenu to a context menu from a plugin, but will only find out 
how many entries it will have when my plug-in is loaded.

AFAIK, there is no API for doing programmatically what can be accomplished by 
the following XML:

   <extension
         point="org.eclipse.ui.popupMenus">
      <viewerContribution
            targetID="#CompilationUnitRulerContext"
            id="QuickDiffTest.CompilationUnitEditorContribution">
         <menu
               label="%quickdiff.menu.label"
               id="quickdiff.menu">
         </menu>
      </viewerContribution>
   </extension>


See also http://dev.eclipse.org/newslists/news.eclipse.tools/msg31798.html
Comment 1 Michael Van Meekeren CLA 2006-04-21 13:56:25 EDT
Moving Dougs bugs
Comment 2 Paul Webster CLA 2007-04-05 19:02:33 EDT
Assigning to component owner
PW
Comment 3 Paul Webster CLA 2007-06-20 13:19:19 EDT
This item has been fixed/superceded by the menu contribution mechanism - bug 154130

The menu can be added and a dynamic element inserted from the XML.

PW