void (@NotNull PsiElement context, @NotNull PsiJavaCodeReferenceElement reference, @NotNull PsiModifierListOwner owner) { PsiAnnotation annotation = getPreviewFeatureAnnotation(owner); HighlightingFeature feature = HighlightingFeature.fromPreviewFeatureAnnotation(annotation); if (feature == null) return; if (isParticipating(reference, owner)) return; @NotNull String name; if (owner instanceof PsiMember member) { PsiClass className = member.getContainingClass(); String methodName = member.getName(); if (member instanceof PsiClass psiClass) { name = Objects.requireNonNull(psiClass.getQualifiedName()); } else if (member instanceof PsiMethod method && method.isConstructor()) { name = className != null && className.getQualifiedName() != null ? className.getQualifiedName() : reference.getQualifiedName(); } else { name = className != null && methodName != null ? className.getQualifiedName() + "#" + methodName : reference.getQualifiedName(); } } else { name = reference.getQualifiedName(); } String description = JavaBundle.message("inspection.preview.feature.0.is.preview.api.message", name); registerProblem(context, description, feature, annotation); }