Examples of subTask()


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

            }
          }, IResource.DEPTH_INFINITE);
          IProgressMonitor subMonitor = SubMonitor.convert(monitor, components.size());
          for (IFile file : components){
            String key = file.getParent().getName() + "." + file.getName().substring(0, file.getName().lastIndexOf('.'));
            subMonitor.subTask(key);
            RepositoryComponent comp = list.get(key);
            if (comp != null) {
              RepositoryPropertiesManager.addRepositoryStateProperty(file, comp.getState());
            } else {
              RepositoryPropertiesManager.addRepositoryStateProperty(file, RepositoryComponent.NOT_IN_REPOSITORY);
View Full Code Here

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

    IProgressMonitor monitor= createProgressMonitor();
    monitor.beginTask(SSEUIMessages.ContentAssist_computing_proposals, getProposalCategories().size() + 1);

    CompletionProposalInvocationContext context = createContext(viewer, offset);

    monitor.subTask(SSEUIMessages.ContentAssist_collecting_proposals);
    List proposals = collectProposals(viewer, offset, monitor, context);

    monitor.subTask(SSEUIMessages.ContentAssist_sorting_proposals);
    List filtered = filterAndSortProposals(proposals, monitor, context);
    fNumberOfComputedResults= filtered.size();
View Full Code Here

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

    CompletionProposalInvocationContext context = createContext(viewer, offset);

    monitor.subTask(SSEUIMessages.ContentAssist_collecting_proposals);
    List proposals = collectProposals(viewer, offset, monitor, context);

    monitor.subTask(SSEUIMessages.ContentAssist_sorting_proposals);
    List filtered = filterAndSortProposals(proposals, monitor, context);
    fNumberOfComputedResults= filtered.size();

    ICompletionProposal[] result= (ICompletionProposal[]) filtered.toArray(new ICompletionProposal[filtered.size()]);
    monitor.done();
View Full Code Here

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

    clearState();

    IProgressMonitor monitor= createProgressMonitor();
    monitor.beginTask(SSEUIMessages.ContentAssist_computing_contexts, getProposalCategories().size() + 1);

    monitor.subTask(SSEUIMessages.ContentAssist_collecting_contexts);
    List proposals= collectContextInformation(viewer, offset, monitor);

    monitor.subTask(SSEUIMessages.ContentAssist_sorting_contexts);
    List filtered= filterAndSortContextInformation(proposals, monitor);
    fNumberOfComputedResults= filtered.size();
View Full Code Here

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

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

      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

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

    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

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

      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

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

    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

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

    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
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.