Class HtmlOccurrenceMarker

  • All Implemented Interfaces:
    OccurrenceMarker

    public class HtmlOccurrenceMarker
    extends Object
    implements OccurrenceMarker
    Marks occurrences of the current token for HTML. Tags that require a closing tag have their "opposite" tag closed.
    • Constructor Detail

      • HtmlOccurrenceMarker

        public HtmlOccurrenceMarker()
    • Method Detail

      • getRequiredClosingTags

        public static final Set<String> getRequiredClosingTags()
      • getTagNameTokenForCaretOffset

        public static final 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.

        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.

        Parameters:
        textArea - The text area.
        occurrenceMarker - The occurrence marker.
        Returns:
        The token to mark occurrences of. Note that, if the specified occurrence marker identifies tokens other than tag names, these other element types may be returned.