@Override
    public void deleteElement() throws IncorrectOperationException {
      if (!myIsMethodUsage) return;
      PsiElement element = getElement();
      if (element instanceof PsiLambdaExpression) {
        PsiAnonymousClass aClass = LambdaCanBeReplacedWithAnonymousInspection.doFix(getProject(), (PsiLambdaExpression)element);
        if (aClass == null) return;
        PsiFile file = aClass.getContainingFile();
        if (file == null) return;
        if (!JavaCodeStyleSettings.getInstance(file).INSERT_OVERRIDE_ANNOTATION) return;
        PsiMethod[] methods = aClass.getMethods();
        if (methods.length != 1) return;
        PsiAnnotation overrideAnnotation = AnnotationUtil.findAnnotation(methods[0], true, CommonClassNames.JAVA_LANG_OVERRIDE);
        if (overrideAnnotation != null) {
          overrideAnnotation.delete();
        }
      }
      else if (element instanceof PsiMethodReferenceExpression) {
        // todo convert method ref to anonymous class
      }
    }
@Override
    public void deleteElement()