internal static void RolePlayerChanged(DslModeling::RolePlayerChangedEventArgs e, bool repaintOnly) { if (e == null) { throw new global::System.ArgumentNullException("e"); } if (typeof(global::EPAM.NHModelingLanguage.EntityHasProperties).IsAssignableFrom(e.DomainRelationship.ImplementationClass)) { if (e.DomainRole.IsSource) { //global::System.Collections.IEnumerable oldElements = CompartmentItemAddRule.GetEntityForEntityShapePropertiesFromLastLink((global::EPAM.NHModelingLanguage.Property)e.OldRolePlayer); //foreach(DslModeling::ModelElement element in oldElements) //{ // DslModeling::LinkedElementCollection<DslDiagrams::PresentationElement> pels = DslDiagrams::PresentationViewsSubject.GetPresentation(element); // foreach(DslDiagrams::PresentationElement pel in pels) // { // global::EPAM.NHModelingLanguage.EntityShape compartmentShape = pel as global::EPAM.NHModelingLanguage.EntityShape; // if(compartmentShape != null) // { // compartmentShape.GetCompartmentMappings()[0].InitializeCompartmentShape(compartmentShape); // } // } //} global::System.Collections.IEnumerable elements = CompartmentItemAddRule.GetEntityForEntityShapePropertiesFromLastLink((global::EPAM.NHModelingLanguage.EntityHasProperties)e.ElementLink); CompartmentItemAddRule.UpdateCompartments(elements, typeof(global::EPAM.NHModelingLanguage.EntityShape), "Properties", repaintOnly); } else { global::System.Collections.IEnumerable elements = CompartmentItemAddRule.GetEntityForEntityShapeProperties((global::EPAM.NHModelingLanguage.Property)e.NewRolePlayer); CompartmentItemAddRule.UpdateCompartments(elements, typeof(global::EPAM.NHModelingLanguage.EntityShape), "Properties", repaintOnly); } } }
internal static void ElementPropertyChanged(DslModeling::ElementPropertyChangedEventArgs e, bool repaintOnly) { if (e == null) { throw new global::System.ArgumentNullException("e"); } if (e.ModelElement is global::EPAM.NHModelingLanguage.Property && e.DomainProperty.Id == global::EPAM.NHModelingLanguage.Property.DisplayNameDomainPropertyId) { global::System.Collections.IEnumerable elements = CompartmentItemAddRule.GetEntityForEntityShapeProperties((global::EPAM.NHModelingLanguage.Property)e.ModelElement); CompartmentItemAddRule.UpdateCompartments(elements, typeof(global::EPAM.NHModelingLanguage.EntityShape), "Properties", repaintOnly); } }
internal static void RolePlayerPositionChanged(DslModeling::RolePlayerOrderChangedEventArgs e, bool repaintOnly) { if (e == null) { throw new global::System.ArgumentNullException("e"); } if (typeof(global::EPAM.NHModelingLanguage.EntityHasProperties).IsAssignableFrom(e.DomainRelationship.ImplementationClass)) { if (!e.CounterpartDomainRole.IsSource) { global::System.Collections.IEnumerable elements = CompartmentItemAddRule.GetEntityForEntityShapeProperties((global::EPAM.NHModelingLanguage.Property)e.CounterpartRolePlayer); CompartmentItemAddRule.UpdateCompartments(elements, typeof(global::EPAM.NHModelingLanguage.EntityShape), "Properties", repaintOnly); } } }