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, isDumbAwareclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisCollapsedByDefaultpublic 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)
CustomFoldingBuilderbuildLanguageFoldRegions in class CustomFoldingBuilderdescriptors - 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 CustomFoldingBuilderprotected boolean isRegionCollapsedByDefault(ASTNode node)
CustomFoldingBuilderisRegionCollapsedByDefault in class CustomFoldingBuildernode - 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)
CustomFoldingBuilderisCustomFoldingCandidate in class CustomFoldingBuildernode - The node to check.protected boolean isCustomFoldingRoot(ASTNode node)
CustomFoldingBuilderisCustomFoldingRoot in class CustomFoldingBuildernode - The node to check.