public class JavaIdentifier extends LightIdentifier
Iconable.IconFlags, Iconable.LastComputedIconmyManagerFLAGS_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 |
|---|
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, toStringadd, addAfter, addBefore, checkAdd, checkDelete, delete, findElementAt, getChildren, getLanguage, getManager, getNode, getTextLength, isPhysical, isWritable, replace, setNavigationElement, textMatches, textMatches, textToCharArrayacceptChildren, 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, textContainsbuildRowIcon, computeBaseIcon, createLayeredIcon, getAdjustedBaseIcon, getBaseIcon, getElementIcon, getIcon, 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, wait, wait, waitacceptChildren, 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, textToCharArraygetUserData, putUserDatapublic JavaIdentifier(PsiManager manager, PsiElement element)
public PsiElement getNavigationElement()
PsiElementthis 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 PsiElementgetNavigationElement in class LightElementpublic boolean isValid()
PsiElementPsiDocumentManager.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 PsiElementisValid in class LightElementPsiUtilCore.ensureValid(PsiElement)public TextRange getTextRange()
PsiElementgetTextRange in interface PsiElementgetTextRange in class LightElementpublic PsiFile getContainingFile()
PsiElementgetContainingFile in interface PsiElementgetContainingFile in class LightElementpublic int getStartOffsetInParent()
PsiElementgetStartOffsetInParent in interface PsiElementgetStartOffsetInParent in class LightElementpublic int getTextOffset()
PsiElementPsiNamedElement, this should return the offset in the file of the
name identifier.)getTextOffset in interface PsiElementgetTextOffset in class LightElementpublic PsiElement getParent()
PsiElementgetParent in interface PsiElementgetParent in class LightElementpublic PsiElement getPrevSibling()
PsiElementgetPrevSibling in interface PsiElementgetPrevSibling in class LightElementpublic PsiElement getNextSibling()
PsiElementgetNextSibling in interface PsiElementgetNextSibling in class LightElementpublic PsiElement copy()
PsiElementcopy in interface PsiElementcopy in class LightIdentifier