shell.setActive();
Map<Class< ? extends State>, WorkflowWizardPageProvider> pageMapping=new HashMap<Class<? extends State>, WorkflowWizardPageProvider>();
ResourceSelectionPage resourceSelectionPage = new ResourceSelectionPage(Messages.AddToNewMap_resource_selection_page_title);
resourceSelectionPage.setCollapseCheckedInput(true);
pageMapping.put(ResourceSelectionState.class, new BasicWorkflowWizardPageFactory(resourceSelectionPage));
ResourceSelectionState resourceSelectionState = new ResourceSelectionState();
resourceSelectionState.setServices(services);
Workflow workflow=new Workflow(new State[]{resourceSelectionState});
workflow.setContext(resources);
WorkflowWizard wizard = new WorkflowWizard(workflow, pageMapping);
WorkflowWizardDialog dialog = new WorkflowWizardDialog(Display.getCurrent().getActiveShell(), wizard);
dialog.setBlockOnOpen(true);
dialog.open();
if (dialog.getReturnCode()==IDialogConstants.CANCEL_ID )
return null;
resources=resourceSelectionState.getResources().keySet();
}
return resources;
}