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; }
public AssociationEnd(Model model, ConnectorWrapper linkedAssocation, global::EA.ConnectorEnd associationEnd ):base(model) { this.wrappedAssociationEnd = associationEnd; this._association = linkedAssocation; }
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) { } }
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; }
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; }