use of org.eclipse.jface.text.IRegion in project bndtools by bndtools.
the class PropertiesLineReader method grabLine.
private char[] grabLine(boolean continued) throws BadLocationException {
if (lineNum >= lineCount) {
lastRegion = null;
return null;
}
IRegion lineInfo = document.getLineInformation(lineNum);
char[] chars = document.get(lineInfo.getOffset(), lineInfo.getLength()).toCharArray();
if (continued) {
int length = lastRegion.getLength();
length += document.getLineDelimiter(lineNum - 1).length();
length += lineInfo.getLength();
lastRegion = new Region(lastRegion.getOffset(), length);
} else {
lastRegion = lineInfo;
}
lineNum++;
return chars;
}
Aggregations