Examples of RangeDifference


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

   * @param line the line before which the range has to occur
   * @param size the minimal size of the range
   * @return the first range found, or the first range in the differ if none can be found
   */
  private RangeDifference findConsistentRangeBeforeLeft(int line, int size) {
    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;
    }

    return found;
  }
View Full Code Here

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

   * @param line the line after which the range has to occur
   * @param size the minimal size of the range
   * @return the first range found, or the last range in the differ if none can be found
   */
  private RangeDifference findConsistentRangeAfterLeft(int line, int size) {
    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;

    }

    return found;
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.