Bug 571649 - Make "swap left & right" action accessible

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>
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 daa89d9..380cf98 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 @@
 			};
 			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 8bb9f80..6ad9582 100644
--- a/bundles/org.eclipse.compare/plugin.properties
+++ b/bundles/org.eclipse.compare/plugin.properties
@@ -69,6 +69,9 @@
 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 754cb68..d5f1bc1 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"