void (final @NotNull Project project, final @NotNull ProblemDescriptor descriptor) { final PsiMethod psiMethod = PsiTreeUtil.getParentOfType(descriptor.getPsiElement(), PsiMethod.class, false); if (psiMethod != null) { final List<PsiElement> psiElements = new ArrayList<>(); psiElements.add(psiMethod); if (Boolean.valueOf(myHint).booleanValue()) { final Query<Pair<PsiMethod, PsiMethod>> query = AllOverridingMethodsSearch.search(psiMethod.getContainingClass()); query.forEach(pair -> { if (pair.first == psiMethod) { psiElements.add(pair.second); } return true; }); } ApplicationManager.getApplication().invokeLater(() -> SafeDeleteHandler.invoke(project, PsiUtilCore.toPsiElementArray(psiElements), false), project.getDisposed()); } }