Search in sources :

Example 6 with NotificationImpl

use of org.eclipse.emf.common.notify.impl.NotificationImpl in project statecharts by Yakindu.

the class DerivedEObjectEList method remove.

@Override
public E remove(int index) {
    if (isNotificationRequired()) {
        boolean oldIsSet = isSet();
        NotificationImpl notification = createNotification(Notification.REMOVE, super.remove(index), null, index, oldIsSet);
        dispatchNotification(notification);
        @SuppressWarnings("unchecked") E oldValue = (E) notification.getOldValue();
        return oldValue;
    } else {
        return super.remove(index);
    }
}
Also used : NotificationImpl(org.eclipse.emf.common.notify.impl.NotificationImpl) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl)

Aggregations

NotificationImpl (org.eclipse.emf.common.notify.impl.NotificationImpl)6 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)3 ArrayList (java.util.ArrayList)2 List (java.util.List)2 Collection (java.util.Collection)1 Iterator (java.util.Iterator)1 Adapter (org.eclipse.emf.common.notify.Adapter)1 Notification (org.eclipse.emf.common.notify.Notification)1 EObject (org.eclipse.emf.ecore.EObject)1 InternalEObject (org.eclipse.emf.ecore.InternalEObject)1 EContentAdapter (org.eclipse.emf.ecore.util.EContentAdapter)1 IADTObject (org.eclipse.wst.xsd.ui.internal.adt.facade.IADTObject)1 XSDAttributeGroupDefinition (org.eclipse.xsd.XSDAttributeGroupDefinition)1 XSDComplexTypeDefinition (org.eclipse.xsd.XSDComplexTypeDefinition)1 XSDImport (org.eclipse.xsd.XSDImport)1 XSDInclude (org.eclipse.xsd.XSDInclude)1 XSDModelGroupDefinition (org.eclipse.xsd.XSDModelGroupDefinition)1 XSDRedefine (org.eclipse.xsd.XSDRedefine)1 XSDSchema (org.eclipse.xsd.XSDSchema)1 XSDSchemaDirective (org.eclipse.xsd.XSDSchemaDirective)1