Package org.eclipse.core.runtime

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


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

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

    /* User might have cancelled the operation */
    if (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 (monitor.isCanceled()) {
      Activator.safeLogInfo("Cancelled: Database Defragmentation"); //$NON-NLS-1$
View Full Code Here

    while (r >= 0) {
      out.write(BUFFER, 0, r);
      total += r;
      if (total >= lastTotal + 8192) {
        lastTotal = total;
        progress.subTask(NLS.bind(msg, Integer.toString(lastTotal / 1024)));
      }
      progress.worked(r);
      // if size is not known, use infinite logarithmic progress
      if (size <= 0)
        progress.setWorkRemaining(DEFAULT_DOWNLOAD_SIZE);
View Full Code Here

      else if (name.endsWith("tar.gz")) { //$NON-NLS-1$
        File tarFile = File.createTempFile("runtime", ".tar"); //$NON-NLS-1$ //$NON-NLS-2$
        tarFile.deleteOnExit();
        String tarName = name;
       
        progress.subTask(NLS.bind(Messages.InstallableRuntime2_TaskUncompressing, tarName));
        int tempSize = Integer.MAX_VALUE;
        if (temp.length() < Integer.MAX_VALUE)
          tempSize = (int)temp.length();
       
        ungzip(in, tarFile, progress.newChild(250), tempSize);
View Full Code Here

    BufferedInputStream bin = new BufferedInputStream(in);
    ZipInputStream zin = new ZipInputStream(bin);
    ZipEntry entry = zin.getNextEntry();
    while (entry != null) {
      String name = entry.getName();
      progress.subTask(NLS.bind(Messages.InstallableRuntime2_TaskUncompressing, name));
      if (archivePath != null && name.startsWith(archivePath)) {
        name = name.substring(archivePath.length());
        if (name.length() > 1)
          name = name.substring(1);
      }
View Full Code Here

    try {
      TarInputStream zin = new TarInputStream(bin);
      TarEntry entry = zin.getNextEntry();
      while (entry != null) {
        String name = entry.getName();
        progress.subTask(NLS.bind(Messages.InstallableRuntime2_TaskUncompressing, name));
        if (archivePath != null && name.startsWith(archivePath)) {
          name = name.substring(archivePath.length());
          if (name.length() > 1)
            name = name.substring(1);
        }
View Full Code Here

        throw new OperationCanceledException();
      }
      IFile protoFile = protoFile(delta.getUri(), project);
      subMonitor.worked(1);
      if (protoFile != null) {
        subMonitor.subTask("Compiling " + protoFile.getName() + " with protoc");
        generateSingleProto(commandBuilder.buildCommand(protoFile), protoFile);
      }
      subMonitor.worked(1);
    }
    if (compilerPreferences.refreshResources()) {
View Full Code Here

                throws InvocationTargetException {
                try {
                    SubMonitor subMonitor = SubMonitor.convert(monitor,
                        "Copy local resources... ", 300);

                    subMonitor.subTask("Clearing History...");
                    project.clearHistory(subMonitor.newChild(100));

                    subMonitor.subTask("Refreshing Project");
                    project.refreshLocal(IResource.DEPTH_INFINITE,
                        subMonitor.newChild(100));
View Full Code Here

                        "Copy local resources... ", 300);

                    subMonitor.subTask("Clearing History...");
                    project.clearHistory(subMonitor.newChild(100));

                    subMonitor.subTask("Refreshing Project");
                    project.refreshLocal(IResource.DEPTH_INFINITE,
                        subMonitor.newChild(100));

                    if (baseProject == null) {
                        subMonitor.subTask("Creating Project...");
View Full Code Here

                    subMonitor.subTask("Refreshing Project");
                    project.refreshLocal(IResource.DEPTH_INFINITE,
                        subMonitor.newChild(100));

                    if (baseProject == null) {
                        subMonitor.subTask("Creating Project...");
                        project.create(subMonitor.newChild(50));

                        subMonitor.subTask("Opening Project...");
                        project.open(subMonitor.newChild(50));
                    } 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.