Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiraj Modi2019-07-24 02:54:39 -0400
committerNiraj Modi2019-07-24 02:54:39 -0400
commit7cb37653f01abad8f14ef73d2c31cc004b3d674e (patch)
tree677b08af7eb8f847c40a8497a238dbc01e2f45ad
parent4ce33e921d6ef97182b02df49fa808f401d23588 (diff)
downloadeclipse.platform.team-7cb37653f01abad8f14ef73d2c31cc004b3d674e.tar.gz
eclipse.platform.team-7cb37653f01abad8f14ef73d2c31cc004b3d674e.tar.xz
eclipse.platform.team-7cb37653f01abad8f14ef73d2c31cc004b3d674e.zip
Bug 544868 - [Accessibility] Compare editor and accessibility: theY20190725-0900I20190727-1800I20190726-1800I20190725-1800I20190724-1800
column is read wrong when swapping left and right view Change-Id: I6c7cdcaef2189b36c3509a5d88bb982d52d1f553 Signed-off-by: Niraj Modi <niraj.modi@in.ibm.com>
-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 48d802d7c..ce2a828e0 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, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -2086,7 +2086,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));
@@ -2096,7 +2099,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