예제 #1
0
        public PropertyGridDomainClass2ViewModel(DslEditorViewModelData::ViewModelStore viewModelStore, global::Tum.PDE.VSPluginDSL.DomainClass2 element) : base(viewModelStore, element)
        {
            // subscribe to DomainClass2.Name changes
            this.EventManager.GetEvent <DslEditorViewModelEvents::ModelElementPropertyChangedEvent>().Subscribe(this.Store.DomainDataDirectory.GetDomainProperty(global::Tum.PDE.VSPluginDSL.DomainClass2.NameDomainPropertyId), this.Element.Id, new System.Action <DslModeling::ElementPropertyChangedEventArgs>(NamePropertyChanged));

            // set name property value
            this.elementFullNameStorage = element.Name + " (Domain Class2)";
        }
예제 #2
0
 public static global::System.Collections.ObjectModel.ReadOnlyCollection <global::Tum.PDE.VSPluginDSL.DomainModelHasDomainClass2> GetLinks(global::Tum.PDE.VSPluginDSL.DomainModel source, global::Tum.PDE.VSPluginDSL.DomainClass2 target)
 {
     global::System.Collections.Generic.List <global::Tum.PDE.VSPluginDSL.DomainModelHasDomainClass2>  outLinks = new global::System.Collections.Generic.List <global::Tum.PDE.VSPluginDSL.DomainModelHasDomainClass2>();
     global::System.Collections.Generic.IList <global::Tum.PDE.VSPluginDSL.DomainModelHasDomainClass2> links    = DslModeling::DomainRoleInfo.GetElementLinks <global::Tum.PDE.VSPluginDSL.DomainModelHasDomainClass2>(source, global::Tum.PDE.VSPluginDSL.DomainModelHasDomainClass2.DomainModelDomainRoleId);
     foreach (global::Tum.PDE.VSPluginDSL.DomainModelHasDomainClass2 link in links)
     {
         if (target.Equals(link.DomainClass2))
         {
             outLinks.Add(link);
         }
     }
     return(outLinks.AsReadOnly());
 }
예제 #3
0
 public static global::Tum.PDE.VSPluginDSL.DomainModelHasDomainClass2 GetLink(global::Tum.PDE.VSPluginDSL.DomainModel source, global::Tum.PDE.VSPluginDSL.DomainClass2 target)
 {
     global::System.Collections.Generic.IList <global::Tum.PDE.VSPluginDSL.DomainModelHasDomainClass2> links = DslModeling::DomainRoleInfo.GetElementLinks <global::Tum.PDE.VSPluginDSL.DomainModelHasDomainClass2>(source, global::Tum.PDE.VSPluginDSL.DomainModelHasDomainClass2.DomainModelDomainRoleId);
     foreach (global::Tum.PDE.VSPluginDSL.DomainModelHasDomainClass2 link in links)
     {
         if (target.Equals(link.DomainClass2))
         {
             return(link);
         }
     }
     return(null);
 }
예제 #4
0
 public static global::Tum.PDE.VSPluginDSL.DomainModelHasDomainClass2 GetLinkToDomainModel(global::Tum.PDE.VSPluginDSL.DomainClass2 domainClass2Instance)
 {
     global::System.Collections.Generic.IList <global::Tum.PDE.VSPluginDSL.DomainModelHasDomainClass2> links = DslModeling::DomainRoleInfo.GetElementLinks <global::Tum.PDE.VSPluginDSL.DomainModelHasDomainClass2>(domainClass2Instance, global::Tum.PDE.VSPluginDSL.DomainModelHasDomainClass2.DomainClass2DomainRoleId);
     global::System.Diagnostics.Debug.Assert(links.Count <= 1, "Multiplicity of DomainClass2 not obeyed.");
     if (links.Count == 0)
     {
         return(null);
     }
     else
     {
         return(links[0]);
     }
 }