Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wolf2021-03-03 14:12:15 +0000
committerThomas Wolf2021-03-09 08:58:49 +0000
commit0aae5926a715028192e8849904d967edfcd0ed13 (patch)
treedd207ef270aea09ed96f02810823d440f1ca7680
parent2d063ee0285eef1117ce88e06740c47289d9edbf (diff)
downloadeclipse.platform.team-0aae5926a715028192e8849904d967edfcd0ed13.tar.gz
eclipse.platform.team-0aae5926a715028192e8849904d967edfcd0ed13.tar.xz
eclipse.platform.team-0aae5926a715028192e8849904d967edfcd0ed13.zip
Bug 571649 - Make "swap left & right" action accessibleI20210310-0250
Register the action as a command. This enables users to define a key binding for it, and makes the command show up in Quick Access. While the command name is "Swap Left and Right View" the description uses the expression "Switch sides" on purpose as it makes it easier to find the command since there are more different search words that can be matched. Change-Id: Ic5713ccb434224536545f97545f7c2f3d0dfd6d3 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/ContentMergeViewer.java1
-rw-r--r--bundles/org.eclipse.compare/plugin.properties3
-rw-r--r--bundles/org.eclipse.compare/plugin.xml6
3 files changed, 10 insertions, 0 deletions
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/ContentMergeViewer.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/ContentMergeViewer.java
index daa89d98d..380cf98fd 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/ContentMergeViewer.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/ContentMergeViewer.java
@@ -938,6 +938,7 @@ public abstract class ContentMergeViewer extends ContentViewer
};
Utilities.initAction(fSwitchLeftAndRight, getResourceBundle(), "action.SwitchLeftAndRight."); //$NON-NLS-1$
tbm.appendToGroup("modes", fSwitchLeftAndRight); //$NON-NLS-1$
+ fHandlerService.registerAction(fSwitchLeftAndRight, "org.eclipse.compare.switchLeftAndRight"); //$NON-NLS-1$
final ChangePropertyAction a= new ChangePropertyAction(fBundle, getCompareConfiguration(), "action.EnableAncestor.", ICompareUIConstants.PROP_ANCESTOR_VISIBLE); //$NON-NLS-1$
a.setChecked(fAncestorVisible);
diff --git a/bundles/org.eclipse.compare/plugin.properties b/bundles/org.eclipse.compare/plugin.properties
index 8bb9f8039..6ad9582f6 100644
--- a/bundles/org.eclipse.compare/plugin.properties
+++ b/bundles/org.eclipse.compare/plugin.properties
@@ -69,6 +69,9 @@ Command.copyAllRightToLeft.description= Copy All Changes from Right to Left
Command.copyAllLeftToRight.name= Copy All from Left to Right
Command.copyAllLeftToRight.description= Copy All Changes from Left to Right
+Command.switchLeftAndRight.name= Swap Left and Right View
+Command.switchLeftAndRight.description= Switch the left and right sides in the compare editor
+
Command.selectNextChange.name= Select Next Change
Command.selectNextChange.description= Select Next Change
diff --git a/bundles/org.eclipse.compare/plugin.xml b/bundles/org.eclipse.compare/plugin.xml
index 754cb681c..d5f1bc180 100644
--- a/bundles/org.eclipse.compare/plugin.xml
+++ b/bundles/org.eclipse.compare/plugin.xml
@@ -199,6 +199,12 @@
id="org.eclipse.compare.copyAllLeftToRight">
</command>
<command
+ name="%Command.switchLeftAndRight.name"
+ description="%Command.switchLeftAndRight.description"
+ categoryId="org.eclipse.compare.ui.category.compare"
+ id="org.eclipse.compare.switchLeftAndRight">
+ </command>
+ <command
name="%Command.selectNextChange.name"
description="%Command.selectNextChange.description"
categoryId="org.eclipse.compare.ui.category.compare"

Back to the top