From 465c57fe2223dfb358ed67359552ab5cb150cc40 Mon Sep 17 00:00:00 2001 From: Aleksey Pivovarov Date: Tue, 1 May 2018 14:24:13 +0300 Subject: [PATCH] IDEA-182879 vcs: remove rarely used actions from "Local History" toolbar --- .../ui/views/DirectoryHistoryDialog.java | 29 ++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/platform/lvcs-impl/src/com/intellij/history/integration/ui/views/DirectoryHistoryDialog.java b/platform/lvcs-impl/src/com/intellij/history/integration/ui/views/DirectoryHistoryDialog.java index 015f33c17637..42c9d2669b63 100644 --- a/platform/lvcs-impl/src/com/intellij/history/integration/ui/views/DirectoryHistoryDialog.java +++ b/platform/lvcs-impl/src/com/intellij/history/integration/ui/views/DirectoryHistoryDialog.java @@ -30,6 +30,7 @@ import com.intellij.openapi.vcs.changes.Change; import com.intellij.openapi.vcs.changes.actions.diff.ShowDiffAction; import com.intellij.openapi.vcs.changes.actions.diff.ShowDiffContext; import com.intellij.openapi.vcs.changes.ui.ChangesTreeImpl; +import com.intellij.openapi.vcs.changes.ui.TreeActionsToolbarPanel; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.ui.*; import com.intellij.util.containers.ContainerUtil; @@ -70,20 +71,22 @@ public class DirectoryHistoryDialog extends HistoryDialog new ShowDifferenceAction().performIfEnabled()); - myChangesTree.installPopupHandler(createChangesTreeActions(root)); + + new ShowDifferenceAction().registerCustomShortcutSet(root, null); + + myChangesTree.installPopupHandler(createChangesTreeActions()); } - private ActionGroup createChangesTreeActions(JComponent root) { + private ActionGroup createChangesTreeActions() { DefaultActionGroup result = new DefaultActionGroup(); - ShowDifferenceAction a = new ShowDifferenceAction(); - a.registerCustomShortcutSet(CommonShortcuts.getDiff(), root); - result.add(a); + result.add(new ShowDifferenceAction()); result.add(new RevertSelectionAction()); - result.addSeparator(); - result.addAll(myChangesTree.getTreeActions()); return result; } @@ -157,6 +159,7 @@ public class DirectoryHistoryDialog extends HistoryDialog