public abstract class FakePsiElement extends PsiElementBase implements PsiNamedElement, ItemPresentation
Iconable.IconFlags, Iconable.LastComputedIconFLAGS_LOCKED, ICON_PLACEHOLDEREMPTY_ARRAYARRAY_FACTORYICON_FLAG_IGNORE_MASK, ICON_FLAG_OPEN, ICON_FLAG_READ_STATUS, ICON_FLAG_VISIBILITYEMPTY_NAVIGATABLE_ELEMENT_ARRAYEMPTY_NAVIGATION_ITEM_ARRAY| Constructor and Description |
|---|
FakePsiElement() |
| Modifier and Type | Method and Description |
|---|---|
PsiElement |
findElementAt(int offset)
Finds a leaf PSI element at the specified offset from the start of the text range of this node.
|
PsiElement [] |
getChildren()
Returns the array of children for the PSI element.
|
protected javax.swing.Icon |
getElementIcon(int flags) |
PsiElement |
getFirstChild()
Returns the first child of the PSI element.
|
javax.swing.Icon |
getIcon(boolean open)
Returns the icon representing the object.
|
javax.swing.Icon |
getIcon(int flags) |
Language |
getLanguage()
Returns the language of the PSI element.
|
PsiElement |
getLastChild()
Returns the last child of the PSI element.
|
java.lang.String |
getLocationString()
Returns the location of the object (for example, the package of a class).
|
PsiManager |
getManager()
Returns the PSI manager for the project to which the PSI element belongs.
|
PsiElement |
getNextSibling()
Returns the next sibling of the PSI element.
|
ASTNode |
getNode()
Returns the AST node corresponding to the element.
|
java.lang.String |
getPresentableText()
Returns the name of the object to be presented in most renderers across the program.
|
ItemPresentation |
getPresentation() |
PsiElement |
getPrevSibling()
Returns the previous sibling of the PSI element.
|
int |
getStartOffsetInParent()
Returns the text offset of the PSI element relative to its parent.
|
java.lang.String |
getText()
Returns the text of the PSI element.
|
int |
getTextLength()
Returns the length of text 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.
|
TextRange |
getTextRange()
Returns the text range in the document occupied by the PSI element.
|
boolean |
isPhysical()
Checks if an actual source or class file corresponds to the element.
|
PsiElement |
setName(java.lang.String name)
Renames the element.
|
boolean |
textContains(char c)
Checks if the text of this element contains the specified character.
|
char [] |
textToCharArray()
Returns the text of the PSI element as a character array.
|
accept, acceptChildren, add, addAfter, addBefore, addRange, addRangeAfter, addRangeBefore, canNavigate, canNavigateToSource, checkAdd, checkDelete, copy, delete, deleteChildRange, findChildByClass, findChildrenByClass, findNotNullChildByClass, findReferenceAt, getContainingFile, getContext, getName, getNavigationElement, getOriginalElement, getProject, getReference, getReferences, getResolveScope, getUseScope, isEquivalentTo, isValid, isWritable, navigate, notNullChild, processDeclarations, replace, textMatches, textMatchesbuildRowIcon, computeBaseIcon, createLayeredIcon, getAdjustedBaseIcon, getBaseIcon, iconWithVisibilityIfNeeded, isNativeFileType, isVisibilitySupported, overlayIcons, registerIconLayer, transformFlagschangeUserMap, clearUserData, clone, copyCopyableDataTo, copyUserDataTo, getCopyableUserData, getUserData, getUserDataString, getUserMap, isUserDataEmpty, putCopyableUserData, putUserData, putUserDataIfAbsent, replace, setUserMapequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetNameaccept, acceptChildren, add, addAfter, addBefore, addRange, addRangeAfter, addRangeBefore, checkAdd, checkDelete, copy, delete, deleteChildRange, findReferenceAt, getContainingFile, getContext, getCopyableUserData, getNavigationElement, getOriginalElement, getOwnReferences, getParent, getProject, getReference, getReferences, getResolveScope, getTextRangeInParent, getUseScope, isEquivalentTo, isValid, isWritable, processDeclarations, putCopyableUserData, replace, textMatches, textMatches, toStringgetUserData, putUserDatapublic ItemPresentation getPresentation()
getPresentation in interface NavigationItemgetPresentation in class PsiElementBasepublic Language getLanguage()
PsiElementgetLanguage in interface PsiElementpublic PsiElement [] getChildren()
PsiElementgetChildren in interface PsiElementpublic PsiElement getFirstChild()
PsiElementgetFirstChild in interface PsiElementgetFirstChild in class PsiElementBasepublic PsiElement getLastChild()
PsiElementgetLastChild in interface PsiElementgetLastChild in class PsiElementBasepublic PsiElement getNextSibling()
PsiElementgetNextSibling in interface PsiElementgetNextSibling in class PsiElementBasepublic PsiElement getPrevSibling()
PsiElementgetPrevSibling in interface PsiElementgetPrevSibling in class PsiElementBasepublic TextRange getTextRange()
PsiElementgetTextRange in interface PsiElementpublic int getStartOffsetInParent()
PsiElementgetStartOffsetInParent in interface PsiElementpublic int getTextLength()
PsiElementgetTextLength in interface PsiElementpublic PsiElement findElementAt(int offset)
PsiElementfindElementAt in interface PsiElementoffset - the relative offset for which the PSI element is requested.public int getTextOffset()
PsiElementPsiNamedElement, this should return the offset in the file of the
name identifier.)getTextOffset in interface PsiElementpublic java.lang.String getText()
PsiElementgetText in interface PsiElementPsiElement.textMatches(java.lang.CharSequence),
PsiElement.textContains(char)public char [] textToCharArray()
PsiElementtextToCharArray in interface PsiElementpublic boolean textContains(char c)
PsiElementtextContains in interface PsiElementtextContains in class PsiElementBasec - the character to search for.public ASTNode getNode()
PsiElementgetNode in interface PsiElementpublic java.lang.String getPresentableText()
ItemPresentationgetPresentableText in interface ItemPresentationpublic java.lang.String getLocationString()
ItemPresentationgetLocationString in interface ItemPresentationpublic final javax.swing.Icon getIcon(int flags)
getIcon in interface IconablegetIcon in class ElementBaseprotected final javax.swing.Icon getElementIcon(int flags)
getElementIcon in class ElementBasepublic javax.swing.Icon getIcon(boolean open)
ItemPresentationgetIcon in interface ItemPresentationopen - Used to mean if open/close icons for tree renderer. No longer in use. The parameter is only there for API compatibility reason.public PsiElement setName(java.lang.String name) throws IncorrectOperationException
PsiNamedElementsetName in interface PsiNamedElementname - the new element name.this
or a different element if the rename caused the element to be replaced).IncorrectOperationException - if the modification is not supported or not possible for some reason.public PsiManager getManager()
PsiElementgetManager in interface PsiElementgetManager in class PsiElementBasepublic boolean isPhysical()
PsiElementPsiDocumentManager.getDocument(PsiFile) returns null for non-physical elements.
Not to be confused with FileViewProvider.isPhysical().isPhysical in interface PsiElementisPhysical in class PsiElementBase