public class JavaIdentifier extends LightIdentifier
Iconable.IconFlags, Iconable.LastComputedIcon
myManager
FLAGS_LOCKED, ICON_PLACEHOLDER
EMPTY_ARRAY
ARRAY_FACTORY
ICON_FLAG_IGNORE_MASK, ICON_FLAG_OPEN, ICON_FLAG_READ_STATUS, ICON_FLAG_VISIBILITY
EMPTY_NAVIGATABLE_ELEMENT_ARRAY
EMPTY_NAVIGATION_ITEM_ARRAY
Constructor and Description |
---|
JavaIdentifier(PsiManager manager,
PsiElement element) |
Modifier and Type | Method and Description |
---|---|
PsiElement |
copy()
Creates a copy of the file containing the PSI element and returns the corresponding
element in the created copy.
|
PsiFile |
getContainingFile()
Returns the file containing the PSI element.
|
PsiElement |
getNavigationElement()
Returns the PSI element which should be used as a navigation target
when navigation to this PSI element is requested.
|
PsiElement |
getNextSibling()
Returns the next sibling of the PSI element.
|
PsiElement |
getParent()
Returns the parent of the PSI element.
|
PsiElement |
getPrevSibling()
Returns the previous sibling of the PSI element.
|
int |
getStartOffsetInParent()
Returns the text offset of the PSI element relative to its parent.
|
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 |
isValid()
Checks if this PSI element is valid.
|
accept, getText, getTokenType, toString
add, addAfter, addBefore, checkAdd, checkDelete, delete, findElementAt, getChildren, getLanguage, getManager, getNode, getTextLength, isPhysical, isWritable, replace, setNavigationElement, textMatches, textMatches, textToCharArray
acceptChildren, addRange, addRangeAfter, addRangeBefore, canNavigate, canNavigateToSource, deleteChildRange, findChildByClass, findChildrenByClass, findNotNullChildByClass, findReferenceAt, getContext, getFirstChild, getLastChild, getName, getOriginalElement, getPresentation, getProject, getReference, getReferences, getResolveScope, getUseScope, isEquivalentTo, navigate, notNullChild, processDeclarations, textContains
buildRowIcon, computeBaseIcon, createLayeredIcon, getAdjustedBaseIcon, getBaseIcon, getElementIcon, getIcon, iconWithVisibilityIfNeeded, isNativeFileType, isVisibilitySupported, overlayIcons, registerIconLayer, transformFlags
changeUserMap, clearUserData, clone, copyCopyableDataTo, copyUserDataTo, getCopyableUserData, getUserData, getUserDataString, getUserMap, isUserDataEmpty, putCopyableUserData, putUserData, putUserDataIfAbsent, replace, setUserMap
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
acceptChildren, add, addAfter, addBefore, addRange, addRangeAfter, addRangeBefore, checkAdd, checkDelete, delete, deleteChildRange, findElementAt, findReferenceAt, getChildren, getContext, getCopyableUserData, getFirstChild, getLanguage, getLastChild, getManager, getNode, getOriginalElement, getOwnReferences, getProject, getReference, getReferences, getResolveScope, getTextLength, getTextRangeInParent, getUseScope, isEquivalentTo, isPhysical, isWritable, processDeclarations, putCopyableUserData, replace, textContains, textMatches, textMatches, textToCharArray
getUserData, putUserData
public JavaIdentifier(PsiManager manager, PsiElement element)
public PsiElement getNavigationElement()
PsiElement
this
or substitute a different element if this element
does not have an associated file and offset. (For example, if the source code
of a library is attached to a project, the navigation element for a compiled
library class is its source class.)getNavigationElement
in interface PsiElement
getNavigationElement
in class LightElement
public boolean isValid()
PsiElement
PsiDocumentManager.commitDocument(com.intellij.openapi.editor.Document)
).
(In this case an attempt to change PSI will result in an exception).
Any access to invalid elements results in PsiInvalidElementAccessException
.
Once invalid, elements can't become valid again.
Elements become invalid in following cases:
PsiElement.delete()
)isValid
in interface PsiElement
isValid
in class LightElement
PsiUtilCore.ensureValid(PsiElement)
public TextRange getTextRange()
PsiElement
getTextRange
in interface PsiElement
getTextRange
in class LightElement
public PsiFile getContainingFile()
PsiElement
getContainingFile
in interface PsiElement
getContainingFile
in class LightElement
public int getStartOffsetInParent()
PsiElement
getStartOffsetInParent
in interface PsiElement
getStartOffsetInParent
in class LightElement
public int getTextOffset()
PsiElement
PsiNamedElement
, this should return the offset in the file of the
name identifier.)getTextOffset
in interface PsiElement
getTextOffset
in class LightElement
public PsiElement getParent()
PsiElement
getParent
in interface PsiElement
getParent
in class LightElement
public PsiElement getPrevSibling()
PsiElement
getPrevSibling
in interface PsiElement
getPrevSibling
in class LightElement
public PsiElement getNextSibling()
PsiElement
getNextSibling
in interface PsiElement
getNextSibling
in class LightElement
public PsiElement copy()
PsiElement
copy
in interface PsiElement
copy
in class LightIdentifier