Inheritance: Element, TSF.UmlToolingFramework.UML.Classes.Kernel.Relationship
 public DiagramLinkWrapper(Model model, ConnectorWrapper relation,
                           Diagram diagram){
   this.model = model;
   this.relation = relation;
   this.diagram = diagram;
   this.wrappedDiagramLink = diagram.getDiagramLinkForRelation(relation);
 }
 public static string getConnectorString(ConnectorWrapper mappedConnector)
 {
     //check if the connector has a target role name
     string connectorString = mappedConnector.targetEnd.name;
     //if no rolename then try the association name
     if (string.IsNullOrEmpty(connectorString)) connectorString = mappedConnector.name;
     //if no associationName then we take the name of the target element
     if (string.IsNullOrEmpty(connectorString)) connectorString = mappedConnector.target.name;
     return connectorString;
 }
コード例 #3
0
 public AssociationEnd(Model model, ConnectorWrapper linkedAssocation,
                       global::EA.ConnectorEnd associationEnd ):base(model)
 {
   this.wrappedAssociationEnd = associationEnd;
   this._association = linkedAssocation;
 }
コード例 #4
0
 private void zvyrazniVDiagrameToolStripMenuItem_Click(object sender, System.EventArgs e)
 {
     try {
         if (selectedError.rule.elementType == "Class" || selectedError.rule.elementType == "UseCase" || selectedError.rule.elementType == "Activity")
         {
             ElementWrapper elementWrapper = new ElementWrapper(selectedError.model, (EA.Element)selectedError.element);
             elementWrapper.selectInCurrentDiagram();
         }
         else
         {
             ConnectorWrapper connectorWrapper = new ConnectorWrapper(selectedError.model, (EA.Connector)selectedError.element);
             connectorWrapper.selectInCurrentDiagram();
         }
     }
     catch (Exception ex) { }
 }
コード例 #5
0
ファイル: Rule.cs プロジェクト: JOndik/SmallTEAmsHelper
        public bool checkConnectorOwnerType(object connector, Model model, string type, string owner)
        {
            ConnectorWrapper connectorWrapper = new ConnectorWrapper(model, (EA.Connector)connector);
            ElementWrapper elementWrapper = (ElementWrapper)connectorWrapper.owner;
            EA.Element element;

            if (type == "src")
            {
                element = ((ElementWrapper)connectorWrapper.source).WrappedElement;
            }
            else
            {
                element = ((ElementWrapper)connectorWrapper.target).WrappedElement;
            }

            return element.Type == owner;
        }
コード例 #6
0
ファイル: Rule.cs プロジェクト: JOndik/SmallTEAmsHelper
        public string getConnectorOwnerName(object connector, Model model, string type)
        {
            ConnectorWrapper connectorWrapper = new ConnectorWrapper(model, (EA.Connector)connector);
            ElementWrapper elementWrapper = (ElementWrapper)connectorWrapper.owner;
            EA.Element element;

            if (type == "src")
            {
                element = ((ElementWrapper)connectorWrapper.source).WrappedElement;
            }
            else
            {
                element = ((ElementWrapper)connectorWrapper.target).WrappedElement;
            }

            return element.Name;
        }
 public ConnectorMapping(ConnectorWrapper wrappedConnector,string basePath,string targetBasePath)
     : base(wrappedConnector.sourceElement,wrappedConnector.targetElement,basePath,targetBasePath)
 {
     this.wrappedConnector = wrappedConnector;
 }