Package org.eclipse.core.runtime

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


    subProgressMonitor.beginTask("building ...", _buildWork);
    Iterator iter = _buildTasks.iterator();
    while (iter.hasNext()) {
      Buildtask thisTask = (Buildtask) iter.next();
      thisTask.doWork(subProgressMonitor);
      subProgressMonitor.worked(thisTask.amountOfWork());
      if (subProgressMonitor.isCanceled()) {
        throw new OperationCanceledException();
      }
    }
    subProgressMonitor.done();
View Full Code Here


        int port= SocketUtil.findFreePort();
        if (port == -1) {
            abort(LaunchingMessages.StandardVMDebugger_Could_not_find_a_free_socket_for_the_debugger_1, null, IJavaLaunchConfigurationConstants.ERR_NO_SOCKET_AVAILABLE);
        }

        subMonitor.worked(1);

        // check for cancellation
        if (monitor.isCanceled()) {
            return;
        }
View Full Code Here

        // check for cancellation
        if (monitor.isCanceled()) {
            return;
        }

        subMonitor.worked(1);
        subMonitor.subTask(LaunchingMessages.StandardVMDebugger_Starting_virtual_machine____4);

        ListeningConnector connector= getConnector();
        if (connector == null) {
            abort(LaunchingMessages.StandardVMDebugger_Couldn__t_find_an_appropriate_debug_connector_2, null, IJavaLaunchConfigurationConstants.ERR_CONNECTOR_NOT_AVAILABLE);
View Full Code Here

                }
                java.util.Date date= new java.util.Date();
                Timestamp ts = new Timestamp(date.getTime());
                IProcess process= newProcess(launch, p, renderProcessLabel(cmdLine), getDefaultProcessMap());
                process.setAttribute(IProcess.ATTR_CMDLINE, renderCommandLineInternal(cmdLine));
                subMonitor.worked(1);
                subMonitor.subTask(LaunchingMessages.StandardVMDebugger_Establishing_debug_connection____5);
                boolean retry= false;
                do  {
                    try {
View Full Code Here

                        }

                        VirtualMachine vm= runnable.getVirtualMachine();
                        if (vm != null) {
                            DroolsDebugModel.newDebugTarget(launch, vm, renderDebugTarget(config.getClassToLaunch(), port), process, true, false, config.isResumeOnStartup());
                            subMonitor.worked(1);
                            subMonitor.done();
                        }
                        return;
                    } catch (InterruptedIOException e) {
                        checkErrorMessage(process);
View Full Code Here

      SubProgressMonitor subMonitor = null;
      try {
        if (monitor != null) {
          subMonitor = new SubProgressMonitor(monitor, 50); // 50% of the time is spent in initializing containers and variables
          subMonitor.beginTask("", 100); //$NON-NLS-1$
          subMonitor.worked(5); // give feedback to the user that something is happening
          manager.batchContainerInitializationsProgress.initializeAfterLoadMonitor.set(subMonitor);
        }
        if (manager.forceBatchInitializations(true/*initAfterLoad*/)) { // if no other thread has started the batch container initializations
          manager.getClasspathContainer(Path.EMPTY, null); // force the batch initialization
        } else { // else wait for the batch initialization to finish
View Full Code Here

          manager.getClasspathContainer(Path.EMPTY, null); // force the batch initialization
        } else { // else wait for the batch initialization to finish
          while (manager.batchContainerInitializations == JavaModelManager.BATCH_INITIALIZATION_IN_PROGRESS) {
            if (subMonitor != null) {
              subMonitor.subTask(manager.batchContainerInitializationsProgress.subTaskName);
              subMonitor.worked(manager.batchContainerInitializationsProgress.getWorked());
            }
            synchronized(manager) {
              try {
                manager.wait(100);
              } catch (InterruptedException e) {
View Full Code Here

      String message = e.getMessage();
      DLTKCore.error(message, e);
      throw new CoreException(new Status(IStatus.ERROR, RutaIdePlugin.PLUGIN_ID,
              ScriptLaunchConfigurationConstants.ERR_INTERNAL_ERROR, message, e));
    }
    mon.worked(1);
    for (File each : inputFiles) {
     
      mon.setTaskName("Processing " + each.getName());
      if(mon.isCanceled()) {
        break;
View Full Code Here

        RutaEngine.removeSourceDocumentInformation(cas);
        RutaEngine.addSourceDocumentInformation(cas, each);

        ae.process(cas);

        mon.worked(1);
       
        if(mon.isCanceled()) {
          break;
        }
       
View Full Code Here

        }
       
        File outputFile = new File(outputDir, each.getName() + ".xmi");
        mon.setTaskName("Saving " + outputFile.getName());
        writeXmi(cas, outputFile);
        mon.worked(1);
      } catch (Exception e) {
        if (cas != null) {
          cas.release();
        }
        if (ae != null) {
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.