Package org.eclipse.core.runtime

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


      }
      final IJobRunnable[] backgroundSaveRunnable = new IJobRunnable[1];
      try {
        SubMonitor subMonitor = SubMonitor.convert(progressMonitor, 3);
        backgroundSaveRunnable[0] = model.doSave(
            subMonitor.newChild(2), shellProvider);
        if (backgroundSaveRunnable[0] == null) {
          // no further work needs to be done
          return;
        }
        if (blockUntilSaved) {
View Full Code Here


          return;
        }
        if (blockUntilSaved) {
          // for now, block on close by running the runnable in the UI
          // thread
          IStatus result = backgroundSaveRunnable[0].run(subMonitor
              .newChild(1));
          if (!result.isOK()) {
            StatusUtil.handleStatus(result, StatusManager.SHOW,
                shellProvider.getShell());
            progressMonitor.setCanceled(true);
View Full Code Here

        SubMonitor progress = SubMonitor.convert(monitor, encoding != null ? 2 : 1);

        IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();

        IFile file = root.getFile(path);
        file.create(source, updateFlags, progress.newChild(1, SubMonitor.SUPPRESS_NONE));

        if (encoding != null)
            file.setCharset(encoding, progress.newChild(1, SubMonitor.SUPPRESS_NONE));

        return new DeleteResourceChange(path, true);
View Full Code Here

        IFile file = root.getFile(path);
        file.create(source, updateFlags, progress.newChild(1, SubMonitor.SUPPRESS_NONE));

        if (encoding != null)
            file.setCharset(encoding, progress.newChild(1, SubMonitor.SUPPRESS_NONE));

        return new DeleteResourceChange(path, true);
    }

    @Override
View Full Code Here

            launch.setAttribute(ATTR_JUNIT_PORT, Integer.toString(junitPort));
        } catch (Exception e) {
            throw new CoreException(new Status(IStatus.ERROR, Plugin.PLUGIN_ID, 0, "Error obtaining OSGi project tester.", e));
        }

        super.launch(configuration, mode, launch, progress.newChild(1, SubMonitor.SUPPRESS_NONE));
    }

    private int configureTester(ILaunchConfiguration configuration) throws CoreException, IOException {
        assertBndEclipseTester();
View Full Code Here

        SubMonitor progress = SubMonitor.convert(monitor);

        switch (operation.getType()) {
        case Import :
            progress.setWorkRemaining(2);
            importCnf(progress.newChild(1, SubMonitor.SUPPRESS_NONE));
            rebuildWorkspace(progress.newChild(1, SubMonitor.SUPPRESS_NONE));
            break;
        case Open :
            progress.setWorkRemaining(2);
            openProject(progress.newChild(1, SubMonitor.SUPPRESS_NONE));
View Full Code Here

        switch (operation.getType()) {
        case Import :
            progress.setWorkRemaining(2);
            importCnf(progress.newChild(1, SubMonitor.SUPPRESS_NONE));
            rebuildWorkspace(progress.newChild(1, SubMonitor.SUPPRESS_NONE));
            break;
        case Open :
            progress.setWorkRemaining(2);
            openProject(progress.newChild(1, SubMonitor.SUPPRESS_NONE));
            rebuildWorkspace(progress.newChild(1, SubMonitor.SUPPRESS_NONE));
View Full Code Here

            importCnf(progress.newChild(1, SubMonitor.SUPPRESS_NONE));
            rebuildWorkspace(progress.newChild(1, SubMonitor.SUPPRESS_NONE));
            break;
        case Open :
            progress.setWorkRemaining(2);
            openProject(progress.newChild(1, SubMonitor.SUPPRESS_NONE));
            rebuildWorkspace(progress.newChild(1, SubMonitor.SUPPRESS_NONE));
            break;
        case Create :
            progress.setWorkRemaining(3);
            createOrReplaceCnf(progress.newChild(1, SubMonitor.SUPPRESS_NONE));
View Full Code Here

            rebuildWorkspace(progress.newChild(1, SubMonitor.SUPPRESS_NONE));
            break;
        case Open :
            progress.setWorkRemaining(2);
            openProject(progress.newChild(1, SubMonitor.SUPPRESS_NONE));
            rebuildWorkspace(progress.newChild(1, SubMonitor.SUPPRESS_NONE));
            break;
        case Create :
            progress.setWorkRemaining(3);
            createOrReplaceCnf(progress.newChild(1, SubMonitor.SUPPRESS_NONE));
            rebuildWorkspace(progress.newChild(1, SubMonitor.SUPPRESS_NONE));
View Full Code Here

            openProject(progress.newChild(1, SubMonitor.SUPPRESS_NONE));
            rebuildWorkspace(progress.newChild(1, SubMonitor.SUPPRESS_NONE));
            break;
        case Create :
            progress.setWorkRemaining(3);
            createOrReplaceCnf(progress.newChild(1, SubMonitor.SUPPRESS_NONE));
            rebuildWorkspace(progress.newChild(1, SubMonitor.SUPPRESS_NONE));
            break;
        case Nothing :
        default :
            break;
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.