eclipse中的Menu,toolbar path

本文详细介绍了如何在Eclipse中创建一个简单的插件,并通过修改菜单路径和工具栏路径将自定义的动作添加到不同的位置。具体包括:在编辑菜单后添加菜单项、不指定位置则默认添加至附加项、添加至帮助启动菜单、文件导入路径等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

create a hello world plug-in in eclipse.
1. if you want to add a menu after "Edit" menu, change the path to "Edit"
2. if you do not want to set the menu location in eclipse main menu, just leave it empty or set it to "additions"
3. if you want to add this action to "help/helpStart", change the menubarPath of "Sample Action" to "help/helpStart"
4. if you want to add this action to "file/import.ext", change the menubarPath of "Sample Action" to "file/import.ext"
5. if you want to add this action to debug action set in main toolbar, change the the toolbarPath of "Sample Action" to "org.eclipse.debug.ui.launchActionSet/debug"
   then if you start the plugin, and try to drag debug action set, the "Sample Action" will move with the debug action set
6. if you want to add this action to debug action set in main toolbar, change the the toolbarPath of "Sample Action" to "org.eclipse.debug.ui.launchActionSet/external"
   then if you start the plugin, you will see the "Sample Action" and debug action set seperated with a separeator,
   try to drag debug action set, the "Sample Action" will move with the debug action
7. if you want to add this action additions set in main toolbar, change the the toolbarPath of "Sample Action" to "additions"

   then if you start the plugin, and try to drag debug action set, the "Sample Action" will not move with the debug action set

In one words:

A complete menu path is simply "menu name/group name."
A complete toolbar path is simply "action set ID/toolbar group name."

org.eclipse.ui.menus
http://help.eclipse.org/helios/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2Fworkbench_cmd_menus.htm
Menu and toolbar paths
http://help.eclipse.org/helios/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2Fworkbench_menupaths.htm
Eclipse Platform Extension Points
http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fextension-points%2Findex.html
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值