Package org.eclipse.core.resources

Examples of org.eclipse.core.resources.IWorkspaceDescription


    waitForJobFamily(ResourcesPlugin.FAMILY_MANUAL_REFRESH);
    resource.refreshLocal(IResource.DEPTH_ONE, null);
  }

  public static void setAutoBuilding(boolean enabled) throws CoreException {
    IWorkspaceDescription wsd = getWorkspace().getDescription();
    if (!wsd.isAutoBuilding() == enabled) {
      wsd.setAutoBuilding(enabled);
      getWorkspace().setDescription(wsd);
    }
  }
View Full Code Here


                    final IWorkspace workspace = ResourcesPlugin.getWorkspace();
                    boolean autobuild = workspace.isAutoBuilding();
                    try {
                        if (autobuild) {
                            // Disable auto build during project setup.
                            final IWorkspaceDescription wsDescription = workspace.getDescription();
                            autobuild = wsDescription.isAutoBuilding();
                            wsDescription.setAutoBuilding(false);
                            workspace.setDescription(wsDescription);
                        }
                        final List<AndroidProject> projects = page2.getSelectedProjects();
                        monitor.beginTask("Creating projects", projects.size());
                        for (final AndroidProject androidProject : projects) {
                            monitor.subTask(androidProject.getName());
                            androidProject.create(monitor);
                            monitor.worked(1);
                        }
                        monitor.done();
                        if (autobuild) {
                            // re-enable auto build
                            final IWorkspaceDescription wsDescription = workspace.getDescription();
                            wsDescription.setAutoBuilding(true);
                            workspace.setDescription(wsDescription);
                        }
                    } catch (final CoreException e) {
                        throw new InvocationTargetException(e);
                    }
View Full Code Here

   *            boolean
   * @throws CoreException
   */
  protected void setAutoBuilding(final boolean value) throws CoreException {
    IWorkspace _workspace = this.getWorkspace();
    final IWorkspaceDescription description = _workspace.getDescription();
    boolean _isAutoBuilding = description.isAutoBuilding();
    boolean _notEquals = (value != _isAutoBuilding);
    if (_notEquals) {
      description.setAutoBuilding(value);
      IWorkspace _workspace_1 = this.getWorkspace();
      _workspace_1.setDescription(description);
    }
  }
View Full Code Here

    disableWorkspaceAutoBuild();
    disableDLTKIndexer();
  }
 
  private static void disableWorkspaceAutoBuild() {
    IWorkspaceDescription desc = ResourcesPlugin.getWorkspace().getDescription();
    desc.setAutoBuilding(false);
    try {
      ResourcesPlugin.getWorkspace().setDescription(desc);
    } catch (CoreException e) {
      throw ExceptionAdapter.unchecked(e);
    }
View Full Code Here

    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

        Map<String, Boolean> skipSyncs, boolean useVersionControl)
        throws SarosCancellationException {

        this.monitor = subMonitor;
        IWorkspace ws = eclipseHelper.getWorkspace();
        IWorkspaceDescription desc = ws.getDescription();
        boolean wasAutobuilding = desc.isAutoBuilding();

        subMonitor.beginTask("Initializing shared project", 100);
        try {
            if (wasAutobuilding) {
                desc.setAutoBuilding(false);
                ws.setDescription(desc);
            }

            List<FileList> missingFiles = calculateMissingFiles(projectNames,
                skipSyncs, useVersionControl, subMonitor.newChild(10));

            transmitter.sendFileLists(peer, processID, missingFiles,
                subMonitor.newChild(10));
            checkCancellation();

            if (this.doStream) {
                // Host/Inviter decided to transmit files via stream
                acceptStream(subMonitor.newChild(80));
            } else {
                // Host/Inviter decided to transmit files with one big archive
                acceptArchive(localProjects.size(), subMonitor.newChild(80));
            }
            // We are finished with the exchanging process. Add all projects
            // resources to the session.
            for (String projectID : localProjects.keySet()) {
                IProject iProject = localProjects.get(projectID);
                if (isPartialRemoteProject(projectID)) {
                    List<IPath> paths = getRemoteFileList(projectID).getPaths();
                    List<IResource> dependentResources = new ArrayList<IResource>();
                    for (IPath iPath : paths) {
                        dependentResources.add(iProject.findMember(iPath));
                    }
                    sessionManager.getSarosSession().addSharedResources(
                        iProject, projectID, dependentResources);
                } else {
                    sessionManager.getSarosSession().addSharedResources(
                        iProject, projectID, null);
                }

                sessionManager.notifyProjectAdded(iProject);
            }
        } catch (Exception e) {
            processException(e);
        } finally {
            // Re-enable auto-building...
            if (wasAutobuilding) {
                desc.setAutoBuilding(true);
                try {
                    ws.setDescription(desc);
                } catch (CoreException e) {
                    localCancel(
                        "An error occurred while synchronising the project",
View Full Code Here

//   
//    if(temp.length > 0)
//      XVRUtils.openExternalFile(temp[0]);
//   
    IWorkspace ws = ResourcesPlugin.getWorkspace();
    IWorkspaceDescription desc = ws.getDescription();
   
    //disable auto build for the entire workspace
    desc.setAutoBuilding(false);
   
    //if the workspace has just a project which is not set as active, it activates the project.
    XVRUtils.updateActiveProject();

    try {
View Full Code Here

            } else if (args.length == 1 && args[0].equals("dumpreferences")) {
                final HeadLessBuilder builder = HeadLessBuilder.getInstance();
                builder.dumpProjectReferences(ResourcesPlugin.getWorkspace().computeProjectOrder(
                        ResourcesPlugin.getWorkspace().getRoot().getProjects()).projects);
            } else {
                final IWorkspaceDescription wsd = ResourcesPlugin.getWorkspace().getDescription();
                wsd.setAutoBuilding(false);
                ResourcesPlugin.getWorkspace().setDescription(wsd);
                ResourcesPlugin.getWorkspace().save(true, null);
                SysOutProgressMonitor.out.println();
                SysOutProgressMonitor.out.println("Auto building is set to false");
                SysOutProgressMonitor.out.println();
View Full Code Here

    public void run(final IAction action) {
        if (selection == null || selection.isEmpty()) {
            return;
        }
        IWorkspace workspace = ResourcesPlugin.getWorkspace();
        IWorkspaceDescription description = workspace.getDescription();
        if (!description.isAutoBuilding() && getClass().equals(FindBugsAction.class)) {
            boolean confirm = MessageDialog.openConfirm(null, "Project -> 'Build Automatically' disabled",
                    "You are going to run FindBugs analysis on a not compiled or partially compiled project.\n\n"
                            + "To get reliable analysis results, you should make sure that project is compiled first.\n\n"
                            + "Continue with FindBugs analysis?");
            if (!confirm) {
View Full Code Here

    }

    private void restoreAutobuild() throws CoreException {
        // this is only called if autobuild was on before.
        IWorkspace workspace = ResourcesPlugin.getWorkspace();
        IWorkspaceDescription description = workspace.getDescription();
        description.setAutoBuilding(true);
        workspace.setDescription(description);

        if (fSaved) {
            new GlobalBuildAction(fPage.getSite().getWorkbenchWindow(), IncrementalProjectBuilder.INCREMENTAL_BUILD)
                    .run();
View Full Code Here

TOP

Related Classes of org.eclipse.core.resources.IWorkspaceDescription

Copyright © 2018 www.massapicom. 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.