for (Listener listener : listeners)
{
listener.removed(MinimalEObjectImpl.this, oldObject);
}
}
Adapter adapter = oldObject;
if (eDeliver())
{
Notification notification =
new NotificationImpl(Notification.REMOVING_ADAPTER, oldObject, null, index)
{
@Override
public Object getNotifier()
{
return MinimalEObjectImpl.this;
}
};
adapter.notifyChanged(notification);
}
if (adapter instanceof Adapter.Internal)
{
((Adapter.Internal)adapter).unsetTarget(MinimalEObjectImpl.this);
}
else if (adapter.getTarget() == MinimalEObjectImpl.this)
{
adapter.setTarget(null);
}
}