void (@NotNull final PsiReferenceRegistrar registrar) { JavaClassReferenceProvider CLASS_REFERENCE_PROVIDER = new JavaClassReferenceProvider() { @Override public boolean isSoft() { return true; } }; registrar.registerReferenceProvider(PsiJavaPatterns.psiElement(PropertyValueImpl.class), new PsiReferenceProvider() { @Override public boolean acceptsTarget(@NotNull PsiElement target) { return target instanceof PsiClass; } @Override public boolean acceptsHints(@NotNull PsiElement element, PsiReferenceService.@NotNull Hints hints) { if (hints == PsiReferenceService.Hints.HIGHLIGHTED_REFERENCES) return false; return super.acceptsHints(element, hints); } @Override public PsiReference @NotNull [] getReferencesByElement(@NotNull PsiElement element, @NotNull ProcessingContext context) { String text = element.getText(); String[] words = text.split("\\s"); if (words.length != 1) return PsiReference.EMPTY_ARRAY; return CLASS_REFERENCE_PROVIDER.getReferencesByString(words[0], element, 0); } }, PsiReferenceRegistrar.LOWER_PRIORITY); }