Package org.eclipse.compare.internal.merge.DocumentMerger

Examples of org.eclipse.compare.internal.merge.DocumentMerger.Diff


      Point region = new Point(0, 0);
      char leg = getLeg(tp);
      for (Iterator iterator = fMerger.changesIterator(); iterator
          .hasNext();) {
        Diff diff = (Diff) iterator.next();
        if (diff.isDeleted())
          continue;

        if (fShowCurrentOnly2 && !isCurrentDiff(diff))
          continue;

        tp.getLineRange(diff.getPosition(leg), region);
        int y = (region.x * lineHeight) + shift;
        int h = region.y * lineHeight;

        if (y + h < 0)
          continue;
View Full Code Here


    Point range = new Point(0, 0);

    char leg = getLeg(tp);
    for (Iterator iterator = fMerger.changesIterator(); iterator.hasNext();) {
      Diff diff = (Diff) iterator.next();
      if (diff.isDeleted())
        continue;

      if (fShowCurrentOnly && !isCurrentDiff(diff))
        continue;

      tp.getLineRange(diff.getPosition(leg), range);
      int y = (range.x * lineHeight) + shift;
      int h = range.y * lineHeight;

      if (y + h < event.y)
        continue;
View Full Code Here

  }

  // ---- Navigating and resolving Diffs

  private Diff getNextVisibleDiff(boolean down, boolean deep) {
    Diff diff = null;
    MergeSourceViewer part = getNavigationPart();
    if (part == null)
      return null;
    Point s = part.getSelectedRange();
    char leg = getLeg(part);
    for (;;) {
      diff = null;
      diff = internalGetNextDiff(down, deep, part, s);
      if (diff != null && diff.getKind() == RangeDifference.ANCESTOR
          && !isAncestorVisible()) {
        Position position = diff.getPosition(leg);
        s = new Point(position.getOffset(), position.getLength());
        diff = null;
        continue;
      }
      break;
View Full Code Here

  /*
   * Returns true if end (or beginning) of document reached.
   */
  private boolean navigate(boolean down, boolean wrap, boolean deep) {
    Diff diff = null;
    boolean wrapped = false;
    for (;;) {
      diff = getNextVisibleDiff(down, deep);
      if (diff == null && wrap) {
        if (wrapped)
          // We've already wrapped once so break out
          break;
        wrapped = true;
        diff = getWrappedDiff(null, down);
      }
      if (diff != null)
        setCurrentDiff(diff, true, deep);
      if (diff != null && diff.getKind() == RangeDifference.ANCESTOR
          && !isAncestorVisible())
        continue;
      break;
    }
    return diff == null;
View Full Code Here

TOP

Related Classes of org.eclipse.compare.internal.merge.DocumentMerger.Diff

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.