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

Bug 210566

Summary: [Wizards] [NewWizard] Object selection not sent to wizard if wizard is created directly with command parameter
Product: [Eclipse Project] Platform Reporter: Philipp Kursawe <phil.kursawe>
Component: UIAssignee: Tod Creasey <Tod_Creasey>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: remy.suen
Version: 3.4Keywords: helpwanted
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Philipp Kursawe CLA 2007-11-21 13:37:50 EST
Build ID: I20070621-1340

Steps To Reproduce:
Create a command for showing the NewWizard with a specific wizardID as paramater and the selection of the workbench is not passted to the wizard init method.

More information:
When WizardHandler.java discovers that a wizardId has been provided to the command, then it creates the wizard with an empty selection. Is that intentionally? Cause when the wizard is created using the wizard chooser the current workbench selection is actually delivered to the wizard.

Code from WizardHandler.java:
if (wizardId == null) {
			IAction wizardAction = createWizardChooserDialogAction(activeWindow);
			wizardAction.run();
		} else {
.
.
.
wizard.init(PlatformUI.getWorkbench(), StructuredSelection.EMPTY);
}
Comment 1 Remy Suen CLA 2007-11-21 14:16:30 EST
See bug 202170.
Comment 2 Tod Creasey CLA 2007-11-21 14:34:16 EST

*** This bug has been marked as a duplicate of bug 202170 ***