void (@NotNull AnActionEvent e) { boolean isEnabled = ContainerUtil.exists(myChangesTreeList.getSelectedChanges(), change -> change.getPatchInProgress().canUp()); e.getPresentation().setEnabled(isEnabled); }