void (@NotNull ASTNode child) { if (child.getElementType() == JavaElementType.CLASS) { PsiJavaFile file = SourceTreeToPsiMap.treeToPsiNotNull(this); if (file.getClasses().length == 1) { file.delete(); return; } } super.deleteChildInternal(child); }