public class CompositeFoldingBuilder extends FoldingBuilderEx implements PossiblyDumbAware
LanguageFolding
Modifier and Type | Method and Description |
---|---|
FoldingDescriptor [] |
buildFoldRegions(PsiElement root,
Document document,
boolean quick)
Builds the folding regions for the specified node in the AST tree and its children.
|
static FoldingBuilder |
getOriginalBuilder(FoldingDescriptor foldingDescriptor) |
java.lang.String |
getPlaceholderText(ASTNode node)
Returns the text which is displayed in the editor for the folding region related to the
specified node when the folding region is collapsed.
|
java.lang.String |
getPlaceholderText(ASTNode node,
TextRange range)
Returns the text which is displayed in the editor for the folding region related to the
specified node when the folding region is collapsed.
|
boolean |
isCollapsedByDefault(ASTNode node)
Returns the default collapsed state for the folding region related to the specified node.
|
boolean |
isCollapsedByDefault(FoldingDescriptor foldingDescriptor) |
boolean |
isDumbAware() |
java.lang.String |
toString() |
buildFoldRegions
public FoldingDescriptor [] buildFoldRegions(PsiElement root, Document document, boolean quick)
FoldingBuilderEx
buildFoldRegions
in class FoldingBuilderEx
root
- the element for which folding is requested.document
- the document for which folding is built. Can be used to retrieve line
numbers for folding regions.quick
- whether the result should be provided as soon as possible. Is true, when
an editor is opened and we need to auto-fold something immediately, like Java imports.
If true, one should perform no reference resolving and avoid complex checks if possible.public java.lang.String getPlaceholderText(ASTNode node, TextRange range)
FoldingBuilderEx
getPlaceholderText
in class FoldingBuilderEx
node
- the node for which the placeholder text is requested.range
- text range within whole file to foldpublic java.lang.String getPlaceholderText(ASTNode node)
FoldingBuilder
getPlaceholderText
in interface FoldingBuilder
node
- the node for which the placeholder text is requested.public boolean isCollapsedByDefault(ASTNode node)
FoldingBuilderEx
isCollapsedByDefault
in interface FoldingBuilder
isCollapsedByDefault
in class FoldingBuilderEx
node
- the node for which the collapsed state is requested.public boolean isCollapsedByDefault(FoldingDescriptor foldingDescriptor)
isCollapsedByDefault
in interface FoldingBuilder
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isDumbAware()
isDumbAware
in interface PossiblyDumbAware
public static FoldingBuilder getOriginalBuilder(FoldingDescriptor foldingDescriptor)