Class AbstractMarkupLanguageSupport

    • Field Detail

      • INSERT_CLOSING_TAG_ACTION

        protected static final java.lang.String INSERT_CLOSING_TAG_ACTION
        See Also:
        Constant Field Values
      • autoAddClosingTags

        private boolean autoAddClosingTags
        Whether closing tags are automatically added when the user types opening tags. For HTML, this will only occur for tags that are allowed to have closing tags, based on the doctype. For XML, this will always occur if this property is set to true.
    • Constructor Detail

      • AbstractMarkupLanguageSupport

        protected AbstractMarkupLanguageSupport()
    • Method Detail

      • getAutoAddClosingTags

        public boolean getAutoAddClosingTags()
        Returns whether closing tags should be automatically added when the user types a (non-self-closing) start tag. This will only be done for tags where closing tags are accepted and valid, based on the doctype.
        Returns:
        Whether to automatically add closing tags.
        See Also:
        setAutoAddClosingTags(boolean)
      • installKeyboardShortcuts

        protected void installKeyboardShortcuts​(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea)
        Installs extra keyboard shortcuts supported by this language support. The default implementation maps an action to automatically add closing tags when '>' is pressed; subclasses can override and add additional shortcuts if desired.

        Subclasses should call this method in their LanguageSupport.install(RSyntaxTextArea) methods.

        Parameters:
        textArea - The text area to install the shortcuts into.
        See Also:
        uninstallKeyboardShortcuts(RSyntaxTextArea)
      • shouldAutoCloseTag

        protected abstract boolean shouldAutoCloseTag​(java.lang.String tag)
        Subclasses should override this method to return whether a specified tag should have its closing tag auto-inserted.
        Parameters:
        tag - The name of the tag to check.
        Returns:
        Whether the tag should have its closing tag auto-inserted.
      • setAutoAddClosingTags

        public void setAutoAddClosingTags​(boolean autoAdd)
        Sets whether closing tags should be automatically added when the user types a (non-self-closing) start tag. This will only be done for tags where closing tags are accepted and valid, based on the doctype.
        Parameters:
        autoAdd - Whether to automatically add closing tags.
        See Also:
        getAutoAddClosingTags()
      • uninstallKeyboardShortcuts

        protected void uninstallKeyboardShortcuts​(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea)
        Uninstalls any keyboard shortcuts specific to this language support.

        Subclasses should call this method in their LanguageSupport.uninstall(RSyntaxTextArea) methods.

        Parameters:
        textArea - The text area to uninstall the actions from.
        See Also:
        installKeyboardShortcuts(RSyntaxTextArea)