return new Status(IStatus.ERROR, IvyPlugin.ID, IStatus.ERROR,
"Unable to get the list of available java projects", e);
}
List containers = new ArrayList();
for (int i = 0; i < projects.length; i++) {
IvyClasspathContainer cp = IvyClasspathUtil
.getIvyClasspathContainer(projects[i]);
if (cp != null) {
containers.add(cp);
}
}
monitor.beginTask("Resolve all dependencies", containers.size());
for (Iterator iter = containers.iterator(); iter.hasNext();) {
if (monitor.isCanceled()) {
return Status.CANCEL_STATUS;
}
SubProgressMonitor subMonitor = new SubProgressMonitor(monitor, 1);
IvyClasspathContainer cp = (IvyClasspathContainer) iter.next();
cp.launchResolve(false, true, subMonitor);
}
return Status.OK_STATUS;
}
};