From af2475a3c9f649556c7c8d3e5bc15e62b17e6201 Mon Sep 17 00:00:00 2001 From: Aleksey Pivovarov Date: Fri, 24 Apr 2015 18:37:21 +0300 Subject: [PATCH] diff: use action with name 'Show Diff' as base for CommonShortcuts.getDiff() --- .../intellij/openapi/actionSystem/CommonShortcuts.java | 2 +- .../com/intellij/openapi/actionSystem/IdeActions.java | 2 +- .../src/messages/ActionsBundle.properties | 2 ++ .../platform-resources/src/idea/Keymap_Default.xml | 3 +++ platform/platform-resources/src/idea/LangActions.xml | 2 +- .../platform-resources/src/idea/PlatformActions.xml | 1 + platform/platform-resources/src/idea/VcsActions.xml | 6 +++--- .../com/intellij/openapi/keymap/KeymapsTestCase.java | 10 +++++----- 8 files changed, 17 insertions(+), 11 deletions(-) diff --git a/platform/platform-api/src/com/intellij/openapi/actionSystem/CommonShortcuts.java b/platform/platform-api/src/com/intellij/openapi/actionSystem/CommonShortcuts.java index 279512e74c92..5a3063d631fb 100644 --- a/platform/platform-api/src/com/intellij/openapi/actionSystem/CommonShortcuts.java +++ b/platform/platform-api/src/com/intellij/openapi/actionSystem/CommonShortcuts.java @@ -106,7 +106,7 @@ public class CommonShortcuts { } public static ShortcutSet getDiff() { - return shortcutsById(IdeActions.ACTION_SHOW_DIFF); + return shortcutsById(IdeActions.ACTION_SHOW_DIFF_COMMON); } public static ShortcutSet getFind() { diff --git a/platform/platform-api/src/com/intellij/openapi/actionSystem/IdeActions.java b/platform/platform-api/src/com/intellij/openapi/actionSystem/IdeActions.java index 21824fbaff9d..4ccf136a7317 100644 --- a/platform/platform-api/src/com/intellij/openapi/actionSystem/IdeActions.java +++ b/platform/platform-api/src/com/intellij/openapi/actionSystem/IdeActions.java @@ -155,7 +155,7 @@ public interface IdeActions { @NonNls String ACTION_CLOSE_ALL_UNMODIFIED_EDITORS = "CloseAllUnmodifiedEditors"; @NonNls String ACTION_CLOSE_ALL_EDITORS_BUT_THIS = "CloseAllEditorsButActive"; - @NonNls String ACTION_SHOW_DIFF = "CompareTwoFiles"; + @NonNls String ACTION_SHOW_DIFF_COMMON = "Diff.ShowDiff"; @NonNls String ACTION_PREVIOUS_DIFF = "PreviousDiff"; @NonNls String ACTION_NEXT_DIFF = "NextDiff"; diff --git a/platform/platform-resources-en/src/messages/ActionsBundle.properties b/platform/platform-resources-en/src/messages/ActionsBundle.properties index dff4fb6106f7..e15d05d72b85 100644 --- a/platform/platform-resources-en/src/messages/ActionsBundle.properties +++ b/platform/platform-resources-en/src/messages/ActionsBundle.properties @@ -228,6 +228,8 @@ action.NewClass.text=Java Class action.NewFile.text=File action.NewDir.text=Directory/Package action.NewFromTemplate.text=From Template +action.Diff.ShowDiff.text=Show Diff +action.Diff.ShowDiff.description=Show diff for selected changes action.CompareTwoFiles.text=Compare _Files action.CompareTwoFiles.description=Compare two selected files or folders action.CompareFileWithEditor.text=Co_mpare File with Editor diff --git a/platform/platform-resources/src/idea/Keymap_Default.xml b/platform/platform-resources/src/idea/Keymap_Default.xml index 1e5154284f9e..0ef4d0fba164 100644 --- a/platform/platform-resources/src/idea/Keymap_Default.xml +++ b/platform/platform-resources/src/idea/Keymap_Default.xml @@ -464,6 +464,9 @@ + + + diff --git a/platform/platform-resources/src/idea/LangActions.xml b/platform/platform-resources/src/idea/LangActions.xml index b60b70106634..3f8edd619620 100644 --- a/platform/platform-resources/src/idea/LangActions.xml +++ b/platform/platform-resources/src/idea/LangActions.xml @@ -854,7 +854,7 @@ + text="View assertEquals Difference" id="openAssertEqualsDiff" use-shortcut-of="Diff.ShowDiff"/> diff --git a/platform/platform-resources/src/idea/PlatformActions.xml b/platform/platform-resources/src/idea/PlatformActions.xml index a1e91a27c9a8..a1cec16617ef 100644 --- a/platform/platform-resources/src/idea/PlatformActions.xml +++ b/platform/platform-resources/src/idea/PlatformActions.xml @@ -158,6 +158,7 @@ + diff --git a/platform/platform-resources/src/idea/VcsActions.xml b/platform/platform-resources/src/idea/VcsActions.xml index 69a817f324a4..d6ebb953cff9 100644 --- a/platform/platform-resources/src/idea/VcsActions.xml +++ b/platform/platform-resources/src/idea/VcsActions.xml @@ -88,7 +88,7 @@ + icon="AllIcons.Actions.Diff" use-shortcut-of="Diff.ShowDiff"/> @@ -137,7 +137,7 @@ text="Unshelve..." description="Correct paths where to apply patches and unshelve"/> + icon="AllIcons.Actions.Diff" use-shortcut-of="Diff.ShowDiff"/> @@ -229,7 +229,7 @@ + use-shortcut-of="Diff.ShowDiff" icon="AllIcons.Actions.Diff"/> diff --git a/platform/testFramework/testSrc/com/intellij/openapi/keymap/KeymapsTestCase.java b/platform/testFramework/testSrc/com/intellij/openapi/keymap/KeymapsTestCase.java index 172811192142..a1fcb7167412 100644 --- a/platform/testFramework/testSrc/com/intellij/openapi/keymap/KeymapsTestCase.java +++ b/platform/testFramework/testSrc/com/intellij/openapi/keymap/KeymapsTestCase.java @@ -92,7 +92,7 @@ public abstract class KeymapsTestCase extends PlatformTestCase { { "control ENTER", "EditorSplitLine", "ViewSource", "Console.Execute.Multiline"}, { "control EQUALS", "ExpandAll", "ExpandRegion"}, { "control F5", "Refresh", "Rerun"}, - { "control D", "EditorDuplicate", "CompareTwoFiles", "SendEOF", "FileChooser.GotoDesktop"}, + { "control D", "EditorDuplicate", "Diff.ShowDiff", "CompareTwoFiles", "SendEOF", "FileChooser.GotoDesktop"}, { "control M", "EditorScrollToCenter", "Vcs.ShowMessageHistory"}, { "control N", "FileChooser.NewFolder", "GotoClass", "GotoChangedFile"}, { "control P", "FileChooser.TogglePathShowing", "ParameterInfo"}, @@ -182,7 +182,7 @@ public abstract class KeymapsTestCase extends PlatformTestCase { { "control 2", "FileChooser.GotoProject", "GotoBookmark2", "DuplicatesForm.SendToRight"}, { "control 3", "GotoBookmark3", "FileChooser.GotoModule"}, { "control 5", "ChangeSplitOrientation", "GotoBookmark5"}, - { "control D", "$Delete", "CompareTwoFiles", "SendEOF", "FileChooser.GotoDesktop"}, + { "control D", "$Delete", "Diff.ShowDiff", "CompareTwoFiles", "SendEOF", "FileChooser.GotoDesktop"}, { "control K", "EditorCutLineEnd", "CheckinProject"}, { "control N", "EditorDown", "FileChooser.NewFolder"}, { "control P", "EditorUp", "FileChooser.TogglePathShowing"}, @@ -250,7 +250,7 @@ public abstract class KeymapsTestCase extends PlatformTestCase { { "alt HOME", "ViewNavigationBar", "ShowNavBar"}, { "control F10", "ShowPopupMenu", "javaee.UpdateRunningApplication", "liveedit.UpdateRunningApplication"}, { "control F11", "Rerun", "ToggleBookmarkWithMnemonic"}, - { "control D", "EditorDeleteLine", "CompareTwoFiles", "SendEOF", "FileChooser.GotoDesktop"}, + { "control D", "EditorDeleteLine", "Diff.ShowDiff", "CompareTwoFiles", "SendEOF", "FileChooser.GotoDesktop"}, { "control N", "ShowPopupMenu", "FileChooser.NewFolder"}, { "control P", "FileChooser.TogglePathShowing", "Print"}, { "control R", "RunToCursor", "Console.TableResult.Reload", "org.jetbrains.plugins.ruby.rails.console.ReloadSources"}, @@ -288,7 +288,7 @@ public abstract class KeymapsTestCase extends PlatformTestCase { { "control 3", "ActivateProjectToolWindow", "FileChooser.GotoModule"}, { "control BACK_SPACE", "EditorDeleteToWordStart", "ToggleDockMode"}, { "control DIVIDE", "CollapseRegionRecursively", "Images.Editor.ActualSize"}, - { "control D", "EditorDuplicate", "CompareTwoFiles", "SendEOF", "FileChooser.GotoDesktop"}, + { "control D", "EditorDuplicate", "Diff.ShowDiff", "CompareTwoFiles", "SendEOF", "FileChooser.GotoDesktop"}, { "control M", "Vcs.ShowMessageHistory", "Move"}, { "control R", "RenameElement", "Console.TableResult.Reload", "org.jetbrains.plugins.ruby.rails.console.ReloadSources"}, { "control SLASH", "CommentByLineComment", "Images.Editor.ActualSize"}, @@ -333,7 +333,7 @@ public abstract class KeymapsTestCase extends PlatformTestCase { { "control PERIOD", "EditorChooseLookupItemDot", "HippieCompletion"}, { "meta 1", "FileChooser.GotoHome", "ShowIntentionActions", "DuplicatesForm.SendToLeft"}, { "meta 3", "FileChooser.GotoModule", "GotoAction"}, - { "meta D", "EditorDeleteLine", "CompareTwoFiles", "SendEOF", "FileChooser.GotoDesktop"}, + { "meta D", "EditorDeleteLine", "Diff.ShowDiff", "CompareTwoFiles", "SendEOF", "FileChooser.GotoDesktop"}, { "meta I", "DatabaseView.PropertiesAction", "AutoIndentLines"}, { "meta P", "FileChooser.TogglePathShowing", "Print"}, { "meta R", "org.jetbrains.plugins.ruby.rails.console.ReloadSources", "RunToCursor"},