edit this page - page history - about editing

Enabling an Eclipse Popup Menu for only Certain File Extensions

Eclipse

If you are providing a right click menu for Eclipse like so:

<extension point="org.eclipse.ui.popupMenus">
  <objectContribution
    adaptable="false"
    id="org.openiaml.model.codegen.objectContribution1"
    objectClass="org.eclipse.core.resources.IResource">
  ...
</extension>

It is easy to only enable this for particular file extensions (e.g. "*.iaml") with a wildcarded name filter:

<extension point="org.eclipse.ui.popupMenus">
  <objectContribution
    adaptable="false"
    id="org.openiaml.model.codegen.objectContribution1"
    nameFilter="*.iaml"
    objectClass="org.eclipse.core.resources.IResource">
  ...
</extension>

Categories: Eclipse | Java | Technology
edit this page - what links to here? - page history - top
Last edited by jevon jevon 109 months ago