Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiraj Modi2019-08-23 02:50:20 -0400
committerNiraj Modi2019-08-23 03:05:53 -0400
commitf2762260f42ebb4b57774dcdd8a883c1346b5172 (patch)
tree26df734c955f108f9ae9e35f2498f0d1394a4d96
parentfe142a75ac3347b04fbf95f615543f4dfc158036 (diff)
downloadeclipse.platform.team-f2762260f42ebb4b57774dcdd8a883c1346b5172.tar.gz
eclipse.platform.team-f2762260f42ebb4b57774dcdd8a883c1346b5172.tar.xz
eclipse.platform.team-f2762260f42ebb4b57774dcdd8a883c1346b5172.zip
Bug 544868 - [Accessibility] Compare editor and accessibility: the
column is read wrong when swapping left and right view - Manual back-port to R4_6_maintenance Change-Id: I54a9229e954f7a22dfe4278916ab0b278b82a0be 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 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