This commit is contained in:
Max Medvedev
2013-02-27 17:08:57 +04:00
parent ea917a3db4
commit 72f87c065e
@@ -421,7 +421,7 @@ public class GroovyPsiElementFactoryImpl extends GroovyPsiElementFactory {
}
public PsiElement createModifierFromText(String name) {
final GroovyFileBase file = createGroovyFileChecked(name + "foo() {}");
final GroovyFileBase file = createGroovyFileChecked(name + " foo() {}");
final GrTopLevelDefinition[] definitions = file.getTopLevelDefinitions();
if (definitions.length != 1) throw new IncorrectOperationException(name);
return definitions[0].getFirstChild().getFirstChild();