|
org.netbeans.modules.lexer/2 1.39.1 1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<TokenHierarchyEventType>
org.netbeans.api.lexer.TokenHierarchyEventType
public enum TokenHierarchyEventType
Token hierarchy event type determines the reason
why token hierarchy modification described by TokenHierarchyEvent
happened.
Enum Constant Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
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.
Method Detail |
---|
public static TokenHierarchyEventType[] values()
for (TokenHierarchyEventType c : TokenHierarchyEventType.values()) System.out.println(c);
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 name
NullPointerException
- if the argument is null
|
org.netbeans.modules.lexer/2 1.39.1 1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |