Atl2NmfSBenchmark/Metamodels/Make.cs
/// <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>
Gets called when the parent model element of the current model element changes
Gets called when the parent model element of the current model element changes
protected override void OnParentChanged(IModelElement newParent, IModelElement oldParent)
        {
            IRule oldRuleShellLine = ModelHelper.CastAs<IRule>(oldParent);
            IRule newRuleShellLine = ModelHelper.CastAs<IRule>(newParent);
            if ((oldRuleShellLine != null))
            {
                oldRuleShellLine.ShellLines.Remove(this);
            }
            if ((newRuleShellLine != null))
            {
                newRuleShellLine.ShellLines.Add(this);
            }
            ValueChangedEventArgs e = new ValueChangedEventArgs(oldRuleShellLine, newRuleShellLine);
            this.OnRuleShellLineChanged(e);
            this.OnPropertyChanged("RuleShellLine", e, _ruleShellLineReference);
            base.OnParentChanged(newParent, oldParent);
        }
protected override void OnParentChanged ( IModelElement newParent , IModelElement oldParent ) { IRule oldRuleShellLine = ModelHelper . CastAs < IRule > ( oldParent ) ; IRule newRuleShellLine = ModelHelper . CastAs < IRule > ( newParent ) ; if ( ( oldRuleShellLine != null ) ) { oldRuleShellLine . ShellLines . Remove ( this ) ; } if ( ( newRuleShellLine != null ) ) { newRuleShellLine . ShellLines . Add ( this ) ; } ValueChangedEventArgs e = new ValueChangedEventArgs ( oldRuleShellLine , newRuleShellLine ) ; this . OnRuleShellLineChanged ( e ) ; this . OnPropertyChanged ( " " , e , _ruleShellLineReference ) ; base . OnParentChanged ( newParent , oldParent ) ; }
Gets called when the parent model element of the current model element changes
Gets called when the parent model element of the current model element changes
newParent
IModelElement
The new parent model element
The new parent model element
oldParent
IModelElement
The old parent model element
The old parent model element