GetEntityElementForEntityShapePropertiesFromLastLink() static private method

static private GetEntityElementForEntityShapePropertiesFromLastLink ( global root ) : global::System.Collections.ICollection
root global
return global::System.Collections.ICollection
コード例 #1
0
ファイル: Diagram.cs プロジェクト: thabart/SimpleOrm
			internal static void RolePlayerChanged(DslModeling::RolePlayerChangedEventArgs e, bool repaintOnly)
			{
				if(e==null) throw new global::System.ArgumentNullException("e");
				if(typeof(global::Company.OrmLanguage.EntityHasProperties).IsAssignableFrom(e.DomainRelationship.ImplementationClass))
				{
					if(e.DomainRole.IsSource)
					{
						//global::System.Collections.IEnumerable oldElements = CompartmentItemAddRule.GetEntityElementForEntityShapePropertiesFromLastLink((global::Company.OrmLanguage.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::Company.OrmLanguage.EntityShape compartmentShape = pel as global::Company.OrmLanguage.EntityShape;
						//		if(compartmentShape != null)
						//		{
						//			compartmentShape.GetCompartmentMappings()[0].InitializeCompartmentShape(compartmentShape);
						//		}
						//	}
						//}
						
						global::System.Collections.IEnumerable elements = CompartmentItemAddRule.GetEntityElementForEntityShapePropertiesFromLastLink((global::Company.OrmLanguage.EntityHasProperties)e.ElementLink);
						CompartmentItemAddRule.UpdateCompartments(elements, typeof(global::Company.OrmLanguage.EntityShape), "Properties", repaintOnly);
					}
					else 
					{
						global::System.Collections.IEnumerable elements = CompartmentItemAddRule.GetEntityElementForEntityShapeProperties((global::Company.OrmLanguage.Property)e.NewRolePlayer);
						CompartmentItemAddRule.UpdateCompartments(elements, typeof(global::Company.OrmLanguage.EntityShape), "Properties", repaintOnly);
					}
				}
			}
コード例 #2
0
ファイル: Diagram.cs プロジェクト: thabart/SimpleOrm
			internal static void ElementDeleted(DslModeling::ElementDeletedEventArgs e, bool repaintOnly)
			{
				if(e==null) throw new global::System.ArgumentNullException("e");
				if(e.ModelElement is global::Company.OrmLanguage.EntityHasProperties)
				{
					global::System.Collections.ICollection elements = CompartmentItemAddRule.GetEntityElementForEntityShapePropertiesFromLastLink((global::Company.OrmLanguage.EntityHasProperties)e.ModelElement);
					CompartmentItemAddRule.UpdateCompartments(elements, typeof(global::Company.OrmLanguage.EntityShape), "Properties", repaintOnly);
				}
			}