public class XmlOccurrenceMarker extends java.lang.Object implements OccurrenceMarker
Constructor and Description |
---|
XmlOccurrenceMarker() |
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
OccurrenceMarker.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.
|
public Token getTokenToMark(RSyntaxTextArea textArea)
OccurrenceMarker.isValidType(RSyntaxTextArea, Token)
.
For most languages, this method should return the token at the caret
position.getTokenToMark
in interface OccurrenceMarker
textArea
- The text area.null
if none.public boolean isValidType(RSyntaxTextArea textArea, Token t)
RSyntaxTextArea.getMarkOccurrencesOfTokenType(int)
.isValidType
in interface OccurrenceMarker
textArea
- The text area.t
- The token.public void markOccurrences(RSyntaxDocument doc, Token t, RSyntaxTextAreaHighlighter h, SmartHighlightPainter p)
markOccurrences
in interface OccurrenceMarker
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.