if (dialog.open() == Window.OK) {
Object firstResult = dialog.getFirstResult();
if (firstResult instanceof IProject) {
found[0] = firstResult;
} else {
found[0] = new CoreException(new StatusInfo(IStatus.ERROR,
"Expected project to be selected."));
}
}
}
});
if (found[0] == null) {
return null;
}
if (found[0] instanceof IProject) {
project = (IProject) found[0];
} else {
if (found[0] instanceof CoreException) {
throw (CoreException) found[0];
} else {
throw new CoreException(new StatusInfo(IStatus.ERROR, "Expected project, found: " + found[0]));
}
}
}
IInterpreterManager pythonInterpreterManager = getInterpreterManager(project);
String projName = project.getName();