Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.SubMonitor.worked()


    IProject targetProject = workspace.getRoot().getProject(PPUiConstants.PPTP_TARGET_PROJECT_NAME);
    ensureTargetProjectConfiguration(monitor);
    IProject[] projects = workspace.getRoot().getProjects();
    SubMonitor ticker = SubMonitor.convert(monitor, projects.length);
    PROJECTS: for(IProject p : projects) {
      ticker.worked(1);
      // skip the target project itself, do not want to create a circular dependency
      if(p.equals(targetProject))
        continue;
      if(!p.isAccessible())
        continue;
View Full Code Here


                statuses[i++] = convert(project, monitor);
            } else {
                // project was closed before job started.
                statuses[i++] = Status.OK_STATUS;
            }
            sub.worked(1);
        }
       
       
        return new MultiStatus(MavenCorePlugin.PLUGIN_ID, 0, statuses, "Result of converting legacy maven projects", null);
    }
View Full Code Here

            javaProject.setRawClasspath(newClasspath.toArray(new IClasspathEntry[0]), sub);
        } catch (Exception e) {
            return new Status(IStatus.ERROR, MavenCorePlugin.PLUGIN_ID, "Failed to convert " + project.getName(), e);
        }
           
        sub.worked(1);
        return new Status(IStatus.OK, MavenCorePlugin.PLUGIN_ID, "Converted " + project.getName());
    }


    /**
 
View Full Code Here

      try {
        monitor.beginTask(DataTransferMessages.WizardProjectsImportPage_CreateProjectsTask, 100);
        if (!project.exists()) {
          project.create(newDesc, new SubProgressMonitor(monitor, 30));
          project.open(IResource.BACKGROUND_REFRESH, new SubProgressMonitor(monitor, 70));
          sub.worked(30);
        }
        else {
          sub.worked(30);
          return new Status(IStatus.ERROR, WizardPlugin.PLUGIN_ID, NLS.bind("Project {0} already exists.",
              project.getName()));
View Full Code Here

          project.create(newDesc, new SubProgressMonitor(monitor, 30));
          project.open(IResource.BACKGROUND_REFRESH, new SubProgressMonitor(monitor, 70));
          sub.worked(30);
        }
        else {
          sub.worked(30);
          return new Status(IStatus.ERROR, WizardPlugin.PLUGIN_ID, NLS.bind("Project {0} already exists.",
              project.getName()));
        }
      }
      catch (CoreException e) {
View Full Code Here

      }
      catch (InterruptedException e) {
        return new Status(IStatus.OK, WizardPlugin.PLUGIN_ID,
            NLS.bind("Import of {0} interrupted", projectName));
      }
      sub.worked(70);

      // clean up after self
      deleteRecursive(importSource.getParentFile());
    }
View Full Code Here

    catch (CoreException e) {
      return new Status(IStatus.ERROR, WizardPlugin.PLUGIN_ID, NLS.bind(
          "Error: Could not copy project files from {0} to {1}", downloadDirectory.getAbsoluteFile(),
          projectWorkspaceDirectory.getAbsoluteFile()));
    }
    sub.worked(50);

    File newPomFile = projectPath.append("pom.xml").toFile();
    if (!newPomFile.exists()) {
      monitor.done();
      return new Status(IStatus.ERROR, WizardPlugin.PLUGIN_ID, NLS.bind("Error: Pom file not found at",
View Full Code Here

      // though we can't make a maven project from it
      creationStatus = new Status(IStatus.WARNING, WizardPlugin.PLUGIN_ID, NLS.bind(
          "Error: Maven is not installed, cannot create a project from {0}", pomFile));

    }
    sub.worked(50);
    // clean up after self
    deleteRecursive(pomFile.getParentFile().getParentFile());
    return creationStatus;
  }
View Full Code Here

       
        SubMonitor sub = SubMonitor.convert(monitor, 100);
        if (legacyProjects == null) {
            legacyProjects = findLegacyProjects();
        }
        sub.worked(30);
        if (legacyProjects.size() > 0) {
            LegacyProjectConverter converter = new LegacyProjectConverter(legacyProjects);
            if (converter.askToConvert(shell, enableToggle)) {
                return converter.convert(sub.newChild(70));
            }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.