if (Character.isLowerCase(typeText.charAt(0))) {
classText = "class A { def " + typeText + " " + name + "}";
} else {
classText = "class A { " + typeText + " " + name + "}";
}
<BUG>GroovyFileBase file = (GroovyFileBase) createGroovyFile(classText);
final GrTypeDefinitionBody body = file.getTypeDefinitions()[0].getBody();</BUG>
return (GrVariableDeclaration) body.getMemberDeclarations()[0];
}
public GrReferenceElement createPackageReferenceElementFromText(String newPackageName) {

if (Character.isLowerCase(typeText.charAt(0))) {
classText = "class A { def " + typeText + " " + name + "}";
} else {
classText = "class A { " + typeText + " " + name + "}";
}
GroovyFileBase file = createGroovyFile(classText);
final GrTypeDefinitionBody body = file.getTypeDefinitions()[0].getBody();
return (GrVariableDeclaration) body.getMemberDeclarations()[0];
}
public GrReferenceElement createPackageReferenceElementFromText(String newPackageName) {
