Package org.eclipse.core.runtime

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


      this.printStream.println("Print performance results HTML pages:");
      this.printStream.print("  - components main page");
    }
    long start = System.currentTimeMillis();
    subMonitor.setTaskName("Write fingerprints: 0%");
    subMonitor.subTask("Global...");
    printComponent(/*performanceResults, */"global_fp");
    subMonitor.worked(100);
    if (subMonitor.isCanceled()) throw new OperationCanceledException();
    String[] components = this.performanceResults.getComponents();
    int length = components.length;
View Full Code Here


    int step = 1000 / length;
    int progress = 0;
    for (int i=0; i<length; i++) {
      int percentage = (int) ((progress / ((double) length)) * 100);
      subMonitor.setTaskName("Write fingerprints: "+percentage+"%");
      subMonitor.subTask(components[i]+"...");
      printComponent(/*performanceResults, */components[i]);
      subMonitor.worked(step);
      if (subMonitor.isCanceled()) throw new OperationCanceledException();
      progress++;
    }
View Full Code Here

      Activator.safeLogInfo("Cancelled: Database Defragmentation"); //$NON-NLS-1$
      return;
    }

    /* Defrag */
    monitor.subTask(Messages.DBManager_IMPROVING_APP_PERFORMANCE);
    copyDatabase(database, defragmentedDatabase, useLargeBlockSize, monitor);

    /* User might have cancelled the operation */
    if (!useLargeBlockSize && monitor.isCanceled()) {
      Activator.safeLogInfo("Cancelled: Database Defragmentation"); //$NON-NLS-1$
View Full Code Here

      defragmentedDatabase.delete();
      return;
    }

    /* Backup */
    monitor.subTask(Messages.DBManager_CREATING_DB_BACKUP);
    backupService.backup(true, monitor);

    /* User might have cancelled the operation */
    if (!useLargeBlockSize && monitor.isCanceled()) {
      Activator.safeLogInfo("Cancelled: Database Defragmentation"); //$NON-NLS-1$
View Full Code Here

          for(IMavenProjectFacade facade : facades) {
            if(progress.isCanceled()) {
              throw new OperationCanceledException();
            }
            IProject project = facade.getProject();
            subProgress.subTask(NLS.bind(Messages.MavenWtpPreferencePage_Updating_Configuration_For_Project, project.getName()));

            configurationManager.updateProjectConfiguration(project, subProgress);
          }

        } catch(CoreException ex) {
View Full Code Here

        }
       
        try {
            SubMonitor subMonitor = SubMonitor.convert(monitor, 1000);
            subMonitor.beginTask("Generating MyBatis/iBATIS Artifacts:", 1000);
            subMonitor.subTask("Parsing Configuration");
           
            Properties p = propertyset == null ? null : propertyset.getProperties();
           
            ConfigurationParser cp = new ConfigurationParser(p,
                    warnings);
View Full Code Here

        subMonitor.beginTask("Generating MyBatis/iBATIS Artifacts:", 1000);
       
        setClassLoader();
       
        try {
            subMonitor.subTask("Parsing Configuration");

            ConfigurationParser cp = new ConfigurationParser(
                    warnings);
            Configuration config = cp.parseConfiguration(inputFile.getLocation().toFile());
View Full Code Here

        subMonitor.beginTask("Generating MyBatis/iBATIS Artifacts:", 1000);
       
        setClassLoader();
       
        try {
            subMonitor.subTask("Parsing Configuration");

            ConfigurationParser cp = new ConfigurationParser(
                    warnings);
            Configuration config = cp.parseConfiguration(inputFile.getLocation().toFile());
View Full Code Here

        SubMonitor sub = SubMonitor.convert(monitor, selectedLegacyProjects.length);
        IStatus[] statuses = new IStatus[selectedLegacyProjects.length];
        int i = 0;
        for (IProject project : selectedLegacyProjects) {
            if (project.isAccessible()) {
                sub.subTask("Converting " + project.getName());
                if (sub.isCanceled()) {
                    throw new OperationCanceledException();
                }
                statuses[i++] = convert(project, monitor);
            } else {
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.