public abstract class JavaStubPsiElement<T extends StubElement> extends StubBasedPsiElementBase<T> implements StubBasedPsiElement<T>
Iconable.IconFlags, Iconable.LastComputedIconCREATION_TRACE, ourTraceStubAstBindingFLAGS_LOCKED, ICON_PLACEHOLDERARRAY_FACTORY, EMPTY_ARRAYICON_FLAG_IGNORE_MASK, ICON_FLAG_OPEN, ICON_FLAG_READ_STATUS, ICON_FLAG_VISIBILITYEMPTY_NAVIGATABLE_ELEMENT_ARRAYEMPTY_NAVIGATION_ITEM_ARRAY| Constructor and Description |
|---|
JavaStubPsiElement(ASTNode node) |
JavaStubPsiElement(T stub,
IStubElementType nodeType) |
| Modifier and Type | Method and Description |
|---|---|
void |
acceptChildren(PsiElementVisitor visitor)
Passes the children of the element to the specified visitor.
|
PsiElement |
add(PsiElement element)
Adds a child to this PSI element.
|
PsiElement |
addAfter(PsiElement element,
PsiElement anchor)
Adds a child to this PSI element, after the specified anchor element.
|
PsiElement |
addBefore(PsiElement element,
PsiElement anchor)
Adds a child to this PSI element, before the specified anchor element.
|
protected CompositeElement |
calcTreeElement() |
void |
checkAdd(PsiElement element)
Checks if it is possible to add the specified element as a child to this element,
and throws an exception if the add is not possible.
|
protected java.lang.Object |
clone() |
protected StubBasedPsiElementBase |
cloneImpl(CompositeElement treeElementClone) |
void |
delete()
Deletes this PSI element from the tree.
|
void |
deleteChildRange(PsiElement first,
PsiElement last)
Deletes a range of children of this PSI element from the tree.
|
PsiElement [] |
getChildren()
Returns the array of children for the PSI element.
|
Language |
getLanguage()
Returns the language of the PSI element.
|
int |
getTextOffset()
Returns the offset in the file to which the caret should be placed
when performing the navigation to the element.
|
PsiElement |
replace(PsiElement newElement)
Replaces this PSI element (along with all its children) with another element
(along with the children).
|
getContainingFile, getContext, getElementType, getGreenStub, getManager, getNode, getParent, getParentByStub, getParentByTree, getProject, getRequiredStubOrPsiChild, getStub, getStubOrPsiChild, getStubOrPsiChildren, getStubOrPsiChildren, getStubOrPsiChildren, getStubOrPsiChildren, getStubOrPsiParentOfType, isPhysical, isValid, isWritable, setNode, setSubstrateRefaddInternal, addRange, addRangeAfter, addRangeBefore, checkDelete, copy, deleteChildInternal, findChildByFilter, findChildByType, findChildByType, findChildrenByType, findChildrenByType, findChildrenByType, findChildrenByType, findElementAt, findLastChildByType, findNotNullChildByType, findNotNullChildByType, getCopyableUserData, getFirstChild, getLastChild, getNextSibling, getPrevSibling, getStartOffsetInParent, getText, getTextLength, getTextRange, putCopyableUserData, replaceChildInternal, subtreeChanged, textContains, textMatches, textToCharArrayaccept, canNavigate, canNavigateToSource, findChildByClass, findChildrenByClass, findNotNullChildByClass, findReferenceAt, getName, getNavigationElement, getOriginalElement, getPresentation, getReference, getReferences, getResolveScope, getUseScope, isEquivalentTo, navigate, notNullChild, processDeclarations, textMatchesbuildRowIcon, computeBaseIcon, createLayeredIcon, getAdjustedBaseIcon, getBaseIcon, getElementIcon, getIcon, iconWithVisibilityIfNeeded, isNativeFileType, isVisibilitySupported, overlayIcons, registerIconLayer, transformFlagschangeUserMap, clearUserData, copyCopyableDataTo, copyUserDataTo, getUserData, getUserDataString, getUserMap, isUserDataEmpty, putUserData, putUserDataIfAbsent, replace, setUserMapequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetElementType, getStubaccept, addRange, addRangeAfter, addRangeBefore, checkDelete, copy, findElementAt, findReferenceAt, getContainingFile, getContext, getCopyableUserData, getFirstChild, getLastChild, getManager, getNavigationElement, getNextSibling, getNode, getOriginalElement, getOwnReferences, getParent, getPrevSibling, getProject, getReference, getReferences, getResolveScope, getStartOffsetInParent, getText, getTextLength, getTextRange, getTextRangeInParent, getUseScope, isEquivalentTo, isPhysical, isValid, isWritable, processDeclarations, putCopyableUserData, textContains, textMatches, textMatches, textToCharArray, toStringgetUserData, putUserDatapublic JavaStubPsiElement(T stub, IStubElementType nodeType)
public JavaStubPsiElement(ASTNode node)
public Language getLanguage()
PsiElementgetLanguage in interface PsiElementgetLanguage in class StubBasedPsiElementBase<T extends StubElement>public int getTextOffset()
PsiElementPsiNamedElement, this should return the offset in the file of the
name identifier.)getTextOffset in interface PsiElementgetTextOffset in class ASTDelegatePsiElementprotected CompositeElement calcTreeElement()
public PsiElement add(PsiElement element) throws IncorrectOperationException
PsiElementadd in interface PsiElementadd in class ASTDelegatePsiElementelement - the child element to add.element or its copy).IncorrectOperationException - if the modification is not supported or not possible for some reason.public PsiElement addBefore(PsiElement element, PsiElement anchor) throws IncorrectOperationException
PsiElementaddBefore in interface PsiElementaddBefore in class ASTDelegatePsiElementelement - the child element to add.anchor - the anchor before which the child element is inserted (must be a child of this PSI element)element or its copy).IncorrectOperationException - if the modification is not supported or not possible for some reason.public PsiElement addAfter(PsiElement element, PsiElement anchor) throws IncorrectOperationException
PsiElementaddAfter in interface PsiElementaddAfter in class ASTDelegatePsiElementelement - the child element to add.anchor - the anchor after which the child element is inserted (must be a child of this PSI element)element or its copy).IncorrectOperationException - if the modification is not supported or not possible for some reason.public final void checkAdd(PsiElement element) throws IncorrectOperationException
PsiElementcheckAdd in interface PsiElementcheckAdd in class ASTDelegatePsiElementelement - the child element to check the add possibility.IncorrectOperationException - if the modification is not supported or not possible for some reason.public void delete()
throws IncorrectOperationException
PsiElementdelete in interface PsiElementdelete in class ASTDelegatePsiElementIncorrectOperationException - if the modification is not supported
or not possible for some reason (for example, the file containing the element is read-only).public void deleteChildRange(PsiElement first, PsiElement last) throws IncorrectOperationException
PsiElementdeleteChildRange in interface PsiElementdeleteChildRange in class ASTDelegatePsiElementfirst - the first child to delete (must be a child of this PSI element)last - the last child to delete (must be a child of this PSI element)IncorrectOperationException - if the modification is not supported or not possible for some reason.public PsiElement replace(PsiElement newElement) throws IncorrectOperationException
PsiElementreplace in interface PsiElementreplace in class ASTDelegatePsiElementnewElement - the element to replace this element with.newElement or its copy)IncorrectOperationException - if the modification is not supported or not possible for some reason.public void acceptChildren(PsiElementVisitor visitor)
PsiElementacceptChildren in interface PsiElementacceptChildren in class PsiElementBasevisitor - the visitor to pass the children to.protected java.lang.Object clone()
clone in class StubBasedPsiElementBase<T extends StubElement>protected StubBasedPsiElementBase cloneImpl(CompositeElement treeElementClone)
public PsiElement [] getChildren()
PsiElementgetChildren in interface PsiElementgetChildren in class ASTDelegatePsiElement