public final class TokenHierarchyEvent extends EventObject
source
Modifier and Type | Method and Description |
---|---|
int |
affectedEndOffset()
Get end offset of the area that was affected by the attached
token change(s).
|
int |
affectedStartOffset()
Get start offset of the area that was affected by the attached
token change(s).
|
int |
insertedLength()
Get number of characters inserted by the text modification
that caused this token change.
|
int |
modificationOffset()
Get offset in the input source where the modification occurred.
|
int |
removedLength()
Get number of characters removed by the text modification
that caused this token change.
|
TokenChange<?> |
tokenChange()
Get the token change that occurred in the tokens
at the top-level of the token hierarchy.
|
<T extends TokenId> |
tokenChange(Language<T> language)
Get the token change if the top level of the token hierarchy
contains tokens of the given language.
|
TokenHierarchy<?> |
tokenHierarchy()
Get source of this event as a token hierarchy instance.
|
String |
toString() |
TokenHierarchyEventType |
type()
Get reason why a token hierarchy event was fired.
|
getSource
public TokenHierarchy<?> tokenHierarchy()
public TokenHierarchyEventType type()
public TokenChange<?> tokenChange()
public <T extends TokenId> TokenChange<T> tokenChange(Language<T> language)
language
- non-null language.public int affectedStartOffset()
public int affectedEndOffset()
public int modificationOffset()
TokenHierarchyEventType.MODIFICATION
.public int insertedLength()
TokenHierarchyEventType.MODIFICATION
.public int removedLength()
TokenHierarchyEventType.MODIFICATION
.public String toString()
toString
in class EventObject