*/
public void setTargetPlatform(TargetPlatform newTargetPlatform) {
if (newTargetPlatform != eInternalContainer() || (eContainerFeatureID() != TargetPlatformPackage.INCLUDE_DECLARATION__TARGET_PLATFORM && newTargetPlatform != null)) {
if (EcoreUtil.isAncestor(this, newTargetPlatform))
throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
NotificationChain msgs = null;
if (eInternalContainer() != null)
msgs = eBasicRemoveFromContainer(msgs);
if (newTargetPlatform != null)
msgs = ((InternalEObject)newTargetPlatform).eInverseAdd(this, TargetPlatformPackage.TARGET_PLATFORM__CONTENTS, TargetPlatform.class, msgs);
msgs = basicSetTargetPlatform(newTargetPlatform, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, TargetPlatformPackage.INCLUDE_DECLARATION__TARGET_PLATFORM, newTargetPlatform, newTargetPlatform));
}