public class MethodPropertyReference extends BasicAttributeValueReference
myElement, myRange
ARRAY_FACTORY, EMPTY_ARRAY
Constructor and Description |
---|
MethodPropertyReference(PsiElement element,
boolean readable) |
Modifier and Type | Method and Description |
---|---|
protected PsiElement |
getClassReferencesElement() |
java.lang.Object [] |
getVariants()
Returns the array of String,
PsiElement and/or LookupElement
instances representing all identifiers that are visible at the location of the reference. |
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.
|
boolean |
isSoft()
Returns
false if the underlying element is guaranteed to be a reference, or true
if the underlying element is a possible reference which should not be reported as
an error if it fails to resolve. |
PsiElement |
resolve()
Returns the element which is the target of the reference.
|
protected PsiClass |
resolveClass() |
bindToElement, getCanonicalText, getElement, getRangeInElement, isReferenceTo
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
resolveReference, resolvesTo
getAbsoluteRange
public MethodPropertyReference(PsiElement element, boolean readable)
protected PsiClass resolveClass()
protected PsiElement getClassReferencesElement()
public PsiElement resolve()
PsiReference
null
if it was not possible to resolve the reference to a valid target.PsiPolyVariantReference.multiResolve(boolean)
public PsiElement handleElementRename(java.lang.String _newElementName) throws IncorrectOperationException
PsiReference
handleElementRename
in interface PsiReference
handleElementRename
in class BasicAttributeValueReference
_newElementName
- the new name of the target element.IncorrectOperationException
- if the rename cannot be handled for some reason.public java.lang.Object [] getVariants()
PsiReference
PsiElement
and/or LookupElement
instances representing all identifiers that are visible at the location of the reference. The contents
of the returned array is used to build the lookup list for basic code completion. (The list
of visible identifiers may not be filtered by the completion prefix string - the
filtering is performed later by the IDE.)
This method is default since 2018.3.
public boolean isSoft()
PsiReference
false
if the underlying element is guaranteed to be a reference, or true
if the underlying element is a possible reference which should not be reported as
an error if it fails to resolve. For example, a text in an XML file which looks
like a full-qualified Java class name is a soft reference.true
if the reference is soft, false
otherwise.