public class PsiCodeBlockImpl extends LazyParseablePsiElement implements PsiCodeBlock
Iconable.IconFlags, Iconable.LastComputedIconEMPTY_ARRAYFLAGS_LOCKED, ICON_PLACEHOLDEREMPTY_ARRAYARRAY_FACTORYICON_FLAG_IGNORE_MASK, ICON_FLAG_OPEN, ICON_FLAG_READ_STATUS, ICON_FLAG_VISIBILITYEMPTY_NAVIGATION_ITEM_ARRAY| Constructor and Description |
|---|
PsiCodeBlockImpl(java.lang.CharSequence text) |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(PsiElementVisitor visitor)
Passes the element to the specified visitor.
|
TreeElement |
addInternal(TreeElement first,
ASTNode last,
ASTNode anchor,
java.lang.Boolean before) |
void |
clearCaches() |
ASTNode |
findChildByRole(int role) |
int |
getChildRole(ASTNode child) |
PsiElement |
getFirstBodyElement()
Returns the first PSI element contained in the block.
|
PsiElement |
getLastBodyElement()
Returns the last PSI element contained in the block.
|
PsiJavaToken |
getLBrace()
Returns the opening curly brace of the block.
|
PsiJavaToken |
getRBrace()
Returns the closing curly brace of the block.
|
int |
getStatementCount() |
PsiStatement [] |
getStatements()
Returns the array of statements contained in the block.
Please note that this method doesn't return comments which are not part of statements. |
boolean |
isEmpty() |
boolean |
processDeclarations(PsiScopeProcessor processor,
ResolveState state,
PsiElement lastParent,
PsiElement place)
Passes the declarations contained in this PSI element and its children
for processing to the specified scope processor.
|
boolean |
shouldChangeModificationCount(PsiElement place) |
java.lang.String |
toString()
toString() should never be presented to the user.
|
acceptChildren, add, addAfter, addBefore, addRange, addRangeAfter, addRangeBefore, canNavigate, canNavigateToSource, checkAdd, checkDelete, clone, copy, delete, deleteChildRange, findChildByClass, findChildrenByClass, findElementAt, findReferenceAt, getChildren, getContainingFile, getContext, getFirstChild, getLanguage, getLastChild, getName, getNavigationElement, getNextSibling, getNode, getOriginalElement, getParent, getPresentation, getPrevSibling, getProject, getReference, getReferences, getResolveScope, getUseScope, isEquivalentTo, isPhysical, isValid, isWritable, navigate, replacecopyTo, getChars, getFirstChildNode, getLastChildNode, getText, getTextLength, hc, isParsed, rawAddChildrenWithoutNotifications, setParsingAllowed, textMatchesacceptTree, addChild, addChild, addChildren, addLeaf, countChildren, createPsiNoLock, deleteChildInternal, findChildByRoleAsPsiElement, findChildByType, findChildByType, findChildByType, findChildByType, findLeafElementAt, findPsiChildByType, findPsiChildByType, getCachedLength, getChildren, getChildrenAsPsiElements, getChildrenAsPsiElements, getChildRole, getPsi, getPsi, rawAddChildren, rawFirstChild, rawLastChild, rawRemoveAllChildren, removeAllChildren, removeChild, removeRange, replaceAllChildrenToChildrenOf, replaceChild, replaceChildInternal, setPsi, subtreeChanged, textContains, textToCharArraycopyElement, equals, getElementType, getManager, getStartOffset, getStartOffsetInParent, getTextOffset, getTextRange, getTreeNext, getTreeParent, getTreePrev, invalidate, onInvalidated, rawInsertAfterMe, rawInsertBeforeMe, rawRemove, rawRemoveUpTo, rawRemoveUpToLast, rawReplaceWithList, textMatches, textMatches, textMatchesbuildRowIcon, computeBaseIcon, createLayeredIcon, getAdjustedBaseIcon, getBaseIcon, getElementIcon, getIcon, iconWithVisibilityIfNeeded, isNativeFileType, isVisibilitySupported, overlayIcons, registerIconLayer, transformFlagschangeUserMap, clearUserData, copyCopyableDataTo, copyUserDataTo, getCopyableUserData, getUserData, getUserDataString, getUserMap, isUserDataEmpty, putCopyableUserData, putUserData, putUserDataIfAbsent, replace, setUserMapfinalize, getClass, hashCode, notify, notifyAll, wait, wait, waitacceptChildren, add, addAfter, addBefore, addRange, addRangeAfter, addRangeBefore, checkAdd, checkDelete, copy, delete, deleteChildRange, findElementAt, findReferenceAt, getChildren, getContainingFile, getContext, getCopyableUserData, getFirstChild, getLanguage, getLastChild, getManager, getNavigationElement, getNextSibling, getNode, getOriginalElement, getOwnReferences, getParent, getPrevSibling, getProject, getReference, getReferences, getResolveScope, getStartOffsetInParent, getText, getTextLength, getTextOffset, getTextRange, getTextRangeInParent, getUseScope, isEquivalentTo, isPhysical, isValid, isWritable, putCopyableUserData, replace, textContains, textMatches, textMatches, textToCharArraygetUserData, putUserDatagetCopyableUserData, putCopyableUserDatapublic void clearCaches()
clearCaches in class LazyParseableElementpublic PsiStatement [] getStatements()
PsiCodeBlockgetStatements in interface PsiCodeBlockpublic int getStatementCount()
getStatementCount in interface PsiCodeBlockpublic boolean isEmpty()
isEmpty in interface PsiCodeBlockpublic PsiElement getFirstBodyElement()
PsiCodeBlockgetFirstBodyElement in interface PsiCodeBlockpublic PsiElement getLastBodyElement()
PsiCodeBlockgetLastBodyElement in interface PsiCodeBlockpublic PsiJavaToken getLBrace()
PsiCodeBlockgetLBrace in interface PsiCodeBlockpublic PsiJavaToken getRBrace()
PsiCodeBlockgetRBrace in interface PsiCodeBlockpublic TreeElement addInternal(TreeElement first, ASTNode last, ASTNode anchor, java.lang.Boolean before)
addInternal in class CompositeElementpublic ASTNode findChildByRole(int role)
findChildByRole in class CompositeElementpublic int getChildRole(ASTNode child)
getChildRole in class CompositeElementpublic void accept(PsiElementVisitor visitor)
PsiElementaccept in interface PsiElementaccept in class LazyParseablePsiElementvisitor - the visitor to pass the element to.public java.lang.String toString()
PsiElementtoString in interface PsiElementtoString in class LazyParseablePsiElementpublic boolean processDeclarations(PsiScopeProcessor processor, ResolveState state, PsiElement lastParent, PsiElement place)
PsiElementprocessDeclarations in interface PsiElementprocessDeclarations in class LazyParseablePsiElementprocessor - the processor receiving the declarations.lastParent - the child of this element has been processed during the previous
step of the tree up walk (declarations under this element do not need
to be processed again)place - the original element from which the tree up walk was initiated.public boolean shouldChangeModificationCount(PsiElement place)
shouldChangeModificationCount in interface PsiModifiableCodeBlockplace - where change was detected