Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.SubProgressMonitor.beginTask()


    DiagramEditPart part = editor.getDiagramEditPart();
   
    // save this image if there is something in it
    if (part.getChildren().size() > 0) {
      IProgressMonitor saveMonitor = new SubProgressMonitor(monitor, 1);
      saveMonitor.beginTask("Saving container " + part.resolveSemanticElement(), 1 + formats.size());
      for (ImageFileFormat format : formats) {
        IPath destination = generateImageDestination(container, format);
        monitor.subTask("Saving image " + destination.lastSegment() + " ( " + format.getName() + ")");
        CopyToImageUtil img = getCopyToImageUtil();
        img.copyToImage(part, destination, format, new SubProgressMonitor(monitor, 1));
View Full Code Here


   
    // do parent
    super.doExport(targetDiagram, container, new SubProgressMonitor(monitor, 70));
   
    IProgressMonitor finalMonitor = new SubProgressMonitor(monitor, 30);
    finalMonitor.beginTask("Writing HTML files", partDestinationMap.size() * 2);
   
    // get all image parts
    for (DiagramEditPart root : partDestinationMap.keySet()) {
      if (monitor.isCanceled())
        return;
View Full Code Here

    SubProgressMonitor subMonitor = new SubProgressMonitor(monitor, 9);
    try {
      Assert.isNotNull(this.project);
      IPath reposPath = ToolProjectSupport.getLocalReposFolders(project).getLocation().append(this.reposName);
      File reposFile = reposPath.toFile();
      subMonitor.beginTask("Creating local repository", 9);
      subMonitor.subTask(this.reposName);
      rpcreate(reposPath).waitFor();
      subMonitor.worked(5);
      // logger
      subMonitor.subTask("Setting default log flags");
View Full Code Here

    SubProgressMonitor subMonitor = new SubProgressMonitor(monitor, 100);
    try {
      Assert.isNotNull(this.project);
      Assert.isNotNull(this.repos);
      Assert.isNotNull(this.wexFile);
      subMonitor.beginTask("Importing WEX " + this.wexFile, 100);
      consumeWex().waitFor();
      subMonitor.worked(100);

    } catch (InterruptedException e) {
      reportError(e);
View Full Code Here

            pm.beginTask("", 3); //$NON-NLS-1$
            ITypeHierarchy hierarchy= type.newSupertypeHierarchy(new SubProgressMonitor(pm, 1));
           
            IProgressMonitor subPm= new SubProgressMonitor(pm, 2);
            List<IType> typeList= Arrays.asList(hierarchy.getAllSupertypes(type));
            subPm.beginTask("", typeList.size()); //$NON-NLS-1$
            Set<IType> types= new HashSet<IType>(typeList);
            for (Iterator iter= typeList.iterator(); iter.hasNext();) {
                IType superType= (IType)iter.next();
                IType[] superTypes= getAllSuperTypes(superType, new SubProgressMonitor(subPm, 1));
                types.addAll(Arrays.asList(superTypes));
View Full Code Here

              new MethodSearchRequestor.MethodDeclarationsSearchRequestor();
            SearchEngine searchEngine = new SearchEngine();

            IProgressMonitor monitor = new SubProgressMonitor(
                progressMonitor, 5, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL);
            monitor.beginTask("Searching for declaration of " + methodName +
                (project != null ? " in " + project.getProject().getName() : ""), 100);
            IJavaSearchScope searchScope = getSearchScope(project);
            int matchType = !isConstructor ? IJavaSearchConstants.METHOD : IJavaSearchConstants.CONSTRUCTOR;
            SearchPattern pattern = SearchPattern.createPattern(
                methodName,
View Full Code Here

     
            SearchEngine searchEngine = new SearchEngine();

            IProgressMonitor monitor = new SubProgressMonitor(progressMonitor, 5, SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK);
           
            monitor.beginTask("Searching for calls to " + methodName + (project != null ? " in " + project.getProject().getName() : ""), 100);
           
            IJavaSearchScope searchScope = getSearchScope(project);
           
            // This is kind of hacky: we need to make up a string name for the search to work right
           
View Full Code Here

            SearchRequestor searchRequestor = new MethodSearchRequestor.MethodDeclarationsSearchRequestor();
            SearchEngine searchEngine = new SearchEngine();

            IProgressMonitor monitor = new SubProgressMonitor(
                    progressMonitor, 5, SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK);
            monitor.beginTask("Searching for calls to " +
                    methodName + (project != null ? " in " + project.getProject().getName() : ""), 100);           
            IJavaSearchScope searchScope = getSearchScope(project);
            // This is kind of hacky: we need to make up a string name for the search to work right
            log("Looking for " + methodName);
            int matchType = !isConstructor ? IJavaSearchConstants.METHOD : IJavaSearchConstants.CONSTRUCTOR;
View Full Code Here

    if (monitor.isCanceled()) {
      return;
    }
   
    IProgressMonitor subMonitor = new SubProgressMonitor(monitor, 1);
    subMonitor.beginTask(HyLauncherMessages.getString("HyVMRunner.Launching_virtual_machine..._1"), 2); //$NON-NLS-1$
    subMonitor.subTask(HyLauncherMessages.getString("HyVMRunner.Constructing_command_line..._2"));   //$NON-NLS-1$
   
    File workingDir = getWorkingDir(config);
    String location= getJDKLocation();
    String program = constructProgramString(location, config);
View Full Code Here

      datapath.add(instrs[i].getMetaDataFile().toOSString());
      monitor.worked(1);
      if (format == HTML_FORMAT) {
        ISourceLocation[] srcs = instrs[i].getClassFiles().getSourceLocations();
        IProgressMonitor srcmonitor = new SubProgressMonitor(monitor, 1);
        srcmonitor.beginTask("", srcs.length); //$NON-NLS-1$
        for (int j = 0; j < srcs.length; j++) {
          srcs[j].extract(new SubProgressMonitor(srcmonitor, 1));
          sourcepath.add(srcs[j].getPath().toOSString());
        }
        srcmonitor.done();
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.