Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian W. Damus2013-09-16 19:39:27 +0000
committerChristian W. Damus2013-09-16 20:02:46 +0000
commit9ef34fcdcdab280c603ac684baf494bb79839800 (patch)
treeba96030ce1d1197ab5f5743e76e579f8f2e08761 /extraplugins
parent1c6e0065ae0001256fcaa01b409d858ed8c3b2c7 (diff)
downloadorg.eclipse.papyrus-9ef34fcdcdab280c603ac684baf494bb79839800.tar.gz
org.eclipse.papyrus-9ef34fcdcdab280c603ac684baf494bb79839800.tar.xz
org.eclipse.papyrus-9ef34fcdcdab280c603ac684baf494bb79839800.zip
415369: [CDO] Support controlled resources and lazy loading
https://bugs.eclipse.org/bugs/show_bug.cgi?id=415369 Must also update containment references on save to handle the case of newly-added objects being controlled in the same transaction.
Diffstat (limited to 'extraplugins')
-rw-r--r--extraplugins/cdo/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/CDOAwareModelSet.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/extraplugins/cdo/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/CDOAwareModelSet.java b/extraplugins/cdo/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/CDOAwareModelSet.java
index 4725713ad04..8667edad5dd 100644
--- a/extraplugins/cdo/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/CDOAwareModelSet.java
+++ b/extraplugins/cdo/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/CDOAwareModelSet.java
@@ -212,6 +212,7 @@ public class CDOAwareModelSet extends OnDemandLoadingModelSet {
protected IListener createInvalidationListener() {
return new IListener() {
+ @Override
public void notifyEvent(IEvent event) {
if(event instanceof CDOViewInvalidationEvent) {
TransactionalEditingDomain domain = getTransactionalEditingDomain();
@@ -366,7 +367,9 @@ public class CDOAwareModelSet extends OnDemandLoadingModelSet {
EObject object = CDOUtil.getEObject(next);
if(object != null) {
for(EReference xref : object.eClass().getEAllReferences()) {
- if(!xref.isContainment() && xref.isChangeable() && !xref.isDerived() && !xref.isTransient()) {
+ // do include containment references because we may have added a model
+ // element and controlled it in the same transaction
+ if(xref.isChangeable() && !xref.isDerived() && !xref.isTransient()) {
run = run.chain(control.getProxyCrossReferencesUpdate(object, xref));
}
}

Back to the top