Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2011-01-22 07:27:50 -0500
committerEike Stepper2011-01-22 07:27:50 -0500
commitd43e845ad455cdc23b34909f3824f5de9f14db19 (patch)
tree78f1a7548547077a5ee3cb53c07717744ef5df2f
parent6070cd9c7ae88c43b73d6a12c5b6dd84617a834f (diff)
downloadcdo-committers/estepper/thread-safe-view.tar.gz
cdo-committers/estepper/thread-safe-view.tar.xz
cdo-committers/estepper/thread-safe-view.zip
suppress adapter addition/removal excveptions if view is inactivecommitters/estepper/thread-safe-view
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java18
1 files changed, 12 insertions, 6 deletions
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java
index fb655f3fdc..2cdabaa2d5 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java
@@ -426,20 +426,26 @@ public class CDOObjectImpl extends EStoreEObjectImpl implements InternalCDOObjec
@Override
protected void didAdd(int index, Adapter newObject)
{
- super.didAdd(index, newObject);
- if (!FSMUtil.isTransient(CDOObjectImpl.this))
+ if (view == null || view.isActive())
{
- view.handleAddAdapter(CDOObjectImpl.this, newObject);
+ super.didAdd(index, newObject);
+ if (!FSMUtil.isTransient(CDOObjectImpl.this))
+ {
+ view.handleAddAdapter(CDOObjectImpl.this, newObject);
+ }
}
}
@Override
protected void didRemove(int index, Adapter oldObject)
{
- super.didRemove(index, oldObject);
- if (!FSMUtil.isTransient(CDOObjectImpl.this))
+ if (view == null || view.isActive())
{
- view.handleRemoveAdapter(CDOObjectImpl.this, oldObject);
+ super.didRemove(index, oldObject);
+ if (!FSMUtil.isTransient(CDOObjectImpl.this))
+ {
+ view.handleRemoveAdapter(CDOObjectImpl.this, oldObject);
+ }
}
}
};

Back to the top