private void deleteTGGRuleMainMethods() { String result = repository.SQLQuery(@"SELECT a.ea_guid FROM t_object a WHERE a.Stereotype = 'Rule' OR a.Stereotype = 'Multi-Rule' "); foreach (String row in EAUtil.getXMLNodeContentFromSQLQueryString(result, "ea_guid")) { if (row != "") { EA.Element ruleElement = repository.GetElementByGuid(row); if (ruleElement != null) { short i = 0; foreach (EA.Method method in ruleElement.Methods) { if (method.Name == ruleElement.Name) { ruleElement.Methods.Delete(i); } i++; } EAUtil.deleteTaggedValue(ruleElement, "MainMethodGuid"); } } } }
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(); }
private static void deleteOldOVAssignmentTags(EA.Element e, int i) { EAUtil.deleteTaggedValue(e, "Assignment" + i); EAUtil.deleteTaggedValue(e, "Assignment" + i + "LeftAttributeID"); EAUtil.deleteTaggedValue(e, "Assignment" + i + "RightAttributeID"); EAUtil.deleteTaggedValue(e, "Assignment" + i + "RightExpression"); EAUtil.deleteTaggedValue(e, "Assignment" + i + "RightMethodID"); EAUtil.deleteTaggedValue(e, "Assignment" + i + "RightParameters"); EAUtil.deleteTaggedValue(e, "Assignment" + i + "RightTargetID"); }
private void deleteOlvLvTaggedValues(string p) { foreach (EA.Connector c in EAUtil.findAllStereotypedConnectors(repository, p)) { EAUtil.deleteTaggedValue(c, "assoModifier"); EAUtil.deleteTaggedValue(c, "assoType"); EAUtil.deleteTaggedValue(c, "textOfReference"); EAUtil.deleteTaggedValue(c, "textOfReferenceOpposite"); EAUtil.deleteTaggedValue(c, "swap"); EAUtil.deleteTaggedValue(c, "idOfReference"); EAUtil.deleteTaggedValue(c, "assoName"); EAUtil.deleteTaggedValue(c, "sdmXMI"); EAUtil.deleteTaggedValue(c, "bound"); } }
public override void doEaGuiStuff() { base.doEaGuiStuff(); //compute real ea object to perfom updates EA.Element realElement = sqlElement.getRealElement(); //taggedvalues for shapescript EAEcoreAddin.Util.EAUtil.setTaggedValue(Repository, realElement, ObjectVariable.BindingSemanticsTaggedValueName, this.BindingSemantics.ToString().ToLower()); EAEcoreAddin.Util.EAUtil.setTaggedValue(Repository, realElement, ObjectVariable.BindingOperatorTaggedValueName, this.BindingOperator.ToString().ToLower()); EAEcoreAddin.Util.EAUtil.setTaggedValue(Repository, realElement, ObjectVariable.BindingStateTaggedValueName, this.BindingState.ToString().ToLower()); EAEcoreAddin.Util.EAUtil.setTaggedValue(Repository, realElement, ObjectVariable.RunStateTaggedValueName, (Constraints.Count > 0 || AttributeAssignments.Count > 0).ToString()); if (NacIndex == -1) { EAUtil.deleteTaggedValue(realElement, NacIndexTaggedValueName); } else { EAUtil.setTaggedValue(Repository, realElement, NacIndexTaggedValueName, NacIndex.ToString()); } realElement.Name = this.Name; realElement.StereotypeEx = SDMModelingMain.ObjectVariableStereotype; if (this.Classifier != null) { realElement.ClassifierID = this.Classifier.EaElement.ElementID; } realElement.Notes = ""; String bindingExprText = SDMUtil.setOvMethodCallExpressionGui(this); EAEcoreAddin.Util.EAUtil.setTaggedValue(Repository, realElement, "bindingOutput", bindingExprText); autoSetDiagramObjectSize(bindingExprText); realElement.Update(); }
private void deleteOldOvTaggedValues(String stereotype) { foreach (EA.Element e in EAUtil.findAllStereotypedElements(repository, stereotype)) { deleteOldOVAssignmentTags(e, 0); deleteOldOVAssignmentTags(e, 1); deleteOldOVAssignmentTags(e, 2); deleteOldOVAssignmentTags(e, 3); deleteOldOVAssignmentTags(e, 4); EAUtil.deleteTaggedValue(e, "bindingAttributeID"); EAUtil.deleteTaggedValue(e, "assignmentCount"); EAUtil.deleteTaggedValue(e, "bindingExpression"); EAUtil.deleteTaggedValue(e, "bindingMethodID"); EAUtil.deleteTaggedValue(e, "bindingParameters"); EAUtil.deleteTaggedValue(e, "bindingTargetID"); EAUtil.deleteTaggedValue(e, "objConstraint"); EAUtil.deleteTaggedValue(e, "objModifier"); EAUtil.deleteTaggedValue(e, "sdmXMI"); EAUtil.deleteTaggedValue(e, "bound"); } }