public override void doRuleQuickFix(SQLElement eaElement2, SQLWrapperClasses.SQLRepository repository, int i, string errorMessage) { EA.Element eaElement = eaElement2.getRealElement(); i = 1; if (eaElement.Stereotype == ECOREModelingMain.EClassStereotype) { List <String> referenceNames = new List <string>(); foreach (EA.Connector con in eaElement.Connectors) { if (con.Type == ECOREModelingMain.EReferenceConnectorType) { EA.ConnectorEnd otherEnd = null; if (con.ClientID == eaElement.ElementID) { otherEnd = con.SupplierEnd; } else { otherEnd = con.ClientEnd; } if (otherEnd.Role != "") { if (referenceNames.Contains(otherEnd.Role)) { otherEnd.Role = otherEnd.Role + i++; otherEnd.Update(); } else { referenceNames.Add(otherEnd.Role); } } } con.Update(); } } EA.Diagram currentDiag = repository.GetCurrentDiagram(); if (currentDiag != null) { repository.SaveDiagram(currentDiag.DiagramID); repository.ReloadDiagram(currentDiag.DiagramID); } }