Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Prigogin2016-10-21 20:15:09 -0400
committerSergey Prigogin2016-10-21 20:15:09 -0400
commit19d0f254157eee67ff98e78c4987a3fc1234a6ee (patch)
tree1b600ffc587294ab525b2cf60448f782345f58be
parente4b7fdad681a8f315ac51aba60e348fd7de2b627 (diff)
downloadeclipse.platform.team-19d0f254157eee67ff98e78c4987a3fc1234a6ee.tar.gz
eclipse.platform.team-19d0f254157eee67ff98e78c4987a3fc1234a6ee.tar.xz
eclipse.platform.team-19d0f254157eee67ff98e78c4987a3fc1234a6ee.zip
Bug 504708 - Addition/removal icon in structure compare is wrongY20161024-2045I20161026-1100I20161026-0800I20161025-2000I20161024-2000
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewer.java22
1 files changed, 12 insertions, 10 deletions
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewer.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewer.java
index b59aa5115..57b41769c 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewer.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewer.java
@@ -116,28 +116,30 @@ public class DiffTreeViewer extends TreeViewer {
}
@Override
+ @SuppressWarnings("incomplete-switch")
public Image getImage(Object element) {
if (element instanceof IDiffElement) {
IDiffElement input= (IDiffElement) element;
int kind= input.getKind();
- // Flip the direction and the change type, because all images are the other way round,
- // i.e. for comparison from left to right.
+ // Flip the direction and the change type, because all images
+ // are the other way round, i.e. for comparison from left to right.
switch (kind & Differencer.DIRECTION_MASK) {
- case Differencer.LEFT:
- kind= (kind &~ Differencer.LEFT) | Differencer.RIGHT;
- break;
- case Differencer.RIGHT:
- kind= (kind &~ Differencer.RIGHT) | Differencer.LEFT;
- break;
- }
- switch (kind & Differencer.CHANGE_TYPE_MASK) {
+ case Differencer.LEFT:
+ kind= (kind &~ Differencer.LEFT) | Differencer.RIGHT;
+ break;
+ case Differencer.RIGHT:
+ kind= (kind &~ Differencer.RIGHT) | Differencer.LEFT;
+ break;
+ case 0:
+ switch (kind & Differencer.CHANGE_TYPE_MASK) {
case Differencer.ADDITION:
kind= (kind &~ Differencer.ADDITION) | Differencer.DELETION;
break;
case Differencer.DELETION:
kind= (kind &~ Differencer.DELETION) | Differencer.ADDITION;
break;
+ }
}
return fCompareConfiguration.getImage(input.getImage(), kind);

Back to the top