Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Weinand2004-04-30 21:53:54 +0000
committerAndre Weinand2004-04-30 21:53:54 +0000
commitf24aedb3eaaa238da1eec7bb7729e1dacaba9ba6 (patch)
tree235378da77573e86453f5307d17d78c5c22692f2
parent8b20c761e5b8e9646b1b71ee8bdd790a92672bb6 (diff)
downloadeclipse.platform.team-f24aedb3eaaa238da1eec7bb7729e1dacaba9ba6.tar.gz
eclipse.platform.team-f24aedb3eaaa238da1eec7bb7729e1dacaba9ba6.tar.xz
eclipse.platform.team-f24aedb3eaaa238da1eec7bb7729e1dacaba9ba6.zip
fixed #60383
-rw-r--r--bundles/org.eclipse.compare/buildnotes_compare.html1
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java36
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/buildnotes_compare.html1
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java36
4 files changed, 40 insertions, 34 deletions
diff --git a/bundles/org.eclipse.compare/buildnotes_compare.html b/bundles/org.eclipse.compare/buildnotes_compare.html
index eb2be695f..8c6e215d2 100644
--- a/bundles/org.eclipse.compare/buildnotes_compare.html
+++ b/bundles/org.eclipse.compare/buildnotes_compare.html
@@ -16,6 +16,7 @@ Eclipse Build Input May 4th 2004
<h2>
Problem reports fixed</h2>
+<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=60383">#60383</a>: Copy All non-conflicting changes from right-to-left erase left-to-right changes!!!<br>
<h1>
<hr WIDTH="100%"></h1>
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 384cdafb5..b65d1cdad 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
@@ -1089,18 +1089,20 @@ public class TextMergeViewer extends ContentMergeViewer {
final ScrollBar sb1= st1.getHorizontalBar();
sb1.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
- int max= sb1.getMaximum()-sb1.getThumb();
- double v= 0.0;
- if (max > 0)
- v= (float)sb1.getSelection() / (float)max;
- if (st2.isVisible()) {
- ScrollBar sb2= st2.getHorizontalBar();
- st2.setHorizontalPixel((int)((sb2.getMaximum()-sb2.getThumb()) * v));
- }
- if (st3.isVisible()) {
- ScrollBar sb3= st3.getHorizontalBar();
- st3.setHorizontalPixel((int)((sb3.getMaximum()-sb3.getThumb()) * v));
- }
+ if (fSynchronizedScrolling) {
+ int max= sb1.getMaximum()-sb1.getThumb();
+ double v= 0.0;
+ if (max > 0)
+ v= (float)sb1.getSelection() / (float)max;
+ if (st2.isVisible()) {
+ ScrollBar sb2= st2.getHorizontalBar();
+ st2.setHorizontalPixel((int)((sb2.getMaximum()-sb2.getThumb()) * v));
+ }
+ if (st3.isVisible()) {
+ ScrollBar sb3= st3.getHorizontalBar();
+ st3.setHorizontalPixel((int)((sb3.getMaximum()-sb3.getThumb()) * v));
+ }
+ }
}
});
}
@@ -1334,7 +1336,7 @@ public class TextMergeViewer extends ContentMergeViewer {
fCanvas= c;
}
public void mouseMove(MouseEvent e) {
- if (!fIsDown && showResolveUI() && handleMouseMoveOverCenter(fCanvas, e.x, e.y))
+ if (!fIsDown && fUseSingleLine && showResolveUI() && handleMouseMoveOverCenter(fCanvas, e.x, e.y))
return;
super.mouseMove(e);
}
@@ -1351,9 +1353,7 @@ public class TextMergeViewer extends ContentMergeViewer {
paintCenter(this, gc);
}
};
- if (!fUseResolveUI) {
- new Resizer(canvas, HORIZONTAL);
- } else {
+ if (fUseResolveUI) {
new HoverResizer(canvas, HORIZONTAL);
@@ -1374,6 +1374,8 @@ public class TextMergeViewer extends ContentMergeViewer {
}
}
);
+ } else {
+ new Resizer(canvas, HORIZONTAL);
}
return canvas;
@@ -3296,7 +3298,7 @@ public class TextMergeViewer extends ContentMergeViewer {
}
}
- if (showResolveUI && diff.isUnresolvedIncomingOrConflicting()) {
+ if (fUseSingleLine && showResolveUI && diff.isUnresolvedIncomingOrConflicting()) {
// draw resolve state
int cx= (w-RESOLVE_SIZE)/2;
int cy= ((ly+lh/2) + (ry+rh/2) - RESOLVE_SIZE)/2;
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/buildnotes_compare.html b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/buildnotes_compare.html
index eb2be695f..8c6e215d2 100644
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/buildnotes_compare.html
+++ b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/buildnotes_compare.html
@@ -16,6 +16,7 @@ Eclipse Build Input May 4th 2004
<h2>
Problem reports fixed</h2>
+<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=60383">#60383</a>: Copy All non-conflicting changes from right-to-left erase left-to-right changes!!!<br>
<h1>
<hr WIDTH="100%"></h1>
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
index 384cdafb5..b65d1cdad 100644
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
+++ b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
@@ -1089,18 +1089,20 @@ public class TextMergeViewer extends ContentMergeViewer {
final ScrollBar sb1= st1.getHorizontalBar();
sb1.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
- int max= sb1.getMaximum()-sb1.getThumb();
- double v= 0.0;
- if (max > 0)
- v= (float)sb1.getSelection() / (float)max;
- if (st2.isVisible()) {
- ScrollBar sb2= st2.getHorizontalBar();
- st2.setHorizontalPixel((int)((sb2.getMaximum()-sb2.getThumb()) * v));
- }
- if (st3.isVisible()) {
- ScrollBar sb3= st3.getHorizontalBar();
- st3.setHorizontalPixel((int)((sb3.getMaximum()-sb3.getThumb()) * v));
- }
+ if (fSynchronizedScrolling) {
+ int max= sb1.getMaximum()-sb1.getThumb();
+ double v= 0.0;
+ if (max > 0)
+ v= (float)sb1.getSelection() / (float)max;
+ if (st2.isVisible()) {
+ ScrollBar sb2= st2.getHorizontalBar();
+ st2.setHorizontalPixel((int)((sb2.getMaximum()-sb2.getThumb()) * v));
+ }
+ if (st3.isVisible()) {
+ ScrollBar sb3= st3.getHorizontalBar();
+ st3.setHorizontalPixel((int)((sb3.getMaximum()-sb3.getThumb()) * v));
+ }
+ }
}
});
}
@@ -1334,7 +1336,7 @@ public class TextMergeViewer extends ContentMergeViewer {
fCanvas= c;
}
public void mouseMove(MouseEvent e) {
- if (!fIsDown && showResolveUI() && handleMouseMoveOverCenter(fCanvas, e.x, e.y))
+ if (!fIsDown && fUseSingleLine && showResolveUI() && handleMouseMoveOverCenter(fCanvas, e.x, e.y))
return;
super.mouseMove(e);
}
@@ -1351,9 +1353,7 @@ public class TextMergeViewer extends ContentMergeViewer {
paintCenter(this, gc);
}
};
- if (!fUseResolveUI) {
- new Resizer(canvas, HORIZONTAL);
- } else {
+ if (fUseResolveUI) {
new HoverResizer(canvas, HORIZONTAL);
@@ -1374,6 +1374,8 @@ public class TextMergeViewer extends ContentMergeViewer {
}
}
);
+ } else {
+ new Resizer(canvas, HORIZONTAL);
}
return canvas;
@@ -3296,7 +3298,7 @@ public class TextMergeViewer extends ContentMergeViewer {
}
}
- if (showResolveUI && diff.isUnresolvedIncomingOrConflicting()) {
+ if (fUseSingleLine && showResolveUI && diff.isUnresolvedIncomingOrConflicting()) {
// draw resolve state
int cx= (w-RESOLVE_SIZE)/2;
int cy= ((ly+lh/2) + (ry+rh/2) - RESOLVE_SIZE)/2;

Back to the top