|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.fife.ui.rsyntaxtextarea.HtmlOccurrenceMarker
public class HtmlOccurrenceMarker
Marks occurrences of the current token for HTML. Tags that require a closing tag have their "opposite" tag closed.
| Constructor Summary | |
|---|---|
HtmlOccurrenceMarker()
|
|
| Method Summary | |
|---|---|
static java.util.Set<java.lang.String> |
getRequiredClosingTags()
|
static Token |
getTagNameTokenForCaretOffset(RSyntaxTextArea textArea,
OccurrenceMarker occurrenceMarker)
If the caret is inside of a tag, this method returns the token representing the tag name; otherwise, null is returned. |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HtmlOccurrenceMarker()
| Method Detail |
|---|
public static final java.util.Set<java.lang.String> getRequiredClosingTags()
public static final Token getTagNameTokenForCaretOffset(RSyntaxTextArea textArea,
OccurrenceMarker occurrenceMarker)
null is returned.Currently, this method only checks for tag names on the same line as the caret, for simplicity. In the future it could check prior lines until the tag name is found.
textArea - The text area.occurrenceMarker - The occurrence marker.
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 OccurrenceMarkertextArea - The text area.
null if none.
public boolean isValidType(RSyntaxTextArea textArea,
Token t)
RSyntaxTextArea.getMarkOccurrencesOfTokenType(int).
isValidType in interface OccurrenceMarkertextArea - The text area.t - The token.
public void markOccurrences(RSyntaxDocument doc,
Token t,
RSyntaxTextAreaHighlighter h,
SmartHighlightPainter p)
markOccurrences in interface OccurrenceMarkerdoc - 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.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||