Package org.eclipse.core.internal.watson

Examples of org.eclipse.core.internal.watson.ElementTree


        // Be sure to clean up after ourselves.
        if (clean || currentBuilder.wasForgetStateRequested()) {
          currentBuilder.setLastBuiltTree(null);
        } else {
          // remember the current state as the last built state.
          ElementTree lastTree = workspace.getElementTree();
          lastTree.immutable();
          currentBuilder.setLastBuiltTree(lastTree);
        }
        hookEndBuild(builder);
      }
    } finally {
View Full Code Here


      if (builder == null) {
        // if the builder was not instantiated, use the old info if any.
        if (oldInfos != null)
          info = getBuilderInfo(oldInfos, builderName, i);
      } else if (!(builder instanceof MissingBuilder)) {
        ElementTree oldTree = ((InternalBuilder) builder).getLastBuiltTree();
        //don't persist build state for builders that have no last built state
        if (oldTree != null) {
          // if the builder was instantiated, construct a memento with the important info
          info = new BuilderPersistentInfo(project.getName(), builderName, i);
          info.setLastBuildTree(oldTree);
View Full Code Here

    ArrayList infos = getBuildersPersistentInfo(project);
    if (infos != null) {
      BuilderPersistentInfo info = getBuilderInfo(infos, builderName, buildSpecIndex);
      if (info != null) {
        infos.remove(info);
        ElementTree tree = info.getLastBuiltTree();
        if (tree != null)
          ((InternalBuilder) builder).setLastBuiltTree(tree);
        ((InternalBuilder) builder).setInterestingProjects(info.getInterestingProjects());
      }
      // delete the build map if it's now empty
View Full Code Here

          return true;
        //fall through and check if there is a delta
    }

    //compute the delta since the last built state
    ElementTree oldTree = builder.getLastBuiltTree();
    ElementTree newTree = workspace.getElementTree();
    long start = System.currentTimeMillis();
    currentDelta = (DeltaDataTree) deltaTreeCache.getDelta(null, oldTree, newTree);
    if (currentDelta == null) {
      if (Policy.DEBUG_BUILD_NEEDED) {
        String message = "Checking if need to build. Starting delta computation between: " + oldTree.toString() + " and " + newTree.toString(); //$NON-NLS-1$ //$NON-NLS-2$
        Policy.debug(message);
      }
      currentDelta = newTree.getDataTree().forwardDeltaWith(oldTree.getDataTree(), ResourceComparator.getBuildComparator());
      if (Policy.DEBUG_BUILD_NEEDED)
        Policy.debug("End delta computation. (" + (System.currentTimeMillis() - start) + "ms)."); //$NON-NLS-1$ //$NON-NLS-2$
      deltaTreeCache.cache(null, oldTree, newTree, currentDelta);
    }
View Full Code Here

        Map markerDeltas = workspace.getMarkerManager().getMarkerDeltas(lastPostBuildId);
        lastDelta.updateMarkers(markerDeltas);
      }
    } else {
      // We don't have a delta or something changed so recompute the whole deal.
      ElementTree oldTree = postChange ? lastPostChangeTree : lastPostBuildTree;
      long markerId = postChange ? lastPostChangeId : lastPostBuildId;
      lastDelta = ResourceDeltaFactory.computeDelta(workspace, oldTree, tree, Path.ROOT, markerId + 1);
    }
    // remember the state of the world when this delta was consistent
    lastDeltaState = tree;
View Full Code Here

      ElementTree[] trees = treeReader.readDeltaChain(input);
      monitor.worked(3);
      if (root.isRoot()) {
        //Don't need to link because we're reading the whole workspace.
        //The last tree in the chain is the complete tree.
        ElementTree newTree = trees[trees.length - 1];
        newTree.setTreeData(workspace.tree.getTreeData());
        workspace.tree = newTree;
      } else {
        //splice the restored tree into the current set of trees
        workspace.linkTrees(root, trees);
      }
View Full Code Here

TOP

Related Classes of org.eclipse.core.internal.watson.ElementTree

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.