Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » actions declaratively or programmatically?
actions declaratively or programmatically? [message #460560] Thu, 21 December 2006 18:10 Go to next message
Eclipse UserFriend
I've seen actions being created declaratively in the plugin.xml and
programmatically by extending the ActionBarAdvisor.

Is there a reason for choosing one over the other. On a related note is
it possible to call the Eclipse Exit action declaratively.

Thanks in advance.
-sudhakar
Re: actions declaratively or programmatically? [message #460597 is a reply to message #460560] Fri, 22 December 2006 10:17 Go to previous message
Eclipse UserFriend
There are a couple of reasons to go either way.

declarative:
1. we can delay loading object (and hence plugins)
2. the different flavours of actions, like actionSets
3. declarative actions can be hidden by activities

programmatic:
1. contributing an action when a specific object is known ... like your
view gets instantiated and you want to target it

I would go with declarative actions, unless you need to skip out and do
programmatic actions.

Also keep in mind in 3.2.x that the more behaviour you implement with
Commands/Handlers, the better off you are.

In 3.3 there is more declarative power for placing commands in menu
items and toolbars, plus more support for placing a dynamic contribution
in a menu.

http://wiki.eclipse.org/index.php/Menu_Item_Placement_Exampl es

Later,
PW
Previous Topic:Details on new workbench menu support in 3.3M4
Next Topic:create toolbar buttons runtime
Goto Forum:
  


Current Time: Wed Mar 26 10:37:54 EDT 2025

Powered by FUDForum. Page generated in 0.03800 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top