Examples of DeltaDataTree


Examples of org.eclipse.core.internal.dtree.DeltaDataTree

  /**
   * Reads an element tree delta from the input stream, and
   * reconstructs it as a delta on the given tree.
   */
  public ElementTree readDelta(ElementTree parentTree, DataInput input) throws IOException {
    DeltaDataTree complete = parentTree.getDataTree();
    DeltaDataTree delta = dataTreeReader.readTree(complete, input);

    //if the delta is empty, just return the parent
    if (delta.isEmptyDelta())
      return parentTree;

    ElementTree tree = new ElementTree(delta);

    //copy the user data forward
    IElementTreeData data = parentTree.getTreeData();
    if (data != null) {
      tree.setTreeData((IElementTreeData) data.clone());
    }

    //make the underlying data tree immutable
    //can't call immutable() on the ElementTree because
    //this would attempt to reroot.
    delta.immutable();
    return tree;
  }
View Full Code Here

Examples of org.eclipse.core.internal.dtree.DeltaDataTree

   */
  public static ResourceDelta computeDelta(Workspace workspace, ElementTree oldTree, ElementTree newTree, IPath root, long markerGeneration) {
    //compute the underlying delta tree.
    ResourceComparator comparator = markerGeneration >= 0 ? ResourceComparator.getNotificationComparator() : ResourceComparator.getBuildComparator();
    newTree.immutable();
    DeltaDataTree delta = null;
    if (Path.ROOT.equals(root))
      delta = newTree.getDataTree().compareWith(oldTree.getDataTree(), comparator);
    else
      delta = newTree.getDataTree().compareWith(oldTree.getDataTree(), comparator, root);

    delta = delta.asReverseComparisonTree(comparator);
    IPath pathInTree = root.isRoot() ? Path.ROOT : root;
    IPath pathInDelta = Path.ROOT;

    // get the marker deltas for the delta info object....if needed
    Map allMarkerDeltas = 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.