void () { if (ChangeListManager.getInstance(myProject).isFreezedWithNotification(null)) return; if (myPatches.isEmpty() || (!myContainBasedChanges)) return; final List<AbstractFilePatchInProgress.PatchChange> changes = ContainerUtil.sorted(getAllChanges(), myMyChangeComparator); List<AbstractFilePatchInProgress.PatchChange> selectedChanges = myChangesTreeList.getSelectedChanges(); if (changes.isEmpty()) return; final AbstractFilePatchInProgress.PatchChange selectedChange = !selectedChanges.isEmpty() ? selectedChanges.get(0) : changes.get(0); int selectedIdx = 0; List<ChangeDiffRequestChain.Producer> diffRequestPresentableList = new ArrayList<>(); for (AbstractFilePatchInProgress.PatchChange change : changes) { diffRequestPresentableList.add(createDiffRequestProducer(change)); if (change.equals(selectedChange)) { selectedIdx = diffRequestPresentableList.size() - 1; } } DiffRequestChain chain = new ChangeDiffRequestChain(diffRequestPresentableList, selectedIdx); DiffManager.getInstance().showDiff(myProject, chain, DiffDialogHints.DEFAULT); }