Eclipse菜单:
menu:help?after=addtions
menu:navigate?after=open.ext2
menu:window?after=newEditor
menu:file?after=open.ext
org.eclipse.ui.menus属性
- locationURI ---------- 标识用户界面中与该菜单项关联的命令将要出现的位置。
locationURI="[scheme]:[identifier]?[argument-list]"
locationURI属性被分解为三个清晰的部分:模式(scheme)、标识符(identifier)和参数列表(argument list)
scheme标识添加项将要添加至的UI对象的类型。它可以是以下值的其中这一:
- menu———程序主菜单或视图下拉菜单
- popup———视图或编辑器的上下文菜单
- toolbar———程序主工具栏或视图中的工具栏
identifier定义了将要添加至的菜单、弹出项或工具栏的唯一标识符。一些常用的标识符包括:
- org.eclipse.ui.main.menu———Eclipse主菜单的标识符
- org.eclipse.ui.main.toolbar———Eclipse主工具栏的标识符
- org.eclipse.ui.popup.any———任意上下文菜单的标识符。
agrument list。参数列表由可以是"before"或"after"的布局,一个等号(“=”),以及菜单 、弹出项或工具栏的一些项的标识符组成。标识符也可以是“additions”,表示元素应当被放置于给定菜单、弹出项或工具栏的默认位置 ("="等号后面可以接着一个acitonID,这样子就布局到这个action的后面,实现分组布局)。
Contribution to | Description | Uri |
---|---|---|
Application menu | Displays the command in the menu of the application | menu:org.eclipse.ui.main.menu |
Application toolbar | displays the command in the toolbar of the application | toolbar:org.eclipse.ui.main.toolbar |
View toolbar | displays the command in the toolbar of the view | toolbar:viewId - For example to display a menu to view with the Id "View1" use "toolbar:View1". |
Context menu / pop-up | Command is displayed in a context menu, e.g., right mouse click on an object | popup:ID |
Status Bar | displays the command in the status bar of the applicatoin. | toolbar:org.eclipse.ui.trim.status |