Class HtmlFoldParser

  • All Implemented Interfaces:
    FoldParser

    public class HtmlFoldParser
    extends Object
    implements FoldParser
    Fold parser for HTML 5, PHP and JSP. For HTML, we currently don't fold everything possible, just the "big" stuff. For PHP, we only fold the "big" HTML stuff and PHP regions, not code blocks in the actual PHP. For JSP we only fold the "big" HTML stuff and JSP blocks, not anything in the actual Java code.
    • Field Detail

      • LANGUAGE_HTML

        public static final int LANGUAGE_HTML
        Constant denoting we're folding HTML.
        See Also:
        Constant Field Values
      • LANGUAGE_PHP

        public static final int LANGUAGE_PHP
        Constant denoting we're folding PHP.
        See Also:
        Constant Field Values
      • LANGUAGE_JSP

        public static final int LANGUAGE_JSP
        Constant denoting we're folding JSP.
        See Also:
        Constant Field Values
    • Constructor Detail

      • HtmlFoldParser

        public HtmlFoldParser​(int language)
        Constructor.
        Parameters:
        language - The language to fold, such as LANGUAGE_PHP.
    • Method Detail

      • getFolds

        public List<Fold> getFolds​(RSyntaxTextArea textArea)
        Returns a list of all folds in the text area.
        Specified by:
        getFolds in interface FoldParser
        Parameters:
        textArea - The text area whose contents should be analyzed.
        Returns:
        The list of folds. If this method returns null, it is treated as if no folds were found.