// Don't remove the adapter if the object is in a different resource
// and that resource (and hence all its contents) are being cross referenced.
//
InternalEObject internalEObject = i.next();
Resource eDirectResource = internalEObject.eDirectResource();
if (eDirectResource == null || !eDirectResource.eAdapters().contains(this))
{
removeAdapter(internalEObject);
}
}
}