Skip to content

Commit

Permalink
Javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
albertdev committed Jul 8, 2015
1 parent 8922f0c commit 3c4d043
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@ private int getSignedModelLength() {
return getEnd().getModelOffset() - getStart().getModelOffset();
}

/**
* Returns a TextRange spanning the lines the <code>from</code> and <code>to</code> {@link
* Position}s are on. The right bound is after the newline of that last line or is at the end
* of the file.
* @param editor EditorAdaptor reference.
* @param from Position from which to start.
* @param to Position up to which the lines should be included, always inclusive.
* @return a TextRange. Length can only be 0 for an empty file or the last line.
*/
public static TextRange lines(EditorAdaptor editor, Position from, Position to) {
TextContent txt = editor.getModelContent();
LineInformation sLine = txt.getLineInformationOfOffset(from.getModelOffset());
Expand Down

0 comments on commit 3c4d043

Please sign in to comment.