Package org.eclipse.ui.internal.texteditor.quickdiff.compare.rangedifferencer

Examples of org.eclipse.ui.internal.texteditor.quickdiff.compare.rangedifferencer.RangeDifference.leftLength()


        for (ListIterator it= fList.listIterator(); it.hasNext();) {
          if (fDifference.equals(it.next())) {
            if (it.hasNext()) {
              RangeDifference next= (RangeDifference) it.next();
              if (next.rightLength() == 0)
                return Math.max(next.leftLength() - next.rightLength(), 0);
            }
            break;
          }
        }
      }
View Full Code Here


      synchronized (fList) {
        for (ListIterator it= fList.listIterator(fList.size()); it.hasPrevious();) {
          if (fDifference.equals(it.previous())) {
            if (it.hasPrevious()) {
              RangeDifference previous= (RangeDifference) it.previous();
              return Math.max(previous.leftLength() - previous.rightLength(), 0);
            }
            break;
          }
        }
      }
View Full Code Here

    RangeDifference found= null;

    for (ListIterator it= fDifferences.listIterator(fDifferences.size()); it.hasPrevious();) {
      RangeDifference difference= (RangeDifference) it.previous();
      if (found == null || difference.kind() == RangeDifference.NOCHANGE
          && (difference.leftStart() > line && difference.leftLength() >= size
              || difference.leftStart() <= line && difference.leftEnd() - line >= size))
        found= difference;

      if (difference.leftStart() <= line)
        break;
View Full Code Here

    int leftLine= diff.leftStart() + diff.rightLength();
    int lOffset= fLeftDocument.getLineOffset(leftLine);
    int lLength= fLeftDocument.getLineOffset(diff.leftEnd() - 1) + fLeftDocument.getLineLength(diff.leftEnd() - 1) - lOffset;
    fRightDocument.replace(rOffset, rLength, fLeftDocument.get(lOffset, lLength));

    return diff.leftLength() - diff.rightLength();
  }

  /**
   * Returns the receivers initialization state.
   *
 
View Full Code Here

    RangeDifference found= null;

    for (ListIterator it= fDifferences.listIterator(); it.hasNext();) {
      RangeDifference difference= (RangeDifference) it.next();
      if (found == null || difference.kind() == RangeDifference.NOCHANGE
          && (difference.leftEnd() < line && difference.leftLength() >= size
              || difference.leftEnd() >= line && line - difference.leftStart() >= size))
        found= difference;

      if (difference.leftEnd() >= line)
        break;
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.