void (@NotNull Project project, @NotNull PsiElement element, @NotNull ModPsiUpdater updater) { final GrIfStatement ifStatement = (GrIfStatement) element.getParent(); assert ifStatement != null; final GrStatement thenBranch = ifStatement.getThenBranch(); final GrStatement elseBranch = ifStatement.getElseBranch(); final GrExpression condition = ifStatement.getCondition(); // todo still needs some handling for conflicting declarations if (isFalse(condition)) { if (elseBranch != null) { replaceStatement(ifStatement, (GrStatement)elseBranch.copy()); } else { ifStatement.delete(); } } else { replaceStatement(ifStatement, (GrStatement)thenBranch.copy()); } }