Abbas
Abbas

Reputation: 3294

Eclipse Plug-in:How can I add a new entry ( say after right click->New->Dynamic Web Project) or for that matter any other existing group?

I am using menuContribution in my plugin.xml currently, I know of two ways to add entries into a context menu.

  1. <menuContribution locationURI="popup:common.new.menu?after=additions">

  2. <menuContribution locationURI="popup:common.new.menu?after=new">

But they don't let you add after a specific group as such.

Any inputs will be really helpful.

Thanks, Abbas

Upvotes: 0

Views: 610

Answers (2)

Tonny Madsen
Tonny Madsen

Reputation: 12718

Soe of these menus are special and you normally don't use the menus extension point for these.

The following comes to mind - but there are likely more:

  • "File" -> "New..." - use the newWizard extension point
  • The "New" toolbar bottom - same
  • Navigator context menu "New..." - same
  • "File" -> "Import..." - use the importWizard extension point
  • "File" -> "Export..." - use the exportWizard extension point
  • "Search" menu - use the searchPages extension point
  • "Window" -> "Open Perspective" - use the perspectives extension point
  • "Window" -> "Show View" - use the perspectives extension point
  • Most of the sub-menus of the "Run" menu
  • ....

Upvotes: 1

Alexey Romanov
Alexey Romanov

Reputation: 170815

You can use ID of any contribution item (which is present in the menu you are contributing to) in place of additions or new. additions is just the id of an invisible separator.

Upvotes: 0

Related Questions