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.
-
-
Field Summary
Fields Modifier and Type Field Description static int
LANGUAGE_HTML
Constant denoting we're folding HTML.static int
LANGUAGE_JSP
Constant denoting we're folding JSP.static int
LANGUAGE_PHP
Constant denoting we're folding PHP.
-
Constructor Summary
Constructors Constructor Description HtmlFoldParser(int language)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Fold>
getFolds(RSyntaxTextArea textArea)
Returns a list of all folds in the text area.
-
-
-
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 asLANGUAGE_PHP
.
-
-
Method Detail
-
getFolds
public List<Fold> getFolds(RSyntaxTextArea textArea)
Returns a list of all folds in the text area.- Specified by:
getFolds
in interfaceFoldParser
- 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.
-
-