public interface OccurrenceMarker
OccurrenceMarker is called when the caret stops moving after
a short period. If the current TokenMaker returns an instance of
this class, it is told to mark all occurrences of the identifier at the
caret position.| Modifier and Type | Method and Description |
|---|---|
Token |
getTokenToMark(RSyntaxTextArea textArea)
Returns the token to mark occurrences, of, provided it matches the
criteria put forth by
isValidType(RSyntaxTextArea, Token). |
boolean |
isValidType(RSyntaxTextArea textArea,
Token t)
Returns whether the specified token is a type that we can do a
"mark occurrences" of.
|
void |
markOccurrences(RSyntaxDocument doc,
Token t,
RSyntaxTextAreaHighlighter h,
SmartHighlightPainter p)
Called when occurrences of a token should be marked.
|
Token getTokenToMark(RSyntaxTextArea textArea)
isValidType(RSyntaxTextArea, Token).
For most languages, this method should return the token at the caret
position.textArea - The text area.null if none.boolean isValidType(RSyntaxTextArea textArea, Token t)
RSyntaxTextArea.getMarkOccurrencesOfTokenType(int).textArea - The text area.t - The token.void markOccurrences(RSyntaxDocument doc, Token t, RSyntaxTextAreaHighlighter h, SmartHighlightPainter p)
doc - The document.t - The document whose relevant occurrences should be marked.h - The highlighter to add the highlights to.p - The painter for the highlights.