public enum TokenHierarchyEventType extends Enum<TokenHierarchyEventType>
TokenHierarchyEvent
happened.Enum.EnumDesc<E extends Enum<E>>
Enum Constant and Description |
---|
ACTIVITY
Token hierarchy became inactive (while being active before) or vice versa.
|
EMBEDDING_CREATED
Custom language embedding was created by
TokenSequence.createEmbedding(Language,int,int) . |
EMBEDDING_REMOVED
Custom language embedding was removed by
TokenSequence.removeEmbedding(Language) . |
LANGUAGE_PATHS
Notification that result of
TokenHierarchy.languagePaths() has changed. |
MODIFICATION
Modification (insert/remove) of the characters
in the underlying character sequence was performed.
|
REBUILD
Complete rebuild of the token hierarchy.
|
RELEX
Explicit relexing of a part of the token hierarchy
without any text modification.
|
Modifier and Type | Method and Description |
---|---|
static TokenHierarchyEventType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TokenHierarchyEventType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TokenHierarchyEventType MODIFICATION
public static final TokenHierarchyEventType RELEX
public static final TokenHierarchyEventType REBUILD
public static final TokenHierarchyEventType ACTIVITY
TokenHierarchy.isActive()
.
TokenHierarchyControl.setActive(boolean)
.
For example if a Swing docuemnt is not showing and it has not been edited for a long time
its token hierarchy may be deactivated to save memory. Once the hierarchy
gets deactivated the clients should drop all the functionality depending
on the tokens (for example not provide a token-dependent syntax highlighting).
TokenHierarchy.tokenSequence()
or a similar method
that leads to automatic activation.public static final TokenHierarchyEventType EMBEDDING_CREATED
TokenSequence.createEmbedding(Language,int,int)
.
TokenHierarchyEvent.tokenChange()
contains the token
where the embedding was created and the embedded change
TokenChange.embeddedChange(int)
that describes the added
embedded language.
public static final TokenHierarchyEventType EMBEDDING_REMOVED
TokenSequence.removeEmbedding(Language)
.
TokenHierarchyEvent.tokenChange()
contains the token
where the embedding was created and the embedded change
TokenChange.embeddedChange(int)
that describes the added
embedded language.
public static final TokenHierarchyEventType LANGUAGE_PATHS
TokenHierarchy.languagePaths()
has changed.
public static TokenHierarchyEventType[] values()
public static TokenHierarchyEventType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null