简体   繁体   English

如何为Eclipse RCP 4应用程序创建定制命令?

[英]How to create custom commands for my Eclipse RCP 4 application?

I'm writing an e4 application and I'm trying to create a custom command but the documentation is somehow lacking details. 我正在编写一个e4应用程序,并试图创建一个自定义命令,但是文档在某种程度上缺少细节。 I have a toolbar with a check button on it and what I want to achieve is to have a command which has a boolean parameter which tells my handler whether the check button is checked or not. 我有一个带有检查按钮的工具栏,而我想要实现的是拥有一个带有布尔参数的命令,该参数告诉我的处理程序是否选中了检查按钮。

I tried the visual model editor but I can only hard code parameters there. 我尝试使用可视模型编辑器,但只能在其中硬编码参数。 Do I have to implement the MCommand interface or there is some simpler solution? 我必须实现MCommand接口还是有一些更简单的解决方案? Can you point me in the right direction? 你能为我指出正确的方向吗?

Lets take a look of the following Link. 让我们看一下以下链接。
Commands, Handlers, Menus, Toolbars and Popups 命令,处理程序,菜单,工具栏和弹出窗口

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM