eclipse 插件开发中 org.eclipse.ui.menus扩展点的locationURI详细介绍

Eclipse菜单:

menu:help?after=addtions

menu:navigate?after=open.ext2

menu:window?after=newEditor

menu:file?after=open.ext

 

org.eclipse.ui.menus属性

  1.  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 toDescriptionUri

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
  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值