final Project project = DataKeys.PROJECT.getData(e.getDataContext());
ProgressManager.getInstance().run(new IvyIdeaResolveBackgroundTask(project, e) {
public void doResolve(final @NotNull ProgressIndicator indicator) throws IvySettingsNotFoundException, IvyFileReadException, IvySettingsFileReadException {
clearConsole(myProject);
final IvyManager ivyManager = new IvyManager();
Collection<IntellijDependencyResolver> resolvers = new ArrayList<IntellijDependencyResolver>();
for (final Module module : IntellijUtils.getAllModulesWithIvyIdeaFacet(project)) {
getProgressMonitorThread().setIvy(ivyManager.getIvy(module));
indicator.setText2("Resolving for module " + module.getName());
final IntellijDependencyResolver resolver = new IntellijDependencyResolver(ivyManager);
resolver.resolve(module);
resolvers.add(resolver);