private void onCommandStarted(final Project project, UndoConfirmationPolicy undoConfirmationPolicy, boolean recordOriginalReference) {
    ClientState state = getClientState();
    if (state == null || state.myCommandLevel == 0) {
      for (UndoProvider undoProvider : getUndoProviders()) {
        undoProvider.commandStarted(project);
      }
      if (state != null) {
        state.myCurrentActionProject = project;
      }
    }

    if (state != null) {
      commandStarted(state, undoConfirmationPolicy, myProject == project && recordOriginalReference);
    }

    LOG.assertTrue(state == null || state.myCommandLevel == 0 || !(state.myCurrentActionProject instanceof DummyProject));
  }
private void onCommandStarted(final Project project, UndoConfirmationPolicy undoConfirmationPolicy, boolean recordOriginalReference)