Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
index e862e8984..cdb527ecc 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -2129,7 +2129,10 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
fLeft.getSourceViewer().getTextWidget().getAccessible().addAccessibleListener(new AccessibleAdapter() {
@Override
public void getName(AccessibleEvent e) {
- e.result = NLS.bind(CompareMessages.TextMergeViewer_accessible_left, getCompareConfiguration().getLeftLabel(getInput()));
+ // Check for Mirrored status flag before returning the left label's text.
+ e.result = NLS.bind(CompareMessages.TextMergeViewer_accessible_left,
+ getCompareConfiguration().isMirrored() ? getCompareConfiguration().getRightLabel(getInput())
+ : getCompareConfiguration().getLeftLabel(getInput()));
}
});
fLeft.getSourceViewer().addTextPresentationListener(new ChangeHighlighter(fLeft));
@@ -2139,7 +2142,10 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
fRight.getSourceViewer().getTextWidget().getAccessible().addAccessibleListener(new AccessibleAdapter() {
@Override
public void getName(AccessibleEvent e) {
- e.result = NLS.bind(CompareMessages.TextMergeViewer_accessible_right, getCompareConfiguration().getRightLabel(getInput()));
+ // Check for Mirrored status flag before returning the right label's text.
+ e.result = NLS.bind(CompareMessages.TextMergeViewer_accessible_right,
+ getCompareConfiguration().isMirrored() ? getCompareConfiguration().getLeftLabel(getInput())
+ : getCompareConfiguration().getRightLabel(getInput()));
}
});
fRight.getSourceViewer().addTextPresentationListener(new ChangeHighlighter(fRight));

Back to the top