public class XmlEnumeratedValueReference extends PsiReferenceBase<XmlElement> implements EmptyResolveMessageProvider, ResolvingHint
PsiReferenceBase.Immediate<T extends PsiElement>, PsiReferenceBase.Poly<T extends PsiElement>
myElement, mySoft
ARRAY_FACTORY, EMPTY_ARRAY
Constructor and Description |
---|
XmlEnumeratedValueReference(XmlElement value,
XmlEnumerationDescriptor descriptor) |
XmlEnumeratedValueReference(XmlElement value,
XmlEnumerationDescriptor descriptor,
TextRange range) |
Modifier and Type | Method and Description |
---|---|
boolean |
canResolveTo(java.lang.Class<? extends PsiElement> elementClass) |
java.lang.String |
getUnresolvedMessagePattern()
Returns custom unresolved message pattern.
|
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 |
resolve()
Returns the element which is the target of the reference.
|
bindToElement, calculateDefaultRangeInElement, createSelfReference, createSelfReference, getCanonicalText, getElement, getRangeInElement, getValue, handleElementRename, isReferenceTo, isSoft, setRangeInElement, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
resolveReference, resolvesTo
getAbsoluteRange
public XmlEnumeratedValueReference(XmlElement value, XmlEnumerationDescriptor descriptor)
public XmlEnumeratedValueReference(XmlElement value, XmlEnumerationDescriptor descriptor, TextRange range)
public boolean canResolveTo(java.lang.Class<? extends PsiElement> elementClass)
canResolveTo
in interface ResolvingHint
public PsiElement resolve()
PsiReference
resolve
in interface PsiReference
null
if it was not possible to resolve the reference to a valid target.PsiPolyVariantReference.multiResolve(boolean)
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.
getVariants
in interface PsiReference
public java.lang.String getUnresolvedMessagePattern()
EmptyResolveMessageProvider
MessageFormat.format()
call.
If the call fails, returned value is used as is.
Resulting text should have Sentence capitalization.getUnresolvedMessagePattern
in interface EmptyResolveMessageProvider