Interface FoldType
-
public interface FoldType
Constants representing the "type" of a folded region. Implementations ofFoldParser
can also define their own folded region types, provided they give them values of at leastFOLD_TYPE_USER_DEFINED_MIN
. This allows you to identify and auto-fold specific regions of source code when opening files; for example, a Java editor could identify all import statements in a file as a foldable region, and give it a user-defined value for fold type. Then, the UI could provide a means for the user to specify that they always want the import region folded when opening a new file.The majority of the time, however, code editors won't need to be that fancy, and can simply use the standard
CODE
andCOMMENT
fold types.- See Also:
Fold
-
-
Field Summary
Fields Modifier and Type Field Description static int
CODE
Denotes aFold
as being a region of code.static int
COMMENT
Denotes aFold
as being a multi-line comment.static int
FOLD_TYPE_USER_DEFINED_MIN
Users building advanced editors such as IDE's, that want to allow their users to auto-expand/collapse foldable regions of a specific type other than comments, should define their custom fold types using valuesFOLD_TYPE_USER_DEFINED_MIN + n
.static int
IMPORTS
Denotes aFold
as being a section of import statements (Java), include statements (C), etc.
-
-
-
Field Detail
-
CODE
static final int CODE
Denotes aFold
as being a region of code.- See Also:
- Constant Field Values
-
COMMENT
static final int COMMENT
Denotes aFold
as being a multi-line comment.- See Also:
- Constant Field Values
-
IMPORTS
static final int IMPORTS
Denotes aFold
as being a section of import statements (Java), include statements (C), etc.- See Also:
- Constant Field Values
-
FOLD_TYPE_USER_DEFINED_MIN
static final int FOLD_TYPE_USER_DEFINED_MIN
Users building advanced editors such as IDE's, that want to allow their users to auto-expand/collapse foldable regions of a specific type other than comments, should define their custom fold types using valuesFOLD_TYPE_USER_DEFINED_MIN + n
. That way, if new default fold types are added to this interface in the future, your code won't suddenly break when upgrading to a new version of RSTA.- See Also:
- Constant Field Values
-
-