Eclipse开发高手请进!

chenyun2000 chenyun2000 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
使用org.eclipse.ui.popupMenus来创建视图中的弹出菜单
<extension
point="org.eclipse.ui.popupMenus">
<viewerContribution
targetID="com.xqtu.fileexplorer.views.ExplorerView"
id="com.xqtu.fileexplorer.views.popupMenu">
<action
label="&Run"
icon="icons/run.gif"
class="com.xqtu.fileexplorer.actions.RunViewAction"
style="push"
state="false"
menubarPath="additions"
id="com.xqtu.fileexplorer.views.popMenu.RunAction"/>
</viewerContribution>
</extension>
其中com.xqtu.fileexplorer.views.ExplorerView是视图类的ID,com.xqtu.fileexplorer.actions.RunViewAction实现IViewActionDelegate接口
但是运行程序却没有弹出菜单,是否需要其它设置来激活?

另外,使用扩展如org.eclipse.ui.viewActions、org.eclipse.ui.actionSets实现的菜单、工具条中Action的属性如label、tooltip、enable等是否可以根据上下文而改变?比如工具条上的某个按钮初始是灰化的,在具体操作时才激活?如何实现?
提供帮助、启示者都给分!
...全文

相关推荐

评论 12
收藏 已收藏
分享
返回顶部
chenyun2000
Eclipse 58,440 成员 49,457 内容