diff --git a/plugins/groovy/src/org/jetbrains/plugins/groovy/lang/psi/impl/GroovyPsiElementFactoryImpl.java b/plugins/groovy/src/org/jetbrains/plugins/groovy/lang/psi/impl/GroovyPsiElementFactoryImpl.java index f7e81e7f8f1d..706c297ea37e 100644 --- a/plugins/groovy/src/org/jetbrains/plugins/groovy/lang/psi/impl/GroovyPsiElementFactoryImpl.java +++ b/plugins/groovy/src/org/jetbrains/plugins/groovy/lang/psi/impl/GroovyPsiElementFactoryImpl.java @@ -260,7 +260,7 @@ public class GroovyPsiElementFactoryImpl extends GroovyPsiElementFactory { } public GrClosableBlock createClosureFromText(String closureText, PsiElement context) throws IncorrectOperationException { - GroovyFile psiFile = createGroovyFile("def foo = " + closureText, false, context); + GroovyFile psiFile = createGroovyFile("def __hdsjfghk_sdhjfshglk_foo = " + closureText, false, context); final GrStatement st = psiFile.getStatements()[0]; LOG.assertTrue(st instanceof GrVariableDeclaration, closureText); final GrExpression initializer = ((GrVariableDeclaration)st).getVariables()[0].getInitializerGroovy(); @@ -282,7 +282,7 @@ public class GroovyPsiElementFactoryImpl extends GroovyPsiElementFactory { public GrParameter createParameter(String name, @Nullable String typeText, @Nullable String initializer, @Nullable GroovyPsiElement context) throws IncorrectOperationException { StringBuilder fileText = new StringBuilder(); - fileText.append("def foo("); + fileText.append("def dsfsadfnbhfjks_weyripouh_huihnrecuio("); if (typeText != null) { fileText.append(typeText).append(" "); } else { @@ -433,7 +433,7 @@ public class GroovyPsiElementFactoryImpl extends GroovyPsiElementFactory { @NotNull @Override public GrAnnotation createAnnotationFromText(@NotNull @NonNls String annotationText, @Nullable PsiElement context) throws IncorrectOperationException { - return createMethodFromText(annotationText + " void foo() {}", context).getModifierList().getAnnotations()[0]; + return createMethodFromText(annotationText + " void ___shdjklf_pqweirupncp_foo() {}", context).getModifierList().getAnnotations()[0]; } @Override