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