facebook

How to add actions to the XML Editor context menu?

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #218270 Reply

    I’m creating a plugin to perform additional actions by adding my action to the context menu of the XML editor. I’m adding a viewerContribution that looks for a targetID of #EditorContext, and this all works correctly whenusing the default Eclipse XML editor.

    However, under MyEclipse my action is not added to the XML editors context menu… probably because the context menu id is incorrect. I’ve tried #Popup and #PopupMenu to no avail. What is the magic targetID so I can add my action to the XML Editor context menu?

    I’m running Eclipse 3.0.1 and MyEclipse 3.8.2.

    Here’s a snippet of the plugin XML that I’m using that works with the default XML editor:

    <extension
    point=”org.eclipse.ui.popupMenus”>
    <viewerContribution
    targetID=”#EditorContext”
    id=”HierarchyViewer”>
    <action
    label=”Show Framework Hierarchy”
    class=”common.XMLHierarchyAction”
    menubarPath=”additions”
    id=”hierarchyAction”/>
    </viewerContribution>

    Thanks for any info!

    Steve

    #218282 Reply

    Scott Anderson
    Participant

    Steve,

    Try:

    
    targetID="#TextEditorContext"
    
Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: How to add actions to the XML Editor context menu?

You must be logged in to post in the forum log in