void (@NotNull Project project, @NotNull ProblemDescriptor descriptor) { final PsiElement element = descriptor.getPsiElement().getParent(); if (!(element instanceof PsiNamedElement)) return; SafeDeleteHandler.invoke(project, new PsiElement[]{element}, false); }