/// <summary> /// /// </summary> /// <param name="metaClass"></param> private void Create(LL.MDE.Components.Qvt.Metamodel.EMOF.IClass metaClass) { if ((metaClass != null)) { throw new ArgumentNullException("metaClass"); } throw new NotImplementedException(); }
/// <summary> /// Gets called when the parent model element of the current model element changes /// </summary> /// <param name="oldParent">The old parent model element</param> /// <param name="newParent">The new parent model element</param> protected override void OnParentChanged(IModelElement newParent, IModelElement oldParent) { LL.MDE.Components.Qvt.Metamodel.EMOF.IClass oldClass = ModelHelper.CastAs <LL.MDE.Components.Qvt.Metamodel.EMOF.IClass>(oldParent); LL.MDE.Components.Qvt.Metamodel.EMOF.IClass newClass = ModelHelper.CastAs <LL.MDE.Components.Qvt.Metamodel.EMOF.IClass>(newParent); if ((oldClass != null)) { oldClass.OwnedOperation.Remove(this); } if ((newClass != null)) { newClass.OwnedOperation.Add(this); } ValueChangedEventArgs e = new ValueChangedEventArgs(oldClass, newClass); this.OnClassChanged(e); this.OnPropertyChanged("Class", e); }
/// <summary> /// Adds the given element to the collection /// </summary> /// <param name="item">The item to add</param> public override void Add(IModelElement item) { IProperty ownedAttributeCasted = item.As <IProperty>(); if ((ownedAttributeCasted != null)) { this._parent.OwnedAttribute.Add(ownedAttributeCasted); } IOperation ownedOperationCasted = item.As <IOperation>(); if ((ownedOperationCasted != null)) { this._parent.OwnedOperation.Add(ownedOperationCasted); } LL.MDE.Components.Qvt.Metamodel.EMOF.IClass superClassCasted = item.As <LL.MDE.Components.Qvt.Metamodel.EMOF.IClass>(); if ((superClassCasted != null)) { this._parent.SuperClass.Add(superClassCasted); } }
/// <summary> /// Adds the given element to the collection /// </summary> /// <param name="item">The item to add</param> public override void Add(IModelElement item) { if ((this._parent.Class == null)) { LL.MDE.Components.Qvt.Metamodel.EMOF.IClass classCasted = item.As <LL.MDE.Components.Qvt.Metamodel.EMOF.IClass>(); if ((classCasted != null)) { this._parent.Class = classCasted; return; } } IParameter ownedParameterCasted = item.As <IParameter>(); if ((ownedParameterCasted != null)) { this._parent.OwnedParameter.Add(ownedParameterCasted); } IType raisedExceptionCasted = item.As <IType>(); if ((raisedExceptionCasted != null)) { this._parent.RaisedException.Add(raisedExceptionCasted); } }
/// <summary> /// Removes the given item from the collection /// </summary> /// <returns>True, if the item was removed, otherwise False</returns> /// <param name="item">The item that should be removed</param> public override bool Remove(IModelElement item) { IProperty propertyItem = item.As <IProperty>(); if (((propertyItem != null) && this._parent.OwnedAttribute.Remove(propertyItem))) { return(true); } IOperation operationItem = item.As <IOperation>(); if (((operationItem != null) && this._parent.OwnedOperation.Remove(operationItem))) { return(true); } LL.MDE.Components.Qvt.Metamodel.EMOF.IClass classItem = item.As <LL.MDE.Components.Qvt.Metamodel.EMOF.IClass>(); if (((classItem != null) && this._parent.SuperClass.Remove(classItem))) { return(true); } return(false); }
/// <summary> /// Creates a new observable property access proxy /// </summary> /// <param name="modelElement">The model instance element for which to create the property access proxy</param> public IsAbstractProxy(LL.MDE.Components.Qvt.Metamodel.EMOF.IClass modelElement) : base(modelElement) { }