0

I have a wizard called "ui.wizard.new.project" which will be launched by the command service framework programmatically like below. However, how do I pass parameters to the "ui.wizard.new.project" wizard under this framework?

IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
ICommandService commandService = (ICommandService) window.getService(ICommandService.class);
IHandlerService handlerService = (IHandlerService)window.getService(IHandlerService.class);
org.eclipse.core.commands.Command newProjectCmd = commandService.getCommand("org.eclipse.ui.newWizard");
IParameter param = newProjectCmd.getParameter("newWizardId");
Parameterization parm = new Parameterization(param, "ui.wizard.new.project");
ParameterizedCommand parmCommand = new ParameterizedCommand(newProjectCmd, new Parameterization[] { parm });
handlerService.executeCommand(parmCommand, null);

Thanks.

greg-449
  • 109,219
  • 232
  • 102
  • 145
zqzwxec
  • 51
  • 4

1 Answers1

0

There is no way to pass parameters to the wizard through the command parameters.

The only input to wizard is the IWorkbenchWizard.init method call with the workbench and the current selection.

greg-449
  • 109,219
  • 232
  • 102
  • 145