public static class PsiReferenceBase.Immediate<T extends PsiElement> extends PsiReferenceBase<T>
PsiReferenceBase.Immediate<T extends PsiElement>, PsiReferenceBase.Poly<T extends PsiElement>
myElement, mySoft
ARRAY_FACTORY, EMPTY_ARRAY
Constructor and Description |
---|
Immediate(T element,
boolean soft,
PsiElement resolveTo) |
Immediate(T element,
PsiElement resolveTo) |
Immediate(T element,
TextRange rangeInElement,
boolean soft,
PsiElement resolveTo) |
Immediate(T element,
TextRange rangeInElement,
PsiElement resolveTo) |
Modifier and Type | Method and Description |
---|---|
PsiElement |
handleElementRename(java.lang.String newElementName)
Called when the reference target element has been renamed, in order to change the reference
text according to the new name.
|
PsiElement |
resolve()
Returns the element which is the target of the reference.
|
bindToElement, calculateDefaultRangeInElement, createSelfReference, createSelfReference, getCanonicalText, getElement, getRangeInElement, getValue, isReferenceTo, isSoft, setRangeInElement, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getVariants, resolveReference, resolvesTo
getAbsoluteRange
public Immediate(T element, TextRange rangeInElement, boolean soft, PsiElement resolveTo)
public Immediate(T element, TextRange rangeInElement, PsiElement resolveTo)
public Immediate(T element, boolean soft, PsiElement resolveTo)
public Immediate(T element, PsiElement resolveTo)
public PsiElement handleElementRename(java.lang.String newElementName) throws IncorrectOperationException
PsiReference
handleElementRename
in interface PsiReference
handleElementRename
in class PsiReferenceBase<T extends PsiElement>
newElementName
- the new name of the target element.IncorrectOperationException
- if the rename cannot be handled for some reason.public PsiElement resolve()
PsiReference
null
if it was not possible to resolve the reference to a valid target.PsiPolyVariantReference.multiResolve(boolean)