Class Token
java.lang.Object
com.inductiveautomation.ignition.client.jedittextarea.Token
A 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 by 
SyntaxDocument.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 SummaryFieldsModifier and TypeFieldDescriptionstatic final byteComment 1 token id.static final byteComment 2 token id.static final byteThe token type, that along with a length of 0 marks the end of the token list.byteThe id of this token.static final byteThe total number of defined token ids.static final byteThe first id that can be used for internal state in a token marker.static final byteThe last id that can be used for internal state in a token marker.static final byteInvalid token id.static final byteKeyword 1 token id.static final byteKeyword 2 token id.static final byteKeyword 3 token id.static final byteLabel token id.intThe length of this token.static final byteLiteral 1 token id.static final byteLiteral 2 token id.The next token in the linked list.static final byteNormal text token id.static final byteOperator token id.
- 
Constructor SummaryConstructors
- 
Method Summary
- 
Field Details- 
NULLpublic static final byte NULLNormal text token id. This should be used to mark normal text.- See Also:
 
- 
COMMENT1public static final byte COMMENT1Comment 1 token id. This can be used to mark a comment.- See Also:
 
- 
COMMENT2public static final byte COMMENT2Comment 2 token id. This can be used to mark a comment.- See Also:
 
- 
LITERAL1public static final byte LITERAL1Literal 1 token id. This can be used to mark a string literal (eg, C mode uses this to mark "..." literals)- See Also:
 
- 
LITERAL2public static final byte LITERAL2Literal 2 token id. This can be used to mark an object literal (eg, Java mode uses this to mark true, false, etc)- See Also:
 
- 
LABELpublic static final byte LABELLabel token id. This can be used to mark labels (eg, C mode uses this to mark ...: sequences)- See Also:
 
- 
KEYWORD1public static final byte KEYWORD1Keyword 1 token id. This can be used to mark a keyword. This should be used for general language constructs.- See Also:
 
- 
KEYWORD2public static final byte KEYWORD2Keyword 2 token id. This can be used to mark a keyword. This should be used for preprocessor commands, or variables.- See Also:
 
- 
KEYWORD3public static final byte KEYWORD3Keyword 3 token id. This can be used to mark a keyword. This should be used for data types.- See Also:
 
- 
OPERATORpublic static final byte OPERATOROperator token id. This can be used to mark an operator. (eg, SQL mode marks +, -, etc with this token type)- See Also:
 
- 
INVALIDpublic static final byte INVALIDInvalid token id. This can be used to mark invalid or incomplete tokens, so the user can easily spot syntax errors.- See Also:
 
- 
ID_COUNTpublic static final byte ID_COUNTThe total number of defined token ids.- See Also:
 
- 
INTERNAL_FIRSTpublic static final byte INTERNAL_FIRSTThe first id that can be used for internal state in a token marker.- See Also:
 
- 
INTERNAL_LASTpublic static final byte INTERNAL_LASTThe last id that can be used for internal state in a token marker.- See Also:
 
- 
ENDpublic static final byte ENDThe token type, that along with a length of 0 marks the end of the token list.- See Also:
 
- 
lengthpublic int lengthThe length of this token.
- 
idpublic byte idThe id of this token.
- 
nextThe next token in the linked list.
 
- 
- 
Constructor Details- 
Tokenpublic Token(int length, byte id) Creates a new token.- Parameters:
- length- The length of the token
- id- The id of the token
 
 
- 
- 
Method Details