Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Weinand2002-12-23 03:55:40 -0500
committerAndre Weinand2002-12-23 03:55:40 -0500
commit1ebc7eccc31c99bc53ae9fad7135ec6e86bdafd1 (patch)
treeb5ee1f84ac358efb333d3c961e5020a2d03bc01c
parent92214d39e4d3aaaa609c966c0953500fa0fec5f2 (diff)
downloadeclipse.platform.team-1ebc7eccc31c99bc53ae9fad7135ec6e86bdafd1.tar.gz
eclipse.platform.team-1ebc7eccc31c99bc53ae9fad7135ec6e86bdafd1.tar.xz
eclipse.platform.team-1ebc7eccc31c99bc53ae9fad7135ec6e86bdafd1.zip
second try of fix #28278
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java30
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java30
2 files changed, 22 insertions, 38 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 b8533b208..2397170de 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
@@ -737,11 +737,7 @@ public class TextMergeViewer extends ContentMergeViewer {
SELECTED_OUTGOING= getForeground(display);
OUTGOING= interpolate(SELECTED_OUTGOING, bg, 0.6);
OUTGOING_FILL= interpolate(SELECTED_OUTGOING, bg, 0.97);
-
- // invalidate color cache
- fColors= null;
- // disposeColors(); // not yet enabled because of #28388
-
+
refreshBirdsEyeView();
invalidateLines();
@@ -833,7 +829,15 @@ public class TextMergeViewer extends ContentMergeViewer {
unsetDocument(fLeft);
unsetDocument(fRight);
- disposeColors();
+ if (fColors != null) {
+ Iterator i= fColors.values().iterator();
+ while (i.hasNext()) {
+ Color color= (Color) i.next();
+ if (!color.isDisposed())
+ color.dispose();
+ }
+ fColors= null;
+ }
if (fFont != null) {
fFont.dispose();
@@ -846,19 +850,7 @@ public class TextMergeViewer extends ContentMergeViewer {
super.handleDispose(event);
}
-
- private void disposeColors() {
- if (fColors != null) {
- Iterator i= fColors.values().iterator();
- while (i.hasNext()) {
- Color color= (Color) i.next();
- if (!color.isDisposed())
- color.dispose();
- }
- fColors= null;
- }
- }
-
+
//-------------------------------------------------------------------------------------------------------------
//--- internal ------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------------------
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 b8533b208..2397170de 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
@@ -737,11 +737,7 @@ public class TextMergeViewer extends ContentMergeViewer {
SELECTED_OUTGOING= getForeground(display);
OUTGOING= interpolate(SELECTED_OUTGOING, bg, 0.6);
OUTGOING_FILL= interpolate(SELECTED_OUTGOING, bg, 0.97);
-
- // invalidate color cache
- fColors= null;
- // disposeColors(); // not yet enabled because of #28388
-
+
refreshBirdsEyeView();
invalidateLines();
@@ -833,7 +829,15 @@ public class TextMergeViewer extends ContentMergeViewer {
unsetDocument(fLeft);
unsetDocument(fRight);
- disposeColors();
+ if (fColors != null) {
+ Iterator i= fColors.values().iterator();
+ while (i.hasNext()) {
+ Color color= (Color) i.next();
+ if (!color.isDisposed())
+ color.dispose();
+ }
+ fColors= null;
+ }
if (fFont != null) {
fFont.dispose();
@@ -846,19 +850,7 @@ public class TextMergeViewer extends ContentMergeViewer {
super.handleDispose(event);
}
-
- private void disposeColors() {
- if (fColors != null) {
- Iterator i= fColors.values().iterator();
- while (i.hasNext()) {
- Color color= (Color) i.next();
- if (!color.isDisposed())
- color.dispose();
- }
- fColors= null;
- }
- }
-
+
//-------------------------------------------------------------------------------------------------------------
//--- internal ------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------------------

Back to the top