private void removeDelegate(){
    final PsiMethod delegate = myCreatedDelegate;
    if (delegate != null) {
      myCreatedDelegate = null;
      WriteCommandAction.writeCommandAction(myProject).run(() -> delegate.delete());
    }
  }
private void removeDelegate()