void (@NotNull ASTNode child) { if (child == getThenBranch()) { replaceChildInternal(child, (TreeElement)JavaPsiFacade.getElementFactory(getProject()).createStatementFromText("{}", null)); return; } if (child == getElseBranch()) { ASTNode elseKeyword = findChildByRole(ChildRole.ELSE_KEYWORD); if (elseKeyword != null) { super.deleteChildInternal(elseKeyword); } } super.deleteChildInternal(child); }