public class MirrorUtil extends Object
Modifier and Type | Field and Description |
---|---|
static String |
CONFIG_MIRRORED
Mirrored: Compare configuration property key.
|
static String |
PREF_MIRRORED
Mirrored: Compare preference store key.
|
static String |
SWITCH_LEFT_RIGHT_ACTION
Mirrored: Name of the 'Switch Left and Right' action field in
ContentMergeViewer . |
Constructor and Description |
---|
MirrorUtil() |
Modifier and Type | Method and Description |
---|---|
static org.eclipse.jface.action.Action |
getAction(org.eclipse.compare.contentmergeviewer.ContentMergeViewer contentMergeViewer)
Reflectively returns the action for switching the left and right side of the viewer.
|
static boolean |
isMirrored(org.eclipse.compare.CompareConfiguration compareConfiguration)
Evaluates whether the left and right side of the viewer should be mirrored.
|
static boolean |
isMirroredPreference(String preferenceProperty)
Returns true if the given property is used to store the mirrored value in the preference store, false
otherwise.
|
static boolean |
isMirroredProperty(String configProperty)
Returns true if the given property is used to store the mirrored value in the compare configuration,
false otherwise.
|
static org.eclipse.jface.action.Action |
removeFromToolBar(org.eclipse.compare.contentmergeviewer.ContentMergeViewer contentMergeViewer,
org.eclipse.jface.action.ToolBarManager toolBarManager)
Removes the action for switching the left and right side of the viewer from the toolbar, if it is
available.
|
static void |
setMirrored(EMFCompareConfiguration compareConfiguration,
boolean mirrored)
Sets the mirrored property for the given compare configuration.
|
public static final String CONFIG_MIRRORED
public static final String PREF_MIRRORED
public static final String SWITCH_LEFT_RIGHT_ACTION
ContentMergeViewer
.public static org.eclipse.jface.action.Action getAction(org.eclipse.compare.contentmergeviewer.ContentMergeViewer contentMergeViewer)
contentMergeViewer
- content merge viewerpublic static org.eclipse.jface.action.Action removeFromToolBar(org.eclipse.compare.contentmergeviewer.ContentMergeViewer contentMergeViewer, org.eclipse.jface.action.ToolBarManager toolBarManager)
contentMergeViewer
- content merge viewertoolBarManager
- tool bar manager of the content merge viewergetAction(ContentMergeViewer)
public static boolean isMirrored(org.eclipse.compare.CompareConfiguration compareConfiguration)
compareConfiguration
- compare configuration holding the mirrored propertypublic static void setMirrored(EMFCompareConfiguration compareConfiguration, boolean mirrored)
compareConfiguration
- compare configuration holding the mirrored propertymirrored
- true if the left and right side of the viewer should be mirrored, false otherwise.public static boolean isMirroredProperty(String configProperty)
configProperty
- compare configuration propertypublic static boolean isMirroredPreference(String preferenceProperty)
preferenceProperty
- preference property
Copyright (c) 2006, 2015 Obeo and others. All rights reserved.