English 中文(简体)
Adding Help Contents, Search Help using Command Framework
原标题:

My colleagues and I are building a new RCP application and trying to find our footing in RCP. My coworker managed to get the Eclipse Help framework working pretty quickly - but he used the old style Actions and ActionBarAdvisor.makeActions() to do it. All of the RCP Menu creation tutorials I ve read (the ones that were written post Eclipse 3.3 anyway) advocate depreciating Actions and switching over completely to Commands. So I m trying to do this. However, I cannot get the help Commands to work - not without using the help actions.

Specifically, I m attempting to figure out how to add the default Eclipse help menu commands org.eclipse.ui.help.helpContents and org.eclipse.ui.help.helpSearch to my help menu. I ve created the menu contribution, and added the commands. But they remain greyed out. I can t find any mention of anything else I have to do to hook them up to the help framework my coworker had working before using actions. If I add the actions for them and register them in make Action, they still work. But I m trying to do this without Actions. How is this done? What am I not doing?

最佳回答

According to the Command tutorial on vogella.de some common commands need some ActionFactories registered:

Standard commands sometimes map to actions which are contributed via ActionFactory in the class ApplicationActionBarAdvisor. If the ActionFactory returns an IAction you need to register this action. If not these commands are inactive in your menu. For example the following made the reset perspective and welcome command active.

I think, this might be the case with the Help command as well - but I have not tested it. The other possibility would be that there is no enabled handler for the command...

问题回答

暂无回答




相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签