Exemplo n.º 1
0
        /// <summary>
        /// Gets called when the parent model element of the current model element is about to change
        /// </summary>
        /// <param name="oldParent">The old parent model element</param>
        /// <param name="newParent">The new parent model element</param>
        protected override void OnParentChanging(IModelElement newParent, IModelElement oldParent)
        {
            IForkAction           oldForkAction_SynchronisationPoint = ModelHelper.CastAs <IForkAction>(oldParent);
            IForkAction           newForkAction_SynchronisationPoint = ModelHelper.CastAs <IForkAction>(newParent);
            ValueChangedEventArgs e = new ValueChangedEventArgs(oldForkAction_SynchronisationPoint, newForkAction_SynchronisationPoint);

            this.OnForkAction_SynchronisationPointChanging(e);
            this.OnPropertyChanging("ForkAction_SynchronisationPoint", e, _forkAction_SynchronisationPointReference);
        }
Exemplo n.º 2
0
        /// <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)
        {
            IForkAction oldForkAction_SynchronisationPoint = ModelHelper.CastAs <IForkAction>(oldParent);
            IForkAction newForkAction_SynchronisationPoint = ModelHelper.CastAs <IForkAction>(newParent);

            if ((oldForkAction_SynchronisationPoint != null))
            {
                oldForkAction_SynchronisationPoint.SynchronisingBehaviours_ForkAction = null;
            }
            if ((newForkAction_SynchronisationPoint != null))
            {
                newForkAction_SynchronisationPoint.SynchronisingBehaviours_ForkAction = this;
            }
            ValueChangedEventArgs e = new ValueChangedEventArgs(oldForkAction_SynchronisationPoint, newForkAction_SynchronisationPoint);

            this.OnForkAction_SynchronisationPointChanged(e);
            this.OnPropertyChanged("ForkAction_SynchronisationPoint", e, _forkAction_SynchronisationPointReference);
            base.OnParentChanged(newParent, oldParent);
        }
Exemplo n.º 3
0
 /// <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.SynchronisationPoint_ForkedBehaviour == null))
     {
         ISynchronisationPoint synchronisationPoint_ForkedBehaviourCasted = item.As <ISynchronisationPoint>();
         if ((synchronisationPoint_ForkedBehaviourCasted != null))
         {
             this._parent.SynchronisationPoint_ForkedBehaviour = synchronisationPoint_ForkedBehaviourCasted;
             return;
         }
     }
     if ((this._parent.ForkAction_ForkedBehaivour == null))
     {
         IForkAction forkAction_ForkedBehaivourCasted = item.As <IForkAction>();
         if ((forkAction_ForkedBehaivourCasted != null))
         {
             this._parent.ForkAction_ForkedBehaivour = forkAction_ForkedBehaivourCasted;
             return;
         }
     }
 }
Exemplo n.º 4
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                IVariableUsage outputParameterUsage_SynchronisationPointCasted = item.As <IVariableUsage>();

                if ((outputParameterUsage_SynchronisationPointCasted != null))
                {
                    this._parent.OutputParameterUsage_SynchronisationPoint.Add(outputParameterUsage_SynchronisationPointCasted);
                }
                if ((this._parent.ForkAction_SynchronisationPoint == null))
                {
                    IForkAction forkAction_SynchronisationPointCasted = item.As <IForkAction>();
                    if ((forkAction_SynchronisationPointCasted != null))
                    {
                        this._parent.ForkAction_SynchronisationPoint = forkAction_SynchronisationPointCasted;
                        return;
                    }
                }
                IForkedBehaviour synchronousForkedBehaviours_SynchronisationPointCasted = item.As <IForkedBehaviour>();

                if ((synchronousForkedBehaviours_SynchronisationPointCasted != null))
                {
                    this._parent.SynchronousForkedBehaviours_SynchronisationPoint.Add(synchronousForkedBehaviours_SynchronisationPointCasted);
                }
            }