void (@NotNull UndoableAction action) { ClientState state = getClientState(); if (state == null) { return; } ApplicationManager.getApplication().assertWriteIntentLockAcquired(); if (myProject != null && myProject.isDisposed() || state.myCurrentOperationState != OperationState.NONE) { return; } if (state.myCommandLevel == 0) { LOG.assertTrue(action instanceof NonUndoableAction, "Undoable actions allowed inside commands only (see com.intellij.openapi.command.CommandProcessor.executeCommand())"); commandStarted(state, UndoConfirmationPolicy.DEFAULT, false); state.myCurrentMerger.addAction(action); commandFinished(state, "", null); return; } if (isRefresh()) state.myOriginatorReference = null; state.myCurrentMerger.addAction(action); }