org.skunk.swing.text.syntax
Class Flexicizer
java.lang.Object
|
+--org.skunk.swing.text.syntax.Flexicizer
- All Implemented Interfaces:
- SyntaxTokenizer
- public class Flexicizer
- extends java.lang.Object
- implements SyntaxTokenizer
Method Summary |
int |
getReparseDistance()
how many characters around the insertion point should be reparsed. |
protected static FlexScanner |
getScanner(FileMode fileMode,
java.io.Reader r)
obtain a scanner from the pool which matches the given file mode, installing the given reader. |
void |
tokenize(SyntaxDocument document,
int offset,
int nInserted,
int nRemoved)
callback to tokenizer, which then tokenizes the necessary area around the indicated change. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_REPARSE_DISTANCE
public static final int DEFAULT_REPARSE_DISTANCE
Flexicizer
public Flexicizer()
getScanner
protected static final FlexScanner getScanner(FileMode fileMode,
java.io.Reader r)
- obtain a scanner from the pool which matches the given file mode, installing the given reader.
- Parameters:
fileMode
- the FileMode of the scannerr
- the Reader which gives access to the text to be lexed- Returns:
- the scanner, or null if no scanner can be found for the file mode.
tokenize
public void tokenize(SyntaxDocument document,
int offset,
int nInserted,
int nRemoved)
- callback to tokenizer, which then tokenizes the necessary area around the indicated change.
- Specified by:
tokenize
in interface SyntaxTokenizer
- Parameters:
document
- the documentoffset
- the offset of the change to the documentnInserted
- the numbers of characters insertednRemoved
- the number of characters removed
getReparseDistance
public int getReparseDistance()
- how many characters around the insertion point should be reparsed.