Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2007-01-09 15:55:13 +0000
committerMichael Valenta2007-01-09 15:55:13 +0000
commit0eb061f736e94fbf40cf015b9430f55440539d1e (patch)
treef5728c98a7f55856aae02345fec471630ea0ce22
parent572a16b16ea2024a7da99d6ac68093ecfeb5a664 (diff)
downloadeclipse.platform.team-0eb061f736e94fbf40cf015b9430f55440539d1e.tar.gz
eclipse.platform.team-0eb061f736e94fbf40cf015b9430f55440539d1e.tar.xz
eclipse.platform.team-0eb061f736e94fbf40cf015b9430f55440539d1e.zip
Bug 169955 [WorkbenchParts] Widget disposed exception when activating compare editor
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditor.java4
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditor.java4
2 files changed, 8 insertions, 0 deletions
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditor.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditor.java
index 4f87dbd22..6b4d9eb52 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditor.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditor.java
@@ -65,6 +65,7 @@ public class CompareEditor extends EditorPart implements IReusableEditor, ISavea
private CompareSaveable fSaveable;
private Control initializingPage;
+ private Control emptyPage;
private int state = UNINITIALIZED;
@@ -212,6 +213,9 @@ public class CompareEditor extends EditorPart implements IReusableEditor, ISavea
if (oldInput != null) {
if (fControl != null && !fControl.isDisposed()) {
oldSize= fControl.getSize();
+ if (emptyPage == null)
+ emptyPage = new Composite(fPageBook, SWT.NONE);
+ fPageBook.showPage(emptyPage);
fControl.dispose();
fControl = null;
}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditor.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditor.java
index 4f87dbd22..6b4d9eb52 100644
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditor.java
+++ b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditor.java
@@ -65,6 +65,7 @@ public class CompareEditor extends EditorPart implements IReusableEditor, ISavea
private CompareSaveable fSaveable;
private Control initializingPage;
+ private Control emptyPage;
private int state = UNINITIALIZED;
@@ -212,6 +213,9 @@ public class CompareEditor extends EditorPart implements IReusableEditor, ISavea
if (oldInput != null) {
if (fControl != null && !fControl.isDisposed()) {
oldSize= fControl.getSize();
+ if (emptyPage == null)
+ emptyPage = new Composite(fPageBook, SWT.NONE);
+ fPageBook.showPage(emptyPage);
fControl.dispose();
fControl = null;
}

Back to the top