Examples of IWorkspaceDescription


Examples of org.eclipse.core.resources.IWorkspaceDescription

    private boolean disableAutobuild() throws CoreException {
        IWorkspace workspace = ResourcesPlugin.getWorkspace();
        boolean autobuild = workspace.isAutoBuilding();
        if (autobuild) {
            IWorkspaceDescription description = workspace.getDescription();
            description.setAutoBuilding(false);
            workspace.setDescription(description);
        }
        return autobuild;
    }
View Full Code Here

Examples of org.eclipse.core.resources.IWorkspaceDescription

    setAutoBuilding(true);
  }

  private static void setAutoBuilding(boolean value) throws CoreException {
    final IWorkspace workspace = ResourcesPlugin.getWorkspace();
    final IWorkspaceDescription description = workspace.getDescription();
    if (description.isAutoBuilding() != value) {
      description.setAutoBuilding(value);
      workspace.setDescription(description);
    }
  }
View Full Code Here

Examples of org.eclipse.core.resources.IWorkspaceDescription

        .getFile("target/m2e-wtp/web-resources/resources/mapping.txt");
    assertTrue("mapping.txt is missing", mapping.exists());
  }

  public void testRebuildOnConfigChange() throws Exception {
    IWorkspaceDescription description = workspace.getDescription();
      description.setAutoBuilding(true);
      workspace.setDescription(description);
   
    IProject p = importProject("projects/p3/pom.xml");
    waitForJobsToComplete();
    p.build(IncrementalProjectBuilder.AUTO_BUILD, monitor);
View Full Code Here

Examples of org.eclipse.core.resources.IWorkspaceDescription

    disableAutoBuild();
  }
 
  protected static void disableAutoBuild() {
    IWorkspace workspace = ResourcesPlugin.getWorkspace();
    IWorkspaceDescription desc= workspace.getDescription();
    desc.setAutoBuilding(false);
    try {
      workspace.setDescription(desc);
    } catch (CoreException e) {
      throw melnorme.utilbox.core.ExceptionAdapter.unchecked(e);
    }
View Full Code Here

Examples of org.eclipse.core.resources.IWorkspaceDescription

      return false;
    }
    try {
      // Save isn't cancelable.
      IWorkspace workspace = ResourcesPlugin.getWorkspace();
      IWorkspaceDescription description = workspace.getDescription();
      boolean autoBuild = description.isAutoBuilding();
      description.setAutoBuilding(false);
      workspace.setDescription(description);
      try {
        if (fSaveMode == SAVE_ALL_ALWAYS_ASK || fSaveMode == SAVE_ALL
            || RefactoringSavePreferences.getSaveAllEditors()) {
          if (!JavaPlugin.getActiveWorkbenchWindow().getWorkbench()
              .saveAllEditors(false)) {
            return false;
          }
        }
        else {
          IRunnableWithProgress runnable = new IRunnableWithProgress() {
            public void run(IProgressMonitor pm)
                throws InterruptedException {
              int count = dirtyEditors.length;
              pm.beginTask("", count); //$NON-NLS-1$
              for (int i = 0; i < count; i++) {
                IEditorPart editor = dirtyEditors[i];
                editor.doSave(new SubProgressMonitor(pm, 1));
                if (pm.isCanceled()) {
                  throw new InterruptedException();
                }
              }
              pm.done();
            }
          };
          try {
            PlatformUI.getWorkbench().getProgressService().runInUI(
                JavaPlugin.getActiveWorkbenchWindow(),
                runnable, null);
          }
          catch (InterruptedException e) {
            return false;
          }
          catch (InvocationTargetException e) {
            ExceptionHandler
                .handle(
                    e,
                    shell,
                    RefactoringMessages.RefactoringStarter_saving,
                    RefactoringMessages.RefactoringStarter_unexpected_exception);
            return false;
          }
        }
        fFilesSaved = true;
      }
      finally {
        description.setAutoBuilding(autoBuild);
        workspace.setDescription(description);
      }
      return true;
    }
    catch (CoreException e) {
View Full Code Here

Examples of org.eclipse.core.resources.IWorkspaceDescription

    getContainer().run(false, false, op);

  }

  protected void enableWorkspaceBuild(boolean enable) throws CoreException {
    IWorkspaceDescription wsd = ResourcesPlugin.getWorkspace().getDescription();
    if (!wsd.isAutoBuilding() == enable) {
      wsd.setAutoBuilding(enable);
      ResourcesPlugin.getWorkspace().setDescription(wsd);
    }
  }
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.