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

Bug 206403

Summary: [Progress] IProgressConstants.ACTION_PROPERTY should be commands based
Product: [Eclipse Project] Platform Reporter: Min Idzelis <min123>
Component: UIAssignee: Prakash Rangaraj <prakash>
Status: VERIFIED FIXED QA Contact: Prakash Rangaraj <prakash>
Severity: normal    
Priority: P3 CC: phil.kursawe, pwebster, remy.suen, Tod_Creasey
Version: 3.3.1Keywords: helpwanted
Target Milestone: 3.6 M3   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Patch v01
none
Patch v02
none
Patch v03 none

Description Min Idzelis CLA 2007-10-15 20:46:05 EDT
Build ID: Eclipse 3.3

Steps To Reproduce:
Jobs are typically not-UI based. To allow some code to be executed on completion of an Action from the UI view, you need to use an Action and IProgressConstants class. This code is in eclipse.ui plugin. It would be great if instead of an IAction, an  org.eclipse.core.commands.Command could be specified instead.
Comment 1 Susan McCourt CLA 2009-07-09 19:38:22 EDT
As per http://wiki.eclipse.org/Platform_UI/Bug_Triage_Change_2009
Comment 2 Prakash Rangaraj CLA 2009-07-12 08:34:31 EDT
Paul,

    Would it be better to create a COMMAND_PROPERTY than to use the same constant?
Comment 3 Paul Webster CLA 2009-07-12 08:56:29 EDT
(In reply to comment #2)
>     Would it be better to create a COMMAND_PROPERTY than to use the same
> constant?

I think that's a good idea.  Since this is opt-in anyway, we would make the new API explicit.

PW

Comment 4 Prakash Rangaraj CLA 2009-07-23 14:19:26 EDT
*** Bug 284453 has been marked as a duplicate of this bug. ***
Comment 5 Prakash Rangaraj CLA 2009-09-03 14:03:11 EDT
Created attachment 146431 [details]
Patch v01

Rough cut. Need some cleanup.
Comment 6 Prakash Rangaraj CLA 2009-09-23 15:13:44 EDT
Created attachment 147924 [details]
Patch v02

Little better version and now with a test (finally :-))
Comment 7 Paul Webster CLA 2009-09-24 07:49:36 EDT
I think it looks good (especially to include the test :-)

The only thing I would consider is the object you are using as a command property.  The action property is an IAction, should the command property be a ParameterizedCommand?  If you don't accept parameterized commands you could never do a showView(ConsoleView), for example.

PW
Comment 8 Prakash Rangaraj CLA 2009-09-29 08:08:47 EDT
Created attachment 148315 [details]
Patch v03

Looks like I attached a wrong file for Patch v02 :-( 

Never mind. Here is v3 supporting ParameterizedCommands instead of Command ids as Paul suggested.
Comment 9 Prakash Rangaraj CLA 2009-10-07 12:59:00 EDT
Patch v03 released to HEAD
Comment 10 Prakash Rangaraj CLA 2009-10-27 13:29:20 EDT
Verified in I20091027-0100