PsiEnumConstantInitializer () { final GrEnumConstantInitializer initializingClass = getInitializingClass(); if (initializingClass != null) return initializingClass; final GrEnumConstantInitializer initializer = GroovyPsiElementFactory.getInstance(getProject()).createEnumConstantFromText("foo{}").getInitializingClass(); LOG.assertTrue(initializer != null); final GrArgumentList argumentList = getArgumentList(); if (argumentList != null) { return (PsiEnumConstantInitializer)addAfter(initializer, argumentList); } else { return (PsiEnumConstantInitializer)addAfter(initializer, getNameIdentifierGroovy()); } }