public void run() {
if (workbenchWindow == null) {
// action has been disposed
return;
}
ImportExportWizard wizard = new ImportExportWizard(ImportExportWizard.IMPORT);
IStructuredSelection selectionToPass;
// get the current workbench selection
ISelection workbenchSelection = workbenchWindow.getSelectionService()
.getSelection();
if (workbenchSelection instanceof IStructuredSelection) {
selectionToPass = (IStructuredSelection) workbenchSelection;
} else {
selectionToPass = StructuredSelection.EMPTY;
}
wizard.init(workbenchWindow.getWorkbench(), selectionToPass);
IDialogSettings workbenchSettings = WorkbenchPlugin.getDefault()
.getDialogSettings();
IDialogSettings wizardSettings = workbenchSettings
.getSection("ImportExportAction"); //$NON-NLS-1$
if (wizardSettings == null) {
wizardSettings = workbenchSettings
.addNewSection("ImportExportAction"); //$NON-NLS-1$
}
wizard.setDialogSettings(wizardSettings);
wizard.setForcePreviousAndNextButtons(true);
Shell parent = workbenchWindow.getShell();
WizardDialog dialog = new WizardDialog(parent, wizard);
dialog.create();
dialog.getShell().setSize(