in org.apache.easyant4e/src/org/apache/easyant4e/wizards/EasyAntImportWizardPage.java [531:568]
public boolean createProjects() {
final Object[] selected = projectsList.getCheckedElements();
WorkspaceModifyOperation op = new WorkspaceModifyOperation() {
protected void execute(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
try {
monitor.beginTask("", selected.length); //$NON-NLS-1$
if (monitor.isCanceled()) {
throw new OperationCanceledException();
}
for (int i = 0; i < selected.length; i++) {
createExistingProject((ProjectRecord) selected[i], new SubProgressMonitor(monitor, 1));
}
} finally {
monitor.done();
}
}
};
// run the new project creation operation
try {
getContainer().run(true, true, op);
} catch (InterruptedException e) {
return false;
} catch (InvocationTargetException e) {
// one of the steps resulted in a core exception
Throwable t = e.getTargetException();
Activator.getEasyAntPlugin().log(IStatus.ERROR, t.getMessage(), t);
String message = "Cannot import project";
IStatus status;
if (t instanceof CoreException) {
status = ((CoreException) t).getStatus();
} else {
status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, 1, message, t);
}
ErrorDialog.openError(getShell(), message, null, status);
return false;
}
return true;
}