|Re: Testing and setting workbench button states [message #632696 is a reply to message #632248]
||Wed, 13 October 2010 22:42
Registered: September 2010
Okay, now I understand your question. You were right. In general, the commands API is preferred over the actions API. According to the book Eclipse Plug-ins (Third Edition) at page 215:|
|Commands and actions are two different APIs for accomplishing the same thing: declaring the implementing functions that manifest as menu items and toolbar buttons. The actions API has been around since before Eclipse 3.0, while the commands API has only just solidified as of Eclipse 3.3 with small refinements in Eclipse 3.4. It appears that at some point the actions API will be deprecated, moved into a compatibility layer and in the future removed, but much of the Eclipse tooling still makes extensive use of the actions API, not to mention third party tools and IDEs built on top of the Eclipse infrastructure.|
However GEF has already made some decisions for us, and has done a lot of integration work between actions and GEF commands. For example, your action class, a subclass of GEF WorkbenchPartAction, will have access to your editor class and your GEF command class. No need to say those already defined relationship between many GEF classes in terms of storage and reference as I described in my last post.
I would suggest you to go with GEF design.
Powered by FUDForum
. Page generated in 0.03530 seconds