List<StyleRange> mergeRanges(List<Long> changeRanges,List<Integer> highlightRanges){
  if (!mergerInit(changeRanges,highlightRanges)) {
    return null;
  }
  List<StyleRange> result=new ArrayList<>();
  mergerNext();
  int start=mergeRangesPosition;
  boolean blue=mergeRangesIsBlue;
  boolean highlight=mergeRangesIsHighlight;
  while (mergerNext()) {
    if (blue || highlight) {
      result.add(new StyleRange(start,mergeRangesPosition - start,blue ? COLOR_BLUE : null,highlight ? colorHighlight : null));
    }
    start=mergeRangesPosition;
    blue=mergeRangesIsBlue;
    highlight=mergeRangesIsHighlight;
  }
  return result;
}

List < StyleRange > mergeRanges ( List < Long > changeRanges , List < Integer > highlightRanges ) { if ( ! mergerInit ( changeRanges , highlightRanges ) ) { return null ; } List < StyleRange > result = new ArrayList < > ( ) ; mergerNext ( ) ; int start = mergeRangesPosition ; boolean blue = mergeRangesIsBlue ; boolean highlight = mergeRangesIsHighlight ; while ( mergerNext ( ) ) { if ( blue || highlight ) { result . add ( new StyleRange ( start , mergeRangesPosition - start , blue ? COLOR_BLUE : null , highlight ? colorHighlight : null ) ) ; } start = mergeRangesPosition ; blue = mergeRangesIsBlue ; highlight = mergeRangesIsHighlight ; } return result ; }
merge ranges of changes in file with ranges of highlighted elements . finds lowest range border , finds next lowest range border . that ' s the first result . keeps going until last range border .
