|Re: Cut,Copy commands enabledWhen [message #917329 is a reply to message #916664]
||Thu, 20 September 2012 02:01
|| Jeeeyul Lee
Registered: July 2009
Yes, that should be most logical way.|
But I want you to consider advantage of command/menuContribution/core-expression and it's cost.
Remarkable Advantages are:
* Lazy: Can creates UI(menu/toolbar) without class loading, so no plugin will be started, no dependencies are resolved till handler will work.
* Extensible: 3rd party can extends menu or can modify behavior of command in specific context.
* Ease to manage: You can list all actions from plugin.xml, it's pretty good entry point to manage or co-operate then hard coded.
If an action which should not have to be initialized lazy(Declarative UI from plugin.xml first and load business logic later, it prevents plugin starting to just create UI)
or it has globally same policy(there is no chance to extended by client or co-worker),
or actions are reasonable in some specific view or editors only (initializing part causes expensive plugin start),
then There is no advantage with command/menuContribution/core-expression.
In your case, ui context is much more complex then business logic.
And your variable provider from service extension should start your plugin. (it's expensive since it has own dependencies)
So, to make advantage real, you should isolate service plugin which provides variables.
And publishing new variables and teach them to your co-worker or client is not so small task.
Powered by FUDForum
. Page generated in 0.12477 seconds