Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2007-04-27 19:00:39 +0000
committerMichael Valenta2007-04-27 19:00:39 +0000
commitaffc4090f6b305b94a094596fa78216757eeca86 (patch)
tree7cdd74434c2f0c539179b70c9083b9e5314801cf /bundles/org.eclipse.compare
parentd61a43cf336ac3fb8fae73ca4b7dc04f6b5fdcb7 (diff)
downloadeclipse.platform.team-affc4090f6b305b94a094596fa78216757eeca86.tar.gz
eclipse.platform.team-affc4090f6b305b94a094596fa78216757eeca86.tar.xz
eclipse.platform.team-affc4090f6b305b94a094596fa78216757eeca86.zip
Bug 177831 NullPointerException while viewing changes
Diffstat (limited to 'bundles/org.eclipse.compare')
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/StructureDiffViewer.java13
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/StructureDiffViewer.java13
2 files changed, 22 insertions, 4 deletions
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 21f1736ce..cc27e3698 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
@@ -22,6 +22,7 @@ import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.widgets.*;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.services.IDisposable;
@@ -316,8 +317,16 @@ public class StructureDiffViewer extends DiffTreeViewer {
}
CompareConfiguration cc = getCompareConfiguration();
// The compare configuration is nulled when the viewer is disposed
- if (cc != null)
- cc.getContainer().runAsynchronously(inputChangedTask);
+ if (cc != null) {
+ //cc.getContainer().runAsynchronously(inputChangedTask);
+ try {
+ PlatformUI.getWorkbench().getProgressService().run(false, true, inputChangedTask);
+ } catch (InvocationTargetException e) {
+ CompareUIPlugin.log(e.getTargetException());
+ } catch (InterruptedException e) {
+ // Ignore
+ }
+ }
}
/* package */ void compareInputChanged(ICompareInput input, boolean force, IProgressMonitor monitor) {
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/StructureDiffViewer.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/StructureDiffViewer.java
index 21f1736ce..cc27e3698 100644
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/StructureDiffViewer.java
+++ b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/StructureDiffViewer.java
@@ -22,6 +22,7 @@ import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.widgets.*;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.services.IDisposable;
@@ -316,8 +317,16 @@ public class StructureDiffViewer extends DiffTreeViewer {
}
CompareConfiguration cc = getCompareConfiguration();
// The compare configuration is nulled when the viewer is disposed
- if (cc != null)
- cc.getContainer().runAsynchronously(inputChangedTask);
+ if (cc != null) {
+ //cc.getContainer().runAsynchronously(inputChangedTask);
+ try {
+ PlatformUI.getWorkbench().getProgressService().run(false, true, inputChangedTask);
+ } catch (InvocationTargetException e) {
+ CompareUIPlugin.log(e.getTargetException());
+ } catch (InterruptedException e) {
+ // Ignore
+ }
+ }
}
/* package */ void compareInputChanged(ICompareInput input, boolean force, IProgressMonitor monitor) {

Back to the top