protected static StringBuffer getXMIIdentifier( InternalEObject internalEObject, StringBuffer xmiIdentifier) { InternalEObject eInternalContainer = internalEObject .eInternalContainer(); Resource.Internal eDirectResource = internalEObject.eDirectResource(); while (eInternalContainer != null && eDirectResource == null) { getValidNCName(eInternalContainer.eURIFragmentSegment( internalEObject.eContainingFeature(), internalEObject), xmiIdentifier); internalEObject = eInternalContainer; eInternalContainer = internalEObject.eInternalContainer(); eDirectResource = internalEObject.eDirectResource(); if (eInternalContainer != null && eDirectResource == null) { xmiIdentifier.insert(0, '-'); } } if (eDirectResource != null) { int index = eDirectResource.getContents().indexOf(internalEObject); int length = xmiIdentifier.length(); if (index > 0 || length == 0) { if (length > 0) { xmiIdentifier.insert(0, '-'); } xmiIdentifier.insert(0, index); xmiIdentifier.insert(0, '_'); } } return xmiIdentifier; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void setGuard(Constraint newGuard) { Constraint oldGuard = guard; guard = newGuard; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, UMLPackage.PROTOCOL_TRANSITION__GUARD, oldGuard, guard)); Resource.Internal eInternalResource = eInternalResource(); if (eInternalResource == null || !eInternalResource.isLoading()) { if (preCondition != null && preCondition != newGuard) { setPreCondition(null); } if (newGuard != null) { EList<Constraint> ownedRules = getOwnedRules(); if (!ownedRules.contains(newGuard)) { ownedRules.add(newGuard); } } } }
@Override protected NotificationChain inverseRemove(E object, NotificationChain notifications) { Resource.Internal resource = (Resource.Internal)object; Map<URI, Resource> map = getURIResourceMap(); if (map != null) { for (Iterator<Resource> i = map.values().iterator(); i.hasNext();) { if (resource == i.next()) { i.remove(); } } } return resource.basicSetResourceSet(null, notifications); }
writeURI(resource.getURI(), resource.getURIFragment(internalEObject)); if ((style & STYLE_PROXY_ATTRIBUTES) == 0)
if (!((Resource.Internal)notification.getNotifier()).isLoading())
if (!((Resource.Internal)notification.getNotifier()).isLoading())
msgs = ((InternalEList<?>)oldResource.getContents()).basicRemove(this, msgs); eSetDirectResource(null); newResource = newContainer.eInternalResource(); if (!moved && oldResource != null && !isResourceRoot) oldResource.detached(this); newResource.attached(this);
msgs = ((InternalEList<?>)oldResource.getContents()).basicRemove(this, msgs); eSetDirectResource(null); newResource = newContainer.eInternalResource(); oldResource.detached(this); newResource.attached(this);
writeURI(resource.getURI(), resource.getURIFragment(internalEObject)); if ((style & STYLE_PROXY_ATTRIBUTES) == 0)
msgs = ((InternalEList<?>)oldResource.getContents()).basicRemove(this, msgs); eSetDirectResource(null); newResource = newContainer.eInternalResource(); if (!moved && oldResource != null && !isResourceRoot) oldResource.detached(this); newResource.attached(this);
msgs = ((InternalEList<?>)oldResource.getContents()).basicRemove(this, msgs); eSetDirectResource(null); newResource = newContainer.eInternalResource(); oldResource.detached(this); newResource.attached(this);
notifications = ((InternalEList<?>)oldResource.getContents()).basicRemove(this, notifications); oldResource.detached(this); oldContainerResource.attached(this); oldContainerResource.detached(this);
notifications = ((InternalEList<?>)oldResource.getContents()).basicRemove(this, notifications); oldResource.detached(this); oldContainerResource.attached(this); oldContainerResource.detached(this);
notifications = ((InternalEList<?>)oldResource.getContents()).basicRemove(this, notifications); oldResource.detached(this); oldContainerResource.attached(this); oldContainerResource.detached(this);
notifications = ((InternalEList<?>)oldResource.getContents()).basicRemove(this, notifications); oldResource.detached(this); oldContainerResource.attached(this); oldContainerResource.detached(this);
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public NotificationChain basicSetOwnedParameteredElement( ParameterableElement newOwnedParameteredElement, NotificationChain msgs) { ParameterableElement oldOwnedParameteredElement = ownedParameteredElement; ownedParameteredElement = newOwnedParameteredElement; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, UMLPackage.TEMPLATE_PARAMETER__OWNED_PARAMETERED_ELEMENT, oldOwnedParameteredElement, newOwnedParameteredElement); if (msgs == null) msgs = notification; else msgs.add(notification); } Resource.Internal eInternalResource = eInternalResource(); if (eInternalResource == null || !eInternalResource.isLoading()) { if (newOwnedParameteredElement != null) { if (newOwnedParameteredElement != parameteredElement) { setParameteredElement(newOwnedParameteredElement); } } } return msgs; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public NotificationChain basicSetOwnedActual( ParameterableElement newOwnedActual, NotificationChain msgs) { ParameterableElement oldOwnedActual = ownedActual; ownedActual = newOwnedActual; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, UMLPackage.TEMPLATE_PARAMETER_SUBSTITUTION__OWNED_ACTUAL, oldOwnedActual, newOwnedActual); if (msgs == null) msgs = notification; else msgs.add(notification); } Resource.Internal eInternalResource = eInternalResource(); if (eInternalResource == null || !eInternalResource.isLoading()) { if (newOwnedActual != null) { if (newOwnedActual != actual) { setActual(newOwnedActual); } } } return msgs; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public NotificationChain basicSetTemplateParameter( TemplateParameter newTemplateParameter, NotificationChain msgs) { TemplateParameter oldTemplateParameter = templateParameter; templateParameter = newTemplateParameter; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, UMLPackage.INSTANCE_SPECIFICATION__TEMPLATE_PARAMETER, oldTemplateParameter, newTemplateParameter); if (msgs == null) msgs = notification; else msgs.add(notification); } Resource.Internal eInternalResource = eInternalResource(); if (eInternalResource == null || !eInternalResource.isLoading()) { TemplateParameter owningTemplateParameter = basicGetOwningTemplateParameter(); if (owningTemplateParameter != null && owningTemplateParameter != newTemplateParameter) { setOwningTemplateParameter(null); } } return msgs; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public NotificationChain basicSetTemplateParameter( TemplateParameter newTemplateParameter, NotificationChain msgs) { TemplateParameter oldTemplateParameter = templateParameter; templateParameter = newTemplateParameter; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, UMLPackage.PACKAGE__TEMPLATE_PARAMETER, oldTemplateParameter, newTemplateParameter); if (msgs == null) msgs = notification; else msgs.add(notification); } Resource.Internal eInternalResource = eInternalResource(); if (eInternalResource == null || !eInternalResource.isLoading()) { TemplateParameter owningTemplateParameter = basicGetOwningTemplateParameter(); if (owningTemplateParameter != null && owningTemplateParameter != newTemplateParameter) { setOwningTemplateParameter(null); } } return msgs; }
protected static StringBuffer getXMIIdentifier( InternalEObject internalEObject, StringBuffer xmiIdentifier) { InternalEObject eInternalContainer = internalEObject .eInternalContainer(); Resource.Internal eDirectResource = internalEObject.eDirectResource(); while (eInternalContainer != null && eDirectResource == null) { getValidNCName(eInternalContainer.eURIFragmentSegment( internalEObject.eContainingFeature(), internalEObject), xmiIdentifier); internalEObject = eInternalContainer; eInternalContainer = internalEObject.eInternalContainer(); eDirectResource = internalEObject.eDirectResource(); if (eInternalContainer != null && eDirectResource == null) { xmiIdentifier.insert(0, '-'); } } if (eDirectResource != null) { int index = eDirectResource.getContents().indexOf(internalEObject); int length = xmiIdentifier.length(); if (index > 0 || length == 0) { if (length > 0) { xmiIdentifier.insert(0, '-'); } xmiIdentifier.insert(0, index); xmiIdentifier.insert(0, '_'); } } return xmiIdentifier; }