public abstract class ResolvingConverter<T> extends Converter<T> implements ResolvingHint
PsiReference
will take completion variants from getVariants(ConvertContext)
method.Modifier and Type | Class and Description |
---|---|
static class |
ResolvingConverter.StringConverter
Adds
getVariants(ConvertContext) functionality to a simple String value. |
static class |
ResolvingConverter.WrappedResolvingConverter<T>
Adds
getVariants(ConvertContext) functionality to an existing converter. |
Modifier and Type | Field and Description |
---|---|
static Converter<java.lang.Boolean> |
BOOLEAN_CONVERTER
Deprecated.
|
static ResolvingConverter |
EMPTY_CONVERTER
Deprecated.
unnecessary
|
INTEGER_CONVERTER
Constructor and Description |
---|
ResolvingConverter() |
fromString, toString
@Deprecated public static final ResolvingConverter EMPTY_CONVERTER
@Deprecated public static final Converter<java.lang.Boolean> BOOLEAN_CONVERTER
BooleanValueConverter
public java.lang.String getErrorMessage(java.lang.String s, ConvertContext context)
getErrorMessage
in class Converter<T>
s
- string value that couldn't be resolvedcontext
- contextpublic abstract java.util.Collection<? extends T> getVariants(ConvertContext context)
context
- context@Deprecated public java.util.Set<java.lang.String> getAdditionalVariants()
getAdditionalVariants(ConvertContext)
public java.util.Set<java.lang.String> getAdditionalVariants(ConvertContext context)
public void handleElementRename(GenericDomValue<T> genericValue, ConvertContext context, java.lang.String newElementName)
PsiReference.handleElementRename(String)
genericValue
- generic valuecontext
- contextnewElementName
- new element namepublic void bindReference(GenericDomValue<T> genericValue, ConvertContext context, PsiElement newTarget)
PsiReference.bindToElement(com.intellij.psi.PsiElement)
genericValue
- generic valuecontext
- contextnewTarget
- new targetpublic PsiElement getPsiElement(T resolvedValue)
resolvedValue
- Converter.fromString(String, ConvertContext)
resultPsiReference
will resolvepublic boolean isReferenceTo(PsiElement element, java.lang.String stringValue, T resolveResult, ConvertContext context)
PsiReference.isReferenceTo(com.intellij.psi.PsiElement)
element
- elementstringValue
- string valueresolveResult
- resolve resultcontext
- contextpublic boolean canResolveTo(java.lang.Class<? extends PsiElement> elementClass)
canResolveTo
in interface ResolvingHint
public PsiElement resolve(T o, ConvertContext context)
PsiReference.resolve()
o
- Converter.fromString(String, ConvertContext)
resultcontext
- contextgetPsiElement(Object)
methodpublic LocalQuickFix[] getQuickFixes(ConvertContext context)
context
- contextpublic LookupElement createLookupElement(T t)
null
which will create lookup via
ElementPresentationManager.createVariant(java.lang.Object, java.lang.String, com.intellij.psi.PsiElement)
.t
- DOM to create lookup element for.