java.lang.Object
novaworx.syntax.TokenMarker
- public class TokenMarker
- extends java.lang.Object
A token marker splits lines of text into tokens. Each token carries
a length field and an identification tag that can be mapped to a color
or font style for painting that token.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MAJOR_ACTIONS
public static final int MAJOR_ACTIONS
- See Also:
- Constant Field Values
WHITESPACE
public static final int WHITESPACE
- See Also:
- Constant Field Values
SPAN
public static final int SPAN
- See Also:
- Constant Field Values
MARK_PREVIOUS
public static final int MARK_PREVIOUS
- See Also:
- Constant Field Values
MARK_FOLLOWING
public static final int MARK_FOLLOWING
- See Also:
- Constant Field Values
EOL_SPAN
public static final int EOL_SPAN
- See Also:
- Constant Field Values
ACTION_HINTS
public static final int ACTION_HINTS
- See Also:
- Constant Field Values
EXCLUDE_MATCH
public static final int EXCLUDE_MATCH
- See Also:
- Constant Field Values
AT_LINE_START
public static final int AT_LINE_START
- See Also:
- Constant Field Values
NO_LINE_BREAK
public static final int NO_LINE_BREAK
- See Also:
- Constant Field Values
NO_WORD_BREAK
public static final int NO_WORD_BREAK
- See Also:
- Constant Field Values
IS_ESCAPE
public static final int IS_ESCAPE
- See Also:
- Constant Field Values
DELEGATE
public static final int DELEGATE
- See Also:
- Constant Field Values
SOFT_SPAN
private static final int SOFT_SPAN
- See Also:
- Constant Field Values
msName
private java.lang.String msName
msRulePrefix
private java.lang.String msRulePrefix
mhRuleSets
private java.util.Hashtable mhRuleSets
moMainRuleSet
private ParserRuleSet moMainRuleSet
moOriginalContext
private SyntaxLineContext moOriginalContext
moContext
private SyntaxLineContext moContext
moPattern
private javax.swing.text.Segment moPattern
miLastOffset
private int miLastOffset
miLastKeyword
private int miLastKeyword
miLineLength
private int miLineLength
miPosition
private int miPosition
mbEscaped
private boolean mbEscaped
TokenMarker
public TokenMarker()
addRuleSet
public void addRuleSet(java.lang.String asName,
ParserRuleSet aoRules)
getMainRuleSet
public ParserRuleSet getMainRuleSet()
getRuleSet
public ParserRuleSet getRuleSet(java.lang.String asName)
getName
public java.lang.String getName()
setName
public void setName(java.lang.String asName)
markTokens
public SyntaxLineContext markTokens(javax.swing.text.Segment aoSegment,
SyntaxLineContext aoContext)
- Do not call this method directly. This class is not thread safe.
Call SyntaxDocument.markTokens() instead.
handleRule
private boolean handleRule(SyntaxTokenList aoTokenList,
javax.swing.text.Segment aoSegment,
ParserRule aoCheckRule)
- Checks if the rule matches the line at the current position
and handles the rule if so.
markKeyword
private void markKeyword(SyntaxTokenList aoTokenList,
javax.swing.text.Segment aoSegment,
int aiStart,
int aiEnd)