public static void replaceStatement(GrStatement statement, @NonNls String newStatement) {
    final GroovyPsiElementFactory factory = GroovyPsiElementFactory.getInstance(statement.getProject());
    final GrStatement newCall = (GrStatement)factory.createTopElementFromText(newStatement);
    statement.replaceWithStatement(newCall);
  }
public static void replaceStatement(GrStatement statement, @NonNls String newStatement)