@Override
  protected void doFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) throws IncorrectOperationException {
    GrTypeDefinition psiClass = myPsiClassPointer.getElement();
    if (psiClass == null) return;

    if (psiClass.isInterface()) {
      final GrMethod method = GroovyPsiElementFactory.getInstance(project).createMethodFromText(
        "def " + psiClass.getName() + " " + myMethodName + "();"
      );
      psiClass.add(method);
    }
    else {
      String templName = JavaTemplateUtil.TEMPLATE_IMPLEMENTED_METHOD_BODY;
      final FileTemplate template = FileTemplateManager.getInstance(project).getCodeTemplate(templName);

      Properties properties = FileTemplateManager.getInstance(project).getDefaultProperties();

      String returnType = generateTypeText(psiClass);
      properties.setProperty(FileTemplate.ATTRIBUTE_RETURN_TYPE, returnType);
      properties.setProperty(FileTemplate.ATTRIBUTE_DEFAULT_RETURN_VALUE,
                             PsiTypesUtil.getDefaultValueOfType(JavaPsiFacade.getElementFactory(project).createType(psiClass)));
      properties.setProperty(FileTemplate.ATTRIBUTE_CALL_SUPER, "");
      properties.setProperty(FileTemplate.ATTRIBUTE_CLASS_NAME, psiClass.getQualifiedName());
      properties.setProperty(FileTemplate.ATTRIBUTE_SIMPLE_CLASS_NAME, psiClass.getName());
      properties.setProperty(FileTemplate.ATTRIBUTE_METHOD_NAME, myMethodName);

      try {
        String bodyText = StringUtil.replace(template.getText(properties), ";", "");
        final GrCodeBlock newBody = GroovyPsiElementFactory.getInstance(project).createMethodBodyFromText("\n" + bodyText + "\n");

        final GrMethod method = GroovyPsiElementFactory.getInstance(project).createMethodFromText(
          "", myMethodName, returnType, ArrayUtilRt.EMPTY_STRING_ARRAY, psiClass
        );
        method.setBlock(newBody);
        psiClass.add(method);
      }
      catch (IOException e) {
        LOG.error(e);
      }
    }
  }
@Override
  protected void doFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor)