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

Bug 122772

Summary: [Wizards] NewWizardAction would be able to customize the title and description of the opened wizard
Product: [Eclipse Project] Platform Reporter: Jerome Gout <jerome.gout>
Component: UIAssignee: Prakash Rangaraj <prakash>
Status: VERIFIED FIXED QA Contact: Prakash Rangaraj <prakash>
Severity: enhancement    
Priority: P3 CC: bokowski, paulslau
Version: 3.1.1Keywords: helpwanted
Target Milestone: 3.6 M6   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 110714    
Attachments:
Description Flags
Patch.
none
Patch v02 none

Description Jerome Gout CLA 2006-01-05 11:30:57 EST
At the moment, it possible to restrict the content of the New wizard to a given category of elements using the org.eclipse.ui.actions.NewWizardAction.
Nevertheless, it is impossible to change the title neither the description of the wizard that is open by the action.
It would be much more user friendly that instances of NewWizardAction that are usually displayed in the New sub menu like "XXXX..." open a wizard with a title such as "New XXXX".
This the case for projects where an action "Project..." pops up a wizard titled "New Project". It has not be implemented using NewWizardAction due to this limitation (I guess). The solution has been to put the setting of the correct wizard title in NewWizard.init() according to an internal flag that is set in the NewProjectAction.run() method.

This enhancement is required in TPTP (see #110714).
Comment 1 Paul Slauenwhite CLA 2009-02-23 10:12:06 EST
Is there any status on this RFE?
Comment 2 Boris Bokowski CLA 2009-02-23 12:18:24 EST
Would you be able to contribute a patch? See http://wiki.eclipse.org/Platform_UI/How_to_Contribute
Comment 3 Paul Slauenwhite CLA 2009-02-23 13:12:35 EST
(In reply to comment #2)
> Would you be able to contribute a patch? See
> http://wiki.eclipse.org/Platform_UI/How_to_Contribute
> 

Unfortunately, no given the resources constraints on our project (TPTP).
Comment 4 Boris Bokowski CLA 2009-11-26 16:20:21 EST
Prakash is now responsible for watching bugs in the [Wizards] component area.
Comment 5 Paul Slauenwhite CLA 2010-02-01 08:16:06 EST
(In reply to comment #1)
> Is there any status on this RFE?

Any new updates?
Comment 6 Prakash Rangaraj CLA 2010-02-01 12:40:04 EST
(In reply to comment #5)
> Any new updates?

  Nothing much. This is not in plan. We can definitely consider if a patch is submitted.
Comment 7 Paul Slauenwhite CLA 2010-02-01 14:55:03 EST
Created attachment 157829 [details]
Patch.
Comment 8 Paul Slauenwhite CLA 2010-02-01 14:56:12 EST
(In reply to comment #6)
> (In reply to comment #5)
> > Any new updates?
> 
>   Nothing much. This is not in plan. We can definitely consider if a patch is
> submitted.

Patch attached.  Please add to the Eclipse 3.6 plan.
Comment 9 Prakash Rangaraj CLA 2010-02-02 01:27:11 EST
Created attachment 157870 [details]
Patch v02

(In reply to comment #8)
> Patch attached.  Please add to the Eclipse 3.6 plan.

   Revised patch with tests. Does this solves your problem?
Comment 10 Paul Slauenwhite CLA 2010-02-02 06:48:54 EST
(In reply to comment #9)
> Created an attachment (id=157870) [details]
> Patch v02
> 
> (In reply to comment #8)
> > Patch attached.  Please add to the Eclipse 3.6 plan.
> 
>    Revised patch with tests. Does this solves your problem?

Not exactly.  We require an API to get the wizard window title.
Comment 11 Prakash Rangaraj CLA 2010-02-03 00:46:05 EST
(In reply to comment #10)
> Not exactly.  We require an API to get the wizard window title.

    The default values of the window title is not determined by the action, but the wizard itself at the time of opening. The getter method doesn't correctly return the value in the default case. I don't think it should be a part of the API. You should either store the value else where before/after setting the window title in the action or retrieve it from the shell (as done in the test case)
Comment 12 Paul Slauenwhite CLA 2010-02-03 05:57:07 EST
(In reply to comment #11)
> (In reply to comment #10)
> > Not exactly.  We require an API to get the wizard window title.
> 
>     The default values of the window title is not determined by the action, but
> the wizard itself at the time of opening. The getter method doesn't correctly
> return the value in the default case. I don't think it should be a part of the
> API. You should either store the value else where before/after setting the
> window title in the action or retrieve it from the shell (as done in the test
> case)

Agreed.  Thanks.
Comment 13 Prakash Rangaraj CLA 2010-02-04 05:06:57 EST
Patch v02 released to HEAD
Comment 14 Prakash Rangaraj CLA 2010-03-10 00:15:33 EST
Verified in I20100309-0100