use of org.knime.workbench.ui.wizards.imports.WorkflowImportWizard in project knime-core by knime.
the class ImportKnimeWorkflowAction method run.
/**
* Invoke the Import wizards selection Wizard.
*/
@Override
public void run() {
WorkflowImportWizard wizard = new WorkflowImportWizard();
WizardDialog dialog = new WizardDialog(Display.getDefault().getActiveShell(), wizard);
IStructuredSelection selectionToPass;
// get the current workbench selection
ISelection workbenchSelection = m_workbenchWindow.getSelectionService().getSelection();
if (workbenchSelection instanceof IStructuredSelection) {
selectionToPass = (IStructuredSelection) workbenchSelection;
if (selectionToPass.size() == 1) {
Object o = selectionToPass.getFirstElement();
if (o instanceof IContainer) {
wizard.setInitialDestination((IContainer) o);
}
}
}
dialog.open();
}
Aggregations