Class HtmlFoldParser

java.lang.Object
org.fife.ui.rsyntaxtextarea.folding.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.
Version:
1.0
Author:
Robert Futrell
  • Field Details

    • LANGUAGE_HTML

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

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

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

    • HtmlFoldParser

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

    • getFolds

      public List<Fold> getFolds(RSyntaxTextArea textArea)
      Description copied from interface: FoldParser
      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.