@Override protected NotificationChain shadowAdd(EGenericType eGenericType, NotificationChain notifications) {
ENotificationImpl notification = new ENotificationImpl(owner, Notification.ADD, EcorePackage. [[#variable149a34a0]], null, unwrap(eGenericType), indexOf(eGenericType), false);
if (notifications == null) {
notifications = notification;
}
else {
notifications.add(notification);
}
return notifications;
}
@Override protected NotificationChain shadowRemove(EGenericType eGenericType, NotificationChain notifications) {
ENotificationImpl notification = new ENotificationImpl(owner, Notification.REMOVE, EcorePackage. [[#variable149a34a0]], unwrap(eGenericType), null, indexOf(eGenericType), false);
if (notifications == null) {
notifications = notification;
}
else {
notifications.add(notification);
}
return notifications;
}
@Override protected NotificationChain shadowSet(EGenericType oldEGenericType, EGenericType newEGenericType, NotificationChain notifications) {
ENotificationImpl notification = new ENotificationImpl(owner, Notification.SET, EcorePackage. [[#variable149a34a0]], unwrap(oldEGenericType), unwrap(newEGenericType), indexOf(oldEGenericType), false);
if (notifications == null) {
notifications = notification;
}
else {
notifications.add(notification);
}
return notifications;
}
@Override public EGenericType move(int targetIndex, int sourceIndex) {
EGenericType result = super.move(targetIndex, sourceIndex);
if (isNotificationRequired()) {
dispatchNotification(new ENotificationImpl( [[#variable149a3220]].this, Notification.MOVE, EcorePackage.Literals. [[#variable149a34a0]], new Integer(sourceIndex), unwrap(result), targetIndex));
}
return result;
}
@Override public void unset() {
// Don't really unset it.
clear();
}
@Override protected NotificationImpl createNotification(int eventType, Object oldObject, Object newObject, int index, boolean wasSet) {
switch (eventType) {
case Notification.ADD:
{
return super.createNotification(eventType, oldObject, newObject, index, size > 1);
}
case Notification.ADD_MANY:
{
return super.createNotification(eventType, oldObject, newObject, index, size - ((List<? >) newObject).size() > 0);
}
default:
{
return super.createNotification(eventType, oldObject, newObject, index, true);
}
}
}
|