public class FoldParserManager extends java.lang.Object implements SyntaxConstants
RSyntaxTextArea
call into
this class to retrieve fold parsers for whatever language they're editing.
Folks implementing custom languages can add a FoldParser
implementation for their language to this manager and it will be used by
RSTA.SYNTAX_STYLE_ACTIONSCRIPT, SYNTAX_STYLE_ASSEMBLER_X86, SYNTAX_STYLE_BBCODE, SYNTAX_STYLE_C, SYNTAX_STYLE_CLOJURE, SYNTAX_STYLE_CPLUSPLUS, SYNTAX_STYLE_CSHARP, SYNTAX_STYLE_CSS, SYNTAX_STYLE_DELPHI, SYNTAX_STYLE_DTD, SYNTAX_STYLE_FORMULA, SYNTAX_STYLE_FORTRAN, SYNTAX_STYLE_GROOVY, SYNTAX_STYLE_HTACCESS, SYNTAX_STYLE_HTML, SYNTAX_STYLE_JAVA, SYNTAX_STYLE_JAVASCRIPT, SYNTAX_STYLE_JSON, SYNTAX_STYLE_JSP, SYNTAX_STYLE_LATEX, SYNTAX_STYLE_LISP, SYNTAX_STYLE_LUA, SYNTAX_STYLE_MAKEFILE, SYNTAX_STYLE_MXML, SYNTAX_STYLE_NONE, SYNTAX_STYLE_NSIS, SYNTAX_STYLE_PERL, SYNTAX_STYLE_PHP, SYNTAX_STYLE_PROPERTIES_FILE, SYNTAX_STYLE_PYTHON, SYNTAX_STYLE_RUBY, SYNTAX_STYLE_SAS, SYNTAX_STYLE_SCALA, SYNTAX_STYLE_SQL, SYNTAX_STYLE_TCL, SYNTAX_STYLE_UNIX_SHELL, SYNTAX_STYLE_VISUAL_BASIC, SYNTAX_STYLE_WINDOWS_BATCH, SYNTAX_STYLE_XML
限定符和类型 | 方法和说明 |
---|---|
void |
addFoldParserMapping(java.lang.String syntaxStyle,
FoldParser parser)
Adds a mapping from a syntax style to a fold parser.
|
static FoldParserManager |
get()
Returns the singleton instance of this class.
|
FoldParser |
getFoldParser(java.lang.String syntaxStyle)
Returns a fold parser to use for an editor highlighting code of a
specific language.
|
public void addFoldParserMapping(java.lang.String syntaxStyle, FoldParser parser)
SYNTAX_STYLE_JAVA
, with your own parser
implementations.syntaxStyle
- The syntax style.parser
- The parser.SyntaxConstants
public static FoldParserManager get()
public FoldParser getFoldParser(java.lang.String syntaxStyle)
syntaxStyle
- A value from SyntaxConstants
, such as
SYNTAX_STYLE_JAVA
.null
if none is registered
for the language.