void () { final VirtualFile f1 = createChildData(myRoot, "f1.java"); final VirtualFile f2 = createChildData(myRoot, "f2.java"); final VirtualFile f3 = createChildData(myRoot, "f3.java"); assertUndoNotAvailable(getEditor(f1)); assertUndoNotAvailable(getEditor(f2)); assertUndoNotAvailable(getEditor(f3)); CommandProcessor.getInstance().executeCommand(myProject, () -> { CommandProcessor.getInstance().addAffectedDocuments(myProject, FileDocumentManager.getInstance().getDocument(f2)); CommandProcessor.getInstance().addAffectedFiles(myProject, f3); }, null, null); assertUndoNotAvailable(getEditor(f1)); assertUndoNotAvailable(getEditor(f2)); assertUndoNotAvailable(getEditor(f3)); myManager.flushCurrentCommandMerger(); assertUndoNotAvailable(getEditor(f1)); assertUndoNotAvailable(getEditor(f2)); assertUndoNotAvailable(getEditor(f3)); }