Interface FoldType
public interface FoldType
Constants representing the "type" of a folded region. Implementations of
FoldParser
can also define their own folded region types, provided
they give them values of at least FOLD_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
and COMMENT
fold types.
- Version:
- 1.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Denotes aFold
as being a region of code.static final int
Denotes aFold
as being a multi-line comment.static final int
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 final int
Denotes aFold
as being a section of import statements (Java), include statements (C), etc.
-
Field Details
-
CODE
static final int CODEDenotes aFold
as being a region of code.- See Also:
-
COMMENT
static final int COMMENTDenotes aFold
as being a multi-line comment.- See Also:
-
IMPORTS
static final int IMPORTSDenotes aFold
as being a section of import statements (Java), include statements (C), etc.- See Also:
-
FOLD_TYPE_USER_DEFINED_MIN
static final int FOLD_TYPE_USER_DEFINED_MINUsers 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:
-