[Uml-devel] kdesdk/umbrello/umbrello
Oliver Kellogg
okellogg at users.sourceforge.net
Sun Feb 6 02:44:14 UTC 2005
CVS commit by okellogg:
createAutoAttributeAssociations(): UML Profile for CORBA standard says
an attribute whose type is stereotyped <<CORBAInterface>> shall be mapped
to a UniAssociation.
CCBUG:81301
M +8 -4 umlview.cpp 1.206
--- kdesdk/umbrello/umbrello/umlview.cpp #1.205:1.206
@@ -2468,5 +2468,4 @@ void UMLView::createAutoAttributeAssocia
if (tmpUmlObj == NULL)
return;
- Uml::Association_Type assocType = Uml::at_Composition;
// if the underlying model object is really a UMLClass then
if (tmpUmlObj->getBaseType() == Uml::ot_Datatype) {
@@ -2493,4 +2492,5 @@ void UMLView::createAutoAttributeAssocia
continue;
}
+ Uml::Association_Type assocType = Uml::at_Composition;
UMLWidget *w = findWidget( attrType->getID() );
// if the attribute type has a widget representation on this view
@@ -2500,12 +2500,16 @@ void UMLView::createAutoAttributeAssocia
// if the current diagram type permits compositions
AssocRules::allowAssociation(assocType, widget, w, false)) {
- // create a composition AssocWidget
+ // Create a composition AssocWidget, or, if the attribute type is
+ // stereotyped <<CORBAInterface>>, create a UniAssociation widget.
+ if (attrType->getStereotype(false) == "CORBAInterface")
+ assocType = at_UniAssociation;
AssociationWidget *a = new AssociationWidget (this, widget, assocType, w);
a->setUMLObject(attr);
a->calculateEndingPoints();
a->setVisibility(attr->getScope(), B);
- //a->setChangeability(true, B);
- if (assocType == at_Aggregation)
+ /*
+ if (assocType == at_Aggregation || assocType == at_UniAssociation)
a->setMulti("0..1", B);
+ */
a->setRoleName(attr->getName(), B);
a->setActivated(true);
More information about the umbrello-devel
mailing list