[Mobies-commit] [commit] r3631 - UDM/trunk/src/UML GME/Interpreter

endre at redhat1.isis.vanderbilt.edu endre at redhat1.isis.vanderbilt.edu
Mon Jan 31 23:20:02 CST 2011


Author: endre
Date: Mon Jan 31 23:20:01 2011
New Revision: 3631

Log:
If an UML association is not built yet, build it when linking the reference port helpers, UDM-76

Modified:
   UDM/trunk/src/UML GME/Interpreter/BONComponent.cpp

Modified: UDM/trunk/src/UML GME/Interpreter/BONComponent.cpp
==============================================================================
--- UDM/trunk/src/UML GME/Interpreter/BONComponent.cpp	Mon Jan 31 15:54:09 2011	(r3630)
+++ UDM/trunk/src/UML GME/Interpreter/BONComponent.cpp	Mon Jan 31 23:20:01 2011	(r3631)
@@ -1348,7 +1348,7 @@
 
 void CAssociationBase::BuildUML()
 {
-	if (!IsCrossPackage())
+	if (uml_ass == Udm::null && !IsCrossPackage())
 	{
 		CNamespaceBuilder *ns = GetNamespace();
 		if(ns)
@@ -1417,6 +1417,10 @@
 			CAssociationBase *assoc = dynamic_cast<CAssociationBase *>(associationClass->srcAssociations.GetNext(cpos));
 			ASSERT(assoc);
 			::Uml::Association uml_ass = assoc->GetUmlAssociation();
+			if (uml_ass == Udm::null) {
+				assoc->BuildUML();
+				uml_ass = assoc->GetUmlAssociation();
+			}
 			set< ::Uml::AssociationRole> aroles = uml_ass.roles();
 			for (set< ::Uml::AssociationRole>::const_iterator i = aroles.begin(); i != aroles.end(); i++) {
 				string role_name = ::Uml::MakeRoleName(*i);


More information about the Mobies-commit mailing list