Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlgoubet2019-03-21 10:08:34 -0400
committerlgoubet2019-03-21 10:08:34 -0400
commit5d880636dcd863aef63631564c2878b6f2ad8bdd (patch)
tree6ca9aedbae62f94c19caf4a1d011197626b32082
parentb536252a11f98084188c8a8a9f4f6174b195d99f (diff)
downloadorg.eclipse.emf.compare-5d880636dcd863aef63631564c2878b6f2ad8bdd.tar.gz
org.eclipse.emf.compare-5d880636dcd863aef63631564c2878b6f2ad8bdd.tar.xz
org.eclipse.emf.compare-5d880636dcd863aef63631564c2878b6f2ad8bdd.zip
Disposing of the comparison shouldn't be done by the SMV
In case of comparison dialogs, the SMV might be switched to other files, while the comparison itself will be kept around. Clearing the adapters will render that comparison invalid and reopening the previously selected file will then fail to show all differences. Change-Id: I441584a09198b6859742538e028004dba3937d54
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/configuration/EMFCompareConfiguration.java4
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/structuremergeviewer/EMFCompareStructureMergeViewer.java1
2 files changed, 3 insertions, 2 deletions
diff --git a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/configuration/EMFCompareConfiguration.java b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/configuration/EMFCompareConfiguration.java
index 895521cfd..427fd8b42 100644
--- a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/configuration/EMFCompareConfiguration.java
+++ b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/configuration/EMFCompareConfiguration.java
@@ -200,7 +200,9 @@ public class EMFCompareConfiguration extends ForwardingCompareConfiguration impl
// CompareConfiguration does not clear its properties list...
// Lets clean our own mess ourselves
// EVENT_BUS must not be set to null
+ Comparison comparison = getComparison();
disposeComparison();
+ comparison.eAdapters().clear();
}
/**
@@ -216,7 +218,7 @@ public class EMFCompareConfiguration extends ForwardingCompareConfiguration impl
}
/**
- * {@link #dispose()} is only called when the comparison editor is closed, whereas EMFCompareComparison
+ * {@link #dispose()} is only called when the comparison editor is closed, whereas EMFCompareConfiguration
* follows its own separate lifecycle. See documentation of {@link #dispose()}.
*
* @see #dispose()
diff --git a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/structuremergeviewer/EMFCompareStructureMergeViewer.java b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/structuremergeviewer/EMFCompareStructureMergeViewer.java
index 43420c55f..a5e35c0a1 100644
--- a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/structuremergeviewer/EMFCompareStructureMergeViewer.java
+++ b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/structuremergeviewer/EMFCompareStructureMergeViewer.java
@@ -1827,7 +1827,6 @@ public class EMFCompareStructureMergeViewer extends AbstractStructuredViewerWrap
}
}
}
- comparison.eAdapters().clear();
}
editingDomainChange(getCompareConfiguration().getEditingDomain(), null);

Back to the top