org.fife.ui.rsyntaxtextarea.folding
Class HtmlFoldParser

java.lang.Object
  extended by org.fife.ui.rsyntaxtextarea.folding.HtmlFoldParser
All Implemented Interfaces:
FoldParser

public class HtmlFoldParser
extends java.lang.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 Summary
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
HtmlFoldParser(int language)
          Constructor.
 
Method Summary
 java.util.List<Fold> getFolds(RSyntaxTextArea textArea)
          Returns a list of all folds in the text area.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 java.util.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.