public override Serialization.MocaTree.MocaNode serializeToMocaTree() { MocaNode linkVariableNode = new MocaNode("LinkVariable"); linkVariableNode.appendChildAttribute("name", this.linkDialogueEntry.supplierRoleName); linkVariableNode.appendChildAttribute("sourceGuid", SourceGuid); linkVariableNode.appendChildAttribute("targetGuid", TargetGuid); linkVariableNode.appendChildAttribute("bindingOperator", this.BindingOperator.ToString().ToLower()); linkVariableNode.appendChildAttribute("bindingSemantics", this.BindingSemantics.ToString().ToLower()); linkVariableNode.appendChildAttribute("sourceName", this.linkDialogueEntry.clientRoleName); linkVariableNode.appendChildAttribute(ObjectVariable.NacIndexTaggedValueName, NacIndex.ToString()); if (this.linkDialogueEntry != null) { linkVariableNode.appendChildAttribute("textOfReference", this.linkDialogueEntry.output); linkVariableNode.appendChildAttribute("textOfReferenceOpposite", this.linkDialogueEntry.OutputOpposite); linkVariableNode.appendChildAttribute("idOfReference", this.linkDialogueEntry.CorrespondingConnectorGuid); linkVariableNode.appendChildAttribute("direction", this.linkDialogueEntry.direction.ToString().ToLower()); } linkVariableNode.appendChildAttribute(Main.GuidStringName, LinkVariableEA.ConnectorGUID); return(linkVariableNode); }
public override void doEaGuiStuff() { EA.Connector realconnector = LinkVariableEA.getRealConnector(); if (linkDialogueEntry != null) { if (linkDialogueEntry.direction == LinkDialogueEntryDirection.LEFT && !Persistency.Export.ExportRunning) { int clientID = LinkVariableEA.ClientID; realconnector.ClientID = LinkVariableEA.SupplierID; realconnector.SupplierID = clientID; } } realconnector.Direction = "Unspecified"; realconnector.StereotypeEx = SDMModelingMain.LinkVariableStereotype; realconnector.ClientEnd.Role = this.linkDialogueEntry.clientRoleName; realconnector.SupplierEnd.Role = this.linkDialogueEntry.supplierRoleName; this.Name = realconnector.SupplierEnd.Role; EAEcoreAddin.Util.EAUtil.setTaggedValue(Repository, realconnector, Main.MoflonVerboseTaggedValueName, Main.FalseValue); EAEcoreAddin.Util.EAUtil.setTaggedValue(Repository, realconnector, ObjectVariable.BindingSemanticsTaggedValueName, this.BindingSemantics.ToString().ToLower()); EAEcoreAddin.Util.EAUtil.setTaggedValue(Repository, realconnector, ObjectVariable.BindingOperatorTaggedValueName, this.BindingOperator.ToString().ToLower()); if (NacIndex == -1) { EAUtil.deleteTaggedValue(realconnector, ObjectVariable.NacIndexTaggedValueName); } else { EAUtil.setTaggedValue(Repository, realconnector, ObjectVariable.NacIndexTaggedValueName, NacIndex.ToString()); } this.LinkVariableEA.getRealConnector().Update(); }