public abstract class JavaFoldingBuilderBase extends CustomFoldingBuilder implements DumbAware
Constructor and Description |
---|
JavaFoldingBuilderBase() |
Modifier and Type | Method and Description |
---|---|
protected void |
buildLanguageFoldRegions(java.util.List<FoldingDescriptor> descriptors,
PsiElement root,
Document document,
boolean quick)
Implement this method to build language folding regions besides custom folding regions.
|
protected java.lang.String |
getLanguagePlaceholderText(ASTNode node,
TextRange range) |
static boolean |
hasErrorElementsNearby(PsiFile file,
int startOffset,
int endOffset) |
protected abstract boolean |
isBelowRightMargin(PsiFile file,
int lineLength) |
protected boolean |
isCustomFoldingCandidate(ASTNode node)
Checks if a node may contain custom folding tags.
|
protected boolean |
isCustomFoldingRoot(ASTNode node)
Checks if the node is used as custom folding root.
|
protected boolean |
isRegionCollapsedByDefault(ASTNode node)
Returns the default collapsed state for the folding region related to the specified node.
|
protected java.lang.String |
rightArrow() |
protected abstract boolean |
shouldShowExplicitLambdaType(PsiAnonymousClass anonymousClass,
PsiNewExpression expression) |
buildFoldRegions, buildFoldRegions, getPlaceholderText, getPlaceholderText, isCollapsedByDefault, isCustomFoldingCandidate, isCustomRegionElement, isCustomRegionEnd, isCustomRegionStart, isDumbAware
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isCollapsedByDefault
public static boolean hasErrorElementsNearby(PsiFile file, int startOffset, int endOffset)
protected abstract boolean shouldShowExplicitLambdaType(PsiAnonymousClass anonymousClass, PsiNewExpression expression)
protected void buildLanguageFoldRegions(java.util.List<FoldingDescriptor> descriptors, PsiElement root, Document document, boolean quick)
CustomFoldingBuilder
buildLanguageFoldRegions
in class CustomFoldingBuilder
descriptors
- The list of folding descriptors to store results to.root
- The root node for which the folding is requested.document
- The document for which folding is built.quick
- whether the result should be provided as soon as possible without reference resolving
and complex checks.protected java.lang.String getLanguagePlaceholderText(ASTNode node, TextRange range)
getLanguagePlaceholderText
in class CustomFoldingBuilder
protected boolean isRegionCollapsedByDefault(ASTNode node)
CustomFoldingBuilder
isRegionCollapsedByDefault
in class CustomFoldingBuilder
node
- the node for which the collapsed state is requested.protected java.lang.String rightArrow()
protected abstract boolean isBelowRightMargin(PsiFile file, int lineLength)
protected boolean isCustomFoldingCandidate(ASTNode node)
CustomFoldingBuilder
isCustomFoldingCandidate
in class CustomFoldingBuilder
node
- The node to check.protected boolean isCustomFoldingRoot(ASTNode node)
CustomFoldingBuilder
isCustomFoldingRoot
in class CustomFoldingBuilder
node
- The node to check.