Class JsonFoldParser
java.lang.Object
org.fife.ui.rsyntaxtextarea.folding.JsonFoldParser
- All Implemented Interfaces:
FoldParser
The fold parser for JSON. Objects (
"{ ... }") and arrays
("[ ... ]") that span multiple lines are considered fold
regions.- Version:
- 1.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetFolds(RSyntaxTextArea textArea) Returns a list of all folds in the text area.private static booleanReturns whether a token is the left bracket token.private static booleanReturns whether a token is the right bracket token.private static booleanIf the specified value is on top of the stack, pop it off and returntrue.
-
Field Details
-
OBJECT_BLOCK
-
ARRAY_BLOCK
-
-
Constructor Details
-
JsonFoldParser
public JsonFoldParser()
-
-
Method Details
-
getFolds
Description copied from interface:FoldParserReturns a list of all folds in the text area.- Specified by:
getFoldsin 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.
-
isLeftBracket
Returns whether a token is the left bracket token.- Parameters:
t- The token.- Returns:
- Whether the token is the left bracket token.
- See Also:
-
isRightBracket
Returns whether a token is the right bracket token.- Parameters:
t- The token.- Returns:
- Whether the token is the right bracket token.
- See Also:
-
popOffTop
-