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

Bug 338909

Summary: ModifyModulesComposite of NewServerWizard functionality has a static member defined called font. It gets disposed when wizard is closed.
Product: [WebTools] WTP ServerTools Reporter: Girish Balre <grkumar>
Component: wst.serverAssignee: Elson Yuen <eyuen7>
Status: NEW --- QA Contact: Angel Vera <arvera>
Severity: major    
Priority: P3 CC: eyuen7, Michael_Rennie
Version: 1.5   
Target Milestone: Future   
Hardware: PC   
OS: Windows XP   
Whiteboard: plan_draft_331

Description Girish Balre CLA 2011-03-04 05:21:11 EST
Build Identifier: 3.6

ModifyModulesComposite of NewServerWizard functionality has a static member defined called font. It gets disposed when wizard is closed.

So suppose we have a NewServer wizard open and we have some functionality to open a NewServer wizard again from within the existing NewServer wizard as a child wizard to this wizard, when the child wizard is closed the static member of ModifyModulesComposite i.e., font is disposed of. So when the control comes to the parent wizard and it tries to access the same member, because it is disposed of IllegalArgumentException is thrown.
 

Reproducible: Always

Steps to Reproduce:
1. Create your own server using WTP.
2. Make a project which have the module which can be deployed on your server type.
2. Have a hyperlink in one of your new server wizard fragments to open the NewServer wizard as a child wizard to the current wizard. This you can do by crating an instance of NewServerWizardAction and calling run method.
3. Now make any server from this child wizard and complete it. 
4. Now when returned back to the parent wizard, do all the necessary stuff for declaring your server and come to the last page known as "Add and Remove". It is used to add modules. As you created a project from your server type in step 2, a module will be shown on the left hand side tree of the wizard page.
5. Click on Add all button shown in the middle.
6. An IllegalArgumentException is thrown.