Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Prigogin2016-10-22 00:15:09 +0000
committerSergey Prigogin2016-10-24 17:24:03 +0000
commit8b747b869f46eec7f04eae0710df1e2a021f19e1 (patch)
tree8f9ed3286c84ef5da6ed9c552c009aeb31c6df6f
parentbd69b7654458a7d4ccf1dd9a77938245753e1419 (diff)
downloadeclipse.platform.team-8b747b869f46eec7f04eae0710df1e2a021f19e1.tar.gz
eclipse.platform.team-8b747b869f46eec7f04eae0710df1e2a021f19e1.tar.xz
eclipse.platform.team-8b747b869f46eec7f04eae0710df1e2a021f19e1.zip
Bug 504708 - Addition/removal icon in structure compare is wrongM20161110-0200M20161109-0400M20161102-0400
-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 d5df14bd0..9c5bdce92 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
@@ -92,28 +92,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