开发者

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 g开发者_如何学编程roup as such.

Any inputs will be really helpful.

Thanks, Abbas


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
  • ....


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜