Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 150180

Summary: [Actions] Make it possible to access an IAction prior to run(...) or selectionChanged(...)
Product: [Eclipse Project] Platform Reporter: Tobias Langner <tobias-spam00>
Component: UIAssignee: Paul Webster <pwebster>
Status: RESOLVED WONTFIX QA Contact:
Severity: enhancement    
Priority: P5 CC: alex, nlmarco, pombredanne
Version: 3.2Keywords: helpwanted
Target Milestone: 3.3   
Hardware: PC   
OS: Linux-GTK   
Whiteboard:

Description Tobias Langner CLA 2006-07-10 13:12:11 EDT
It would be nice to have a possibility to access an IAction within an IViewActionDelegate already when the GUI creates it. Right now, one can only get it, when the methods run(...) or selectionChanged(...) of IViewActionDelegate are triggered.

I'd recommend to create an interface IViewActionDelegate2 subclassing IViewActionDelegate and providing an init(IViewPart, IAction) method or something like that.

The same applies to IWorkbenchActionDelegate.

Why do we need this?

Besides the selection, there are many events that require to programatically modify the Action (e.g. setEnabled(...)). For example, when using the RCP in a client-server-environment, an object might be modified on the server affecting the action's status or requiring the icon to be changed on the client side.

Yours sincerely,

  Tobias Langner
Comment 1 Philippe Ombredanne CLA 2006-07-22 14:47:49 EDT
I understand the rationale, but I wonder if that would be worth doing things on actions as they winding down being replaced by commands.
May be commands can already help there?
Comment 2 Paul Webster CLA 2006-09-28 11:01:46 EDT
There are currently no plans to work on this feature.

PW
Comment 3 Denis Roy CLA 2007-06-22 09:33:29 EDT
Changes requested on bug 193523
Comment 4 Paul Webster CLA 2007-06-22 14:37:47 EDT
This item has been fixed/superceded by the menu contribution mechanism - bug
154130

For commands, enablement is controlled by the handler and other properties for UI elements like label or icon can be refreshed by a request to ICommandService.

PW