IDEA-153112 vcs: register shortcuts in "Show Diff For Selection" dialog

This commit is contained in:
Aleksey Pivovarov
2016-03-17 19:57:07 +03:00
parent 6158cdad02
commit 72fbe54d5a
@@ -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) {