internal T addNewDiagramToEACollection <T>(global::EA.Collection collection, string name) where T : class, UML.Diagrams.Diagram
        {
            string EADiagramType = translateUMLDiagramtypes(typeof(T).Name);
            object newEADiagram  = collection.AddNew(name, EADiagramType);

            return(this.createDiagram(newEADiagram) as T);
        }
Ejemplo n.º 2
0
 internal T addElementToEACollection <T>(global::EA.Collection collection,
                                         String name)
     where T : class, UML.Classes.Kernel.Element
 {
     return(this.model.factory.createElement(collection.AddNew
                                                 (name, this.translateTypeName(typeof(T).Name))) as T);
 }
Ejemplo n.º 3
0
        public HashSet <UML.Diagrams.DiagramElement> createDiagramElements
            (global::EA.Collection objectsToWrap)
        {
            HashSet <UML.Diagrams.DiagramElement> returnedDiagramElements =
                new HashSet <UML.Diagrams.DiagramElement>();

            foreach (global::EA.DiagramObject diagramObject in objectsToWrap)
            {
                returnedDiagramElements.Add(this.createDiagramElement(diagramObject));
            }
            return(returnedDiagramElements);
        }
 public override UML.Profiles.TaggedValue createNewTaggedValue(UML.Classes.Kernel.Element owner, string name)
 {
     if (owner is Element)
     {
         global::EA.Collection eaTaggedValues = ((Element)owner).eaTaggedValuesCollection;
         return(this.createTaggedValue(eaTaggedValues.AddNew(name, "")));
     }
     else
     {
         throw new NotImplementedException();
     }
 }
 internal T addElementToEACollection <T>(global::EA.Collection collection,
                                         string name, string EAType)
     where T : class, UML.Classes.Kernel.Element
 {
     //creating an enumeration is a bit special because EA thinks its just an attribute
     if (typeof(T).Name == "EnumerationLiteral")
     {
         return(new EnumerationLiteral((Model)this.model, (global::EA.Attribute)collection.AddNew(name, this.translateTypeName(EAType))) as T);
     }
     else
     {
         return(this.model.factory.createElement(collection.AddNew(name, this.translateTypeName(EAType))) as T);
     }
 }
 internal T addElementToEACollection <T>(global::EA.Collection collection,
                                         string name, string EAType)
     where T : class, UML.Classes.Kernel.Element
 {
     //creating an enumeration is a bit special because EA thinks its just an attribute
     if (typeof(T).Name == "EnumerationLiteral")
     {
         return(new EnumerationLiteral((Model)this.model, (global::EA.Attribute)collection.AddNew(name, this.translateTypeName(EAType))) as T);
     }
     //Creating Associationclasses is a bit special too. It only becomes an associationclass according to EA once it is linked to an association
     else if (typeof(T).Name == "AssociationClass")
     {
         return(new AssociationClass((Model)this.model, (global::EA.Element)collection.AddNew(name, this.translateTypeName(EAType))) as T);
     }
     else
     {
         return(this.model.factory.createElement(collection.AddNew(name, this.translateTypeName(EAType))) as T);
     }
 }
Ejemplo n.º 7
0
 internal T addElementToEACollection <T>(global::EA.Collection collection,
                                         String name)
     where T : class, UML.Classes.Kernel.Element
 {
     return(this.addElementToEACollection <T> (collection, name, this.translateTypeName(typeof(T).Name)));
 }