遇到在plugin.xml中配置好了Menu. Command, Handlers.. 后. Menu, Toolbar 怎么都是灰的..其中原因如下
1. command没有绑定handlers..包括default handlers 也没配置的话,因为没有handler处理。menu一定是灰的..
2. 后来在default handler绑定后,又创建新的handler并指向了command..但是仍然是灰的。一开始以为是冲突。又再在default handler绑定系统的abouthandler..并将新创建的删掉后。menu终于不是灰的了。
3. 经过研究。原来灰的原因是:创建新的handler后时create的class. 里面有一个function是
public boolean isEnabled() {
// TODO Auto-generated method stub
return false;
}
里面返回是false..一直没理解作用。后来把这个function返回是true..
menu终于不是灰的了..
特此纪录
相关推荐
ins Chapter 9 ■ Working with plug-ins in Eclipse Appendix A ■ Java perspective menu reference Appendix B ■ CVS installation procedures Appendix C ■ Plug-in extension points Appendix...
- **Creating Custom Plug-ins**: Step-by-step guide on how to create custom plug-ins using the Eclipse Plug-in Development Environment (PDE). - **Sample Plug-ins**: Examples of simple plug-ins to ...
- **新建项目**:在Eclipse中选择“文件”->“新建”->“其他”,然后选择“Eclipse RCP and Plug-ins”类别下的“RCP Application”项目类型。 - **配置项目**:按照向导的提示完成配置,包括选择项目名称、指定...
1.Download and install the Eclipse Example Plug-ins. The Eclipse Example Plug-ins are available on the same download page as the Eclipse SDK. Look for the section titled Example Plug-ins. You can ...
3. **禁用插件**:在Eclipse中,通过“Window” -> “Preferences” -> “Plug-in Development” -> “Installed Plug-ins”查看已安装的插件,尝试禁用可能导致问题的插件,然后重启Eclipse。 4. **更新或回滚...
插件(Plug-ins) - **定义**:每个插件都代表了一组特定的功能集合,这些功能可以扩展其他插件的能力。 - **分类**:插件可以是用户界面(UI)相关的,也可以是非UI的。 - **结构**:每个插件都有自己的`plugin.xml...
- 项目创建完成后,通过"Run As > Eclipse Application"运行项目,此时会在Eclipse的工作台中看到新添加的"Sample Menu",点击其中的"Sample Action",将显示一个对话框,表明插件已成功运行。 4. **导出插件** -...