Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcvs2001-05-29 08:37:28 -0400
committercvs2001-05-29 08:37:28 -0400
commita804a3323b96e0b8ec5c736719bd60ea5db40a51 (patch)
treecc86b4b7958f96c6ecae818cc9a93e8673ac3b69 /bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer
parent158cb2154152fde29bf701bc19743206317127c6 (diff)
downloadeclipse.platform.team-a804a3323b96e0b8ec5c736719bd60ea5db40a51.tar.gz
eclipse.platform.team-a804a3323b96e0b8ec5c736719bd60ea5db40a51.tar.xz
eclipse.platform.team-a804a3323b96e0b8ec5c736719bd60ea5db40a51.zip
Workaround for color coding inconsistency
Diffstat (limited to 'bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer')
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewer.java19
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/StructureDiffViewer.java2
2 files changed, 20 insertions, 1 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 3b7e3945e..751ef7105 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
@@ -98,7 +98,20 @@ public class DiffTreeViewer extends TreeViewer {
public Image getImage(Object element) {
if (element instanceof IDiffElement) {
IDiffElement input= (IDiffElement) element;
- return fCompareConfiguration.getImage(input.getImage(), input.getKind());
+
+ int kind= input.getKind();
+ if (!fIgnoreLeftIsLocal && fLeftIsLocal) {
+ 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;
+ }
+ }
+
+ return fCompareConfiguration.getImage(input.getImage(), kind);
}
return null;
}
@@ -117,6 +130,8 @@ public class DiffTreeViewer extends TreeViewer {
private ResourceBundle fBundle;
private CompareConfiguration fCompareConfiguration;
+ boolean fIgnoreLeftIsLocal= true;
+ private boolean fLeftIsLocal;
private ViewerFilter fViewerFilter;
private IPropertyChangeListener fPropertyChangeListener;
private IPropertyChangeListener fPreferenceChangeListener;
@@ -150,6 +165,8 @@ public class DiffTreeViewer extends TreeViewer {
private void initialize(CompareConfiguration configuration) {
+ fLeftIsLocal= Utilities.getBoolean(configuration, "LEFT_IS_LOCAL", false);
+
Control tree= getControl();
tree.setData(CompareUI.COMPARE_VIEWER_TITLE, getTitle());
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/StructureDiffViewer.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/StructureDiffViewer.java
index 223730ee9..519ee7e9f 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/StructureDiffViewer.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/StructureDiffViewer.java
@@ -76,6 +76,8 @@ public class StructureDiffViewer extends DiffTreeViewer {
private void initialize() {
+ fIgnoreLeftIsLocal= false;
+
setAutoExpandLevel(3);
fContentChangedListener= new IContentChangeListener() {

Back to the top