From c05e3bb255e3bc4c310e22d24bcd128ceacf580d Mon Sep 17 00:00:00 2001 From: Aleksey Pivovarov Date: Fri, 12 Feb 2016 20:10:04 +0300 Subject: [PATCH] IDEA-151632 vcs: avoid rewriting ShortcutSet for global actions follow-up 6095a02 --- .../intellij/openapi/vcs/changes/UnversionedViewDialog.java | 3 +-- .../openapi/vcs/changes/ui/MultipleChangeListBrowser.java | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/UnversionedViewDialog.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/UnversionedViewDialog.java index a800e70aeaed..59c1963ff729 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/UnversionedViewDialog.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/UnversionedViewDialog.java @@ -152,8 +152,7 @@ public class UnversionedViewDialog extends DialogWrapper { } // special shortcut for deleting a file - AnAction deleteAction = ActionManager.getInstance().getAction("ChangesView.DeleteUnversioned.From.Dialog"); - deleteAction.registerCustomShortcutSet(CommonShortcuts.getDelete(), myView); + EmptyAction.registerWithShortcutSet("ChangesView.DeleteUnversioned.From.Dialog", CommonShortcuts.getDelete(), myView); } private void refreshViewAfterActionPerformed(@NotNull final ActionGroup opActionGroup) { diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/MultipleChangeListBrowser.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/MultipleChangeListBrowser.java index ec2f90bd78e1..89696425a51b 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/MultipleChangeListBrowser.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/MultipleChangeListBrowser.java @@ -217,10 +217,8 @@ public class MultipleChangeListBrowser extends ChangesBrowser { protected void buildToolBar(final DefaultActionGroup toolBarGroup) { super.buildToolBar(toolBarGroup); - ActionManager actionManager = ActionManager.getInstance(); - final AnAction moveAction = actionManager.getAction(IdeActions.MOVE_TO_ANOTHER_CHANGE_LIST); - moveAction.registerCustomShortcutSet(CommonShortcuts.getMove(), myViewer); - toolBarGroup.add(moveAction); + EmptyAction.registerWithShortcutSet(IdeActions.MOVE_TO_ANOTHER_CHANGE_LIST, CommonShortcuts.getMove(), myViewer); + toolBarGroup.add(ActionManager.getInstance().getAction(IdeActions.MOVE_TO_ANOTHER_CHANGE_LIST)); } @Override