@NotNull
  @Override
  public GrTypeDefinition createTypeDefinition(@NotNull String text) throws IncorrectOperationException {
    final GroovyFileBase file = createGroovyFileChecked(text);
    final GrTypeDefinition[] classes = file.getTypeDefinitions();
    if (classes.length != 1) throw new IncorrectOperationException("Incorrect type definition text");
    return classes[0];
  }
@NotNull
  @Override
  public GrTypeDefinition createTypeDefinition(@NotNull String text)