Class Token
- java.lang.Object
- 
- com.inductiveautomation.ignition.client.jedittextarea.Token
 
- 
 public class Token extends java.lang.ObjectA linked list of tokens. Each token has three fields - a token identifier, which is a byte value that can be looked up in the array returned bySyntaxDocument.getColors()to get a color value, a length value which is the length of the token in the text, and a pointer to the next token in the list.
- 
- 
Field SummaryFields Modifier and Type Field Description static byteCOMMENT1Comment 1 token id.static byteCOMMENT2Comment 2 token id.static byteENDThe token type, that along with a length of 0 marks the end of the token list.byteidThe id of this token.static byteID_COUNTThe total number of defined token ids.static byteINTERNAL_FIRSTThe first id that can be used for internal state in a token marker.static byteINTERNAL_LASTThe last id that can be used for internal state in a token marker.static byteINVALIDInvalid token id.static byteKEYWORD1Keyword 1 token id.static byteKEYWORD2Keyword 2 token id.static byteKEYWORD3Keyword 3 token id.static byteLABELLabel token id.intlengthThe length of this token.static byteLITERAL1Literal 1 token id.static byteLITERAL2Literal 2 token id.TokennextThe next token in the linked list.static byteNULLNormal text token id.static byteOPERATOROperator token id.
 - 
Constructor SummaryConstructors Constructor Description Token(int length, byte id)Creates a new token.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringtoString()Returns a string representation of this token.
 
- 
- 
- 
Field Detail- 
NULLpublic static final byte NULL Normal text token id. This should be used to mark normal text.- See Also:
- Constant Field Values
 
 - 
COMMENT1public static final byte COMMENT1 Comment 1 token id. This can be used to mark a comment.- See Also:
- Constant Field Values
 
 - 
COMMENT2public static final byte COMMENT2 Comment 2 token id. This can be used to mark a comment.- See Also:
- Constant Field Values
 
 - 
LITERAL1public static final byte LITERAL1 Literal 1 token id. This can be used to mark a string literal (eg, C mode uses this to mark "..." literals)- See Also:
- Constant Field Values
 
 - 
LITERAL2public static final byte LITERAL2 Literal 2 token id. This can be used to mark an object literal (eg, Java mode uses this to mark true, false, etc)- See Also:
- Constant Field Values
 
 - 
LABELpublic static final byte LABEL Label token id. This can be used to mark labels (eg, C mode uses this to mark ...: sequences)- See Also:
- Constant Field Values
 
 - 
KEYWORD1public static final byte KEYWORD1 Keyword 1 token id. This can be used to mark a keyword. This should be used for general language constructs.- See Also:
- Constant Field Values
 
 - 
KEYWORD2public static final byte KEYWORD2 Keyword 2 token id. This can be used to mark a keyword. This should be used for preprocessor commands, or variables.- See Also:
- Constant Field Values
 
 - 
KEYWORD3public static final byte KEYWORD3 Keyword 3 token id. This can be used to mark a keyword. This should be used for data types.- See Also:
- Constant Field Values
 
 - 
OPERATORpublic static final byte OPERATOR Operator token id. This can be used to mark an operator. (eg, SQL mode marks +, -, etc with this token type)- See Also:
- Constant Field Values
 
 - 
INVALIDpublic static final byte INVALID Invalid token id. This can be used to mark invalid or incomplete tokens, so the user can easily spot syntax errors.- See Also:
- Constant Field Values
 
 - 
ID_COUNTpublic static final byte ID_COUNT The total number of defined token ids.- See Also:
- Constant Field Values
 
 - 
INTERNAL_FIRSTpublic static final byte INTERNAL_FIRST The first id that can be used for internal state in a token marker.- See Also:
- Constant Field Values
 
 - 
INTERNAL_LASTpublic static final byte INTERNAL_LAST The last id that can be used for internal state in a token marker.- See Also:
- Constant Field Values
 
 - 
ENDpublic static final byte END The token type, that along with a length of 0 marks the end of the token list.- See Also:
- Constant Field Values
 
 - 
lengthpublic int length The length of this token.
 - 
idpublic byte id The id of this token.
 - 
nextpublic Token next The next token in the linked list.
 
- 
 
-