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() |
buildFoldRegionspublic FoldingDescriptor [] buildFoldRegions(PsiElement root, Document document, boolean quick)
FoldingBuilderExbuildFoldRegions in class FoldingBuilderExroot - 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)
FoldingBuilderExgetPlaceholderText in class FoldingBuilderExnode - the node for which the placeholder text is requested.range - text range within whole file to foldpublic java.lang.String getPlaceholderText(ASTNode node)
FoldingBuildergetPlaceholderText in interface FoldingBuildernode - the node for which the placeholder text is requested.public boolean isCollapsedByDefault(ASTNode node)
FoldingBuilderExisCollapsedByDefault in interface FoldingBuilderisCollapsedByDefault in class FoldingBuilderExnode - the node for which the collapsed state is requested.public boolean isCollapsedByDefault(FoldingDescriptor foldingDescriptor)
isCollapsedByDefault in interface FoldingBuilderpublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean isDumbAware()
isDumbAware in interface PossiblyDumbAwarepublic static FoldingBuilder getOriginalBuilder(FoldingDescriptor foldingDescriptor)