@Override
    protected @NotNull PsiElement substituteElement(@NotNull PsiElement element) {
      if (element instanceof PsiJavaReference) {
        PsiElement resolved = ((PsiJavaReference)element).resolve();
        if (resolved != null) return resolved;
      }
      return element;
    }
@Override
    protected @NotNull PsiElement substituteElement(@NotNull PsiElement element)