private void RemoveEaUmlClassifier(EaUmlClassifier classifier) { short i = 0; Collection eaElements = eaPackage.Elements; foreach (Element eaElement in eaElements) { if (eaElement.ElementID == classifier.Id) { eaElements.Delete(i); } i++; } eaElements.Refresh(); }
private EaUmlClassifier CreateEaUmlClassifier(UmlClassifierSpec spec) { var eaElement = (Element)eaPackage.Elements.AddNew(spec.Name, "Class"); eaElement.PackageID = Id; var eaUmlClassifier = new EaUmlClassifier(eaRepository, eaElement); eaUmlClassifier.Initialize(spec); AddToClassDiagram(eaElement); eaPackage.Update(); eaPackage.Elements.Refresh(); return(eaUmlClassifier); }
public static bool isLiteralValue(Attribute eaAttribute, EaUmlClassifier owner) { //if the field StyleEx contains "IsLiteral=1" then it is a literal value //of if the StyleEx field is empty and the owner of this attribute is of type Enumeration var styleEx = eaAttribute.StyleEx; if (styleEx.Contains("IsLiteral=1")) { return(true); } if (styleEx.Contains("IsLiteral=0")) { return(false); } //no information in the StyleEx, check the owner return(owner.isEnumeration); }
private static void UpdateEaUmlClassifier(EaUmlClassifier classifier, UmlClassifierSpec spec) { classifier.Update(spec); }