public class TextRegionLocation extends ElementLocation
| Modifier and Type | Field and Description |
|---|---|
static int |
UNKNOWN_TEXT_REGION_OFFSET
An unknown offset used to indicate, that the line information is to be used
to calculate character offset from.
|
LOCATION_PROPERTY, UNIFORM_PATH_PROPERTY| Constructor and Description |
|---|
TextRegionLocation(java.lang.String location,
java.lang.String uniformPath,
int rawStartOffset,
int rawEndOffset,
int rawStartLine,
int rawEndLine)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getRawEndLine()
Returns the line corresponding to
getRawEndOffset() (one-based,
inclusive). |
int |
getRawEndOffset()
Returns the absolute end position in the (raw) text (zero based, inclusive).
|
int |
getRawStartLine()
Returns the line corresponding to
getRawStartOffset() (one-based,
inclusive). |
int |
getRawStartOffset()
Returns the absolute start position of the region in the (raw) text (zero
based, inclusive).
|
java.lang.String |
toLocationString()
Returns a single line description of the location that is meaningful to the
user.
|
getLocation, getUniformPath, toStringpublic static final int UNKNOWN_TEXT_REGION_OFFSET
public TextRegionLocation(java.lang.String location, java.lang.String uniformPath, int rawStartOffset, int rawEndOffset, int rawStartLine, int rawEndLine)
public int getRawStartOffset()
public int getRawEndOffset()
public int getRawStartLine()
getRawStartOffset() (one-based,
inclusive).public int getRawEndLine()
getRawEndOffset() (one-based,
inclusive).public java.lang.String toLocationString()
This includes the start and end line which is typically sufficient for debugging and showing to a user.
toLocationString in class ElementLocation