use of com.intellij.openapi.vcs.ex.Range.InnerRange in project intellij-community by JetBrains.
the class VcsPreviewPanel method createModifiedRange.
@NotNull
private static Range createModifiedRange(int currentLine, byte... inner) {
List<InnerRange> innerRanges = new ArrayList<>();
int currentInnerLine = currentLine;
for (byte type : inner) {
switch(type) {
case Range.EQUAL:
case Range.INSERTED:
case Range.MODIFIED:
innerRanges.add(new InnerRange(currentInnerLine, currentInnerLine + 1, type));
currentInnerLine++;
break;
case Range.DELETED:
innerRanges.add(new InnerRange(currentInnerLine, currentInnerLine, type));
break;
}
}
return new Range(currentLine, currentInnerLine, 0, 1, innerRanges);
}
Aggregations