@Override
    public void accept(@NotNull Result result) {
      if (!result.isAborted() && !result.hasErrors()) {
        // do not run after tasks on EDT
        ApplicationManager.getApplication().executeOnPooledThread(() -> {
          try {
            for (ProjectTaskManagerListener listener : myListeners) {
              listener.afterRun(result);
            }
            notify(result);
          }
          catch (ExecutionException e) {
            LOG.debug(e);
            notify(new ResultWrapper(result) {
              @Override
              public boolean hasErrors() {
                return true;
              }
            });
          }
        });
      }
      else {
        notify(result);
      }
    }
@Override
    public void accept(@NotNull Result result)