From 72fbe54d5a0fcb2a3da0dc0d111d827d9a217be2 Mon Sep 17 00:00:00 2001 From: Aleksey Pivovarov Date: Thu, 17 Mar 2016 19:36:52 +0300 Subject: [PATCH] IDEA-153112 vcs: register shortcuts in "Show Diff For Selection" dialog --- .../openapi/vcs/history/impl/VcsSelectionHistoryDialog.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/history/impl/VcsSelectionHistoryDialog.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/history/impl/VcsSelectionHistoryDialog.java index ea47c68786dd..fb723833deeb 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/history/impl/VcsSelectionHistoryDialog.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/history/impl/VcsSelectionHistoryDialog.java @@ -216,6 +216,10 @@ public class VcsSelectionHistoryDialog extends FrameWrapper implements DataProvi popupActions.add(ActionManager.getInstance().getAction(VcsActions.ACTION_COPY_REVISION_NUMBER)); PopupHandler.installPopupHandler(myList, popupActions, ActionPlaces.UPDATE_POPUP, ActionManager.getInstance()); + for (AnAction action : popupActions.getChildren(null)) { + action.registerCustomShortcutSet(action.getShortcutSet(), mySplitter); + } + setTitle(title); setComponent(mySplitter); setPreferredFocusedComponent(myList); @@ -460,6 +464,7 @@ public class VcsSelectionHistoryDialog extends FrameWrapper implements DataProvi private class MyDiffAction extends DumbAwareAction { public MyDiffAction() { super(VcsBundle.message("action.name.compare"), VcsBundle.message("action.description.compare"), AllIcons.Actions.Diff); + setShortcutSet(CommonShortcuts.getDiff()); } public void update(final AnActionEvent e) { @@ -489,6 +494,7 @@ public class VcsSelectionHistoryDialog extends FrameWrapper implements DataProvi super(VcsBundle.message("show.diff.with.local.action.text"), VcsBundle.message("show.diff.with.local.action.description"), AllIcons.Actions.DiffWithCurrent); + setShortcutSet(ActionManager.getInstance().getAction("Vcs.ShowDiffWithLocal").getShortcutSet()); } public void update(final AnActionEvent e) {