GrReferenceExpression (@NotNull String idText) { GroovyFileBase file = createGroovyFileChecked(idText); final GrTopStatement[] statements = file.getTopStatements(); if (!(statements.length == 1 && statements[0] instanceof GrReferenceExpression)) throw new IncorrectOperationException(idText); return (GrReferenceExpression) statements[0]; }