public abstract class XmlCodeFoldingBuilder extends CustomFoldingBuilder implements DumbAware
| Constructor and Description |
|---|
XmlCodeFoldingBuilder() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addElementsToFold(java.util.List<FoldingDescriptor> foldings,
XmlElement tag,
Document document) |
protected boolean |
addToFold(java.util.List<? super FoldingDescriptor> foldings,
PsiElement elementToFold,
Document document) |
void |
buildLanguageFoldRegions(java.util.List<FoldingDescriptor> foldings,
PsiElement psiElement,
Document document,
boolean quick)
Implement this method to build language folding regions besides custom folding regions.
|
protected void |
doAddForChildren(XmlElement tag,
java.util.List<FoldingDescriptor> foldings,
Document document) |
protected int |
getCommentStartEnd(XmlComment element) |
protected int |
getCommentStartOffset(XmlComment element) |
static java.lang.String |
getEntityPlaceholder(PsiElement psi) |
static java.lang.String |
getEntityValue(java.lang.String value) |
protected abstract XmlCodeFoldingSettings |
getFoldingSettings() |
java.lang.String |
getLanguagePlaceholderText(ASTNode node,
TextRange range) |
TextRange |
getRangeToFold(PsiElement element) |
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.
|
boolean |
isRegionCollapsedByDefault(ASTNode node)
Returns the default collapsed state for the folding region related to the specified node.
|
buildFoldRegions, buildFoldRegions, getPlaceholderText, getPlaceholderText, isCollapsedByDefault, isCustomFoldingCandidate, isCustomRegionElement, isCustomRegionEnd, isCustomRegionStart, isDumbAwareclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisCollapsedByDefaultpublic void buildLanguageFoldRegions(java.util.List<FoldingDescriptor> foldings, PsiElement psiElement, Document document, boolean quick)
CustomFoldingBuilderbuildLanguageFoldRegions in class CustomFoldingBuilderfoldings - The list of folding descriptors to store results to.psiElement - 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 void addElementsToFold(java.util.List<FoldingDescriptor> foldings, XmlElement tag, Document document)
protected void doAddForChildren(XmlElement tag, java.util.List<FoldingDescriptor> foldings, Document document)
public TextRange getRangeToFold(PsiElement element)
protected int getCommentStartOffset(XmlComment element)
protected int getCommentStartEnd(XmlComment element)
protected boolean addToFold(java.util.List<? super FoldingDescriptor> foldings, PsiElement elementToFold, Document document)
public java.lang.String getLanguagePlaceholderText(ASTNode node, TextRange range)
getLanguagePlaceholderText in class CustomFoldingBuilderpublic static java.lang.String getEntityPlaceholder(PsiElement psi)
public static java.lang.String getEntityValue(java.lang.String value)
public boolean isRegionCollapsedByDefault(ASTNode node)
CustomFoldingBuilderisRegionCollapsedByDefault in class CustomFoldingBuildernode - the node for which the collapsed state is requested.protected abstract XmlCodeFoldingSettings getFoldingSettings()
protected boolean isCustomFoldingRoot(ASTNode node)
CustomFoldingBuilderisCustomFoldingRoot in class CustomFoldingBuildernode - The node to check.protected boolean isCustomFoldingCandidate(ASTNode node)
CustomFoldingBuilderisCustomFoldingCandidate in class CustomFoldingBuildernode - The node to check.