@Override public boolean isReferenceTo(final PsiElement element) { final Converter<T> converter = getConverter(); if (converter instanceof ResolvingConverter) { T value = myGenericValue.getValue(); if (value instanceof DomElement && element instanceof PomTargetPsiElementImpl) { PomTarget target = ((PomTargetPsiElementImpl)element).getTarget(); if (target instanceof DomTarget) { if (value.equals(((DomTarget)target).getDomElement())) { return true; } } } return ((ResolvingConverter<T>)converter).isReferenceTo(element, getStringValue(), value, getConvertContext()); } return super.isReferenceTo(element); }
public boolean isReferenceTo(final PsiElement element) { final Converter<T> converter = getConverter(); if (converter instanceof ResolvingConverter) { T value = myGenericValue.getValue(); if (value instanceof DomElement && element instanceof PomTargetPsiElementImpl) { PomTarget target = ((PomTargetPsiElementImpl)element).getTarget(); if (target instanceof DomTarget) { if (value.equals(((DomTarget)target).getDomElement())) { return true; } } } return ((ResolvingConverter<T>)converter).isReferenceTo(element, getStringValue(), value, getConvertContext()); } return super.isReferenceTo(element); }
@NotNull @Override public PsiElement convertToPsi(@NotNull PomTarget target) { if (target instanceof PsiElement) { return (PsiElement)target; } return new PomTargetPsiElementImpl(myProject, target); }
@Nonnull @Override public PsiElement convertToPsi(@Nonnull PomTarget target) { if (target instanceof PsiElement) { return (PsiElement)target; } return new PomTargetPsiElementImpl(myProject, target); }