void (@NotNull final Project project, @NotNull final ProblemDescriptor problemDescriptor) { final PsiClass oldSuperClass = myOldSuperClass.getElement(); final PsiClass newSuperClass = myNewSuperClass.getElement(); if (oldSuperClass == null || newSuperClass == null) return; PsiClass aClass = PsiTreeUtil.getParentOfType(problemDescriptor.getPsiElement(), PsiClass.class, false); if (aClass == null || !FileModificationService.getInstance().preparePsiElementsForWrite(aClass)) return; changeSuperClass(aClass, oldSuperClass, newSuperClass); }