Esempio n. 1
0
        protected override void MergeDisconnect(DslModeling::ModelElement sourceElement)
        {
            if (sourceElement == null)
            {
                throw new global::System.ArgumentNullException("sourceElement");
            }

            global::imbNLP.PipelineDSLD.ExampleElement sourceExampleElement1 = sourceElement as global::imbNLP.PipelineDSLD.ExampleElement;
            if (sourceExampleElement1 != null)
            {
                // Delete link for path ExampleModelHasElements.Elements

                foreach (DslModeling::ElementLink link in global::imbNLP.PipelineDSLD.ExampleModelHasElements.GetLinks((global::imbNLP.PipelineDSLD.ExampleModel) this, sourceExampleElement1))
                {
                    // Delete the link, but without possible delete propagation to the element since it's moving to a new location.
                    link.Delete(global::imbNLP.PipelineDSLD.ExampleModelHasElements.ExampleModelDomainRoleId, global::imbNLP.PipelineDSLD.ExampleModelHasElements.ElementDomainRoleId);
                }

                return;
            }
            // Fall through to base class if this class hasn't handled the unmerge.
            base.MergeDisconnect(sourceElement);
        }
Esempio n. 2
0
 public static global::imbNLP.PipelineDSLD.ExampleModel GetParentForExampleElement(global::imbNLP.PipelineDSLD.ExampleElement root)
 {
     // Segments 0 and 1
     global::imbNLP.PipelineDSLD.ExampleModel result = root.ExampleModel;
     if (result == null)
     {
         return(null);
     }
     return(result);
 }
Esempio n. 3
0
 public static global::imbNLP.PipelineDSLD.ExampleElementReferencesTargets GetLink(global::imbNLP.PipelineDSLD.ExampleElement source, global::imbNLP.PipelineDSLD.ExampleElement target)
 {
     global::System.Collections.Generic.IList <global::imbNLP.PipelineDSLD.ExampleElementReferencesTargets> links = DslModeling::DomainRoleInfo.GetElementLinks <global::imbNLP.PipelineDSLD.ExampleElementReferencesTargets>(source, global::imbNLP.PipelineDSLD.ExampleElementReferencesTargets.SourceDomainRoleId);
     foreach (global::imbNLP.PipelineDSLD.ExampleElementReferencesTargets link in links)
     {
         if (target.Equals(link.Target))
         {
             return(link);
         }
     }
     return(null);
 }
Esempio n. 4
0
 public static global::System.Collections.ObjectModel.ReadOnlyCollection <global::imbNLP.PipelineDSLD.ExampleElementReferencesTargets> GetLinks(global::imbNLP.PipelineDSLD.ExampleElement source, global::imbNLP.PipelineDSLD.ExampleElement target)
 {
     global::System.Collections.Generic.List <global::imbNLP.PipelineDSLD.ExampleElementReferencesTargets>  outLinks = new global::System.Collections.Generic.List <global::imbNLP.PipelineDSLD.ExampleElementReferencesTargets>();
     global::System.Collections.Generic.IList <global::imbNLP.PipelineDSLD.ExampleElementReferencesTargets> links    = DslModeling::DomainRoleInfo.GetElementLinks <global::imbNLP.PipelineDSLD.ExampleElementReferencesTargets>(source, global::imbNLP.PipelineDSLD.ExampleElementReferencesTargets.SourceDomainRoleId);
     foreach (global::imbNLP.PipelineDSLD.ExampleElementReferencesTargets link in links)
     {
         if (target.Equals(link.Target))
         {
             outLinks.Add(link);
         }
     }
     return(outLinks.AsReadOnly());
 }
Esempio n. 5
0
 public static global::System.Collections.ObjectModel.ReadOnlyCollection <global::imbNLP.PipelineDSLD.ExampleElementReferencesTargets> GetLinksToSources(global::imbNLP.PipelineDSLD.ExampleElement targetInstance)
 {
     return(DslModeling::DomainRoleInfo.GetElementLinks <global::imbNLP.PipelineDSLD.ExampleElementReferencesTargets>(targetInstance, global::imbNLP.PipelineDSLD.ExampleElementReferencesTargets.TargetDomainRoleId));
 }
Esempio n. 6
0
 public static global::imbNLP.PipelineDSLD.ExampleModelHasElements GetLinkToExampleModel(global::imbNLP.PipelineDSLD.ExampleElement elementInstance)
 {
     global::System.Collections.Generic.IList <global::imbNLP.PipelineDSLD.ExampleModelHasElements> links = DslModeling::DomainRoleInfo.GetElementLinks <global::imbNLP.PipelineDSLD.ExampleModelHasElements>(elementInstance, global::imbNLP.PipelineDSLD.ExampleModelHasElements.ElementDomainRoleId);
     global::System.Diagnostics.Debug.Assert(links.Count <= 1, "Multiplicity of Element not obeyed.");
     if (links.Count == 0)
     {
         return(null);
     }
     else
     {
         return(links[0]);
     }
 }