Bug 123648

Summary: AssociationEnds don't include role name or comment
Product: [Applications] umbrello Reporter: Jörg Walter <trouble>
Component: generalAssignee: Umbrello Development Group <umbrello-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: assoc.xmi - produced using KDE SVN branches/3.5/KDE/kdesdk/umbrello

Description Jörg Walter 2006-03-15 09:27:37 UTC
Version:            (using KDE KDE 3.5.0)
Installed from:    Gentoo Packages

In the XMI file, UML:AssociationEnd entries don't include the role name (however they are supposed to be stored. attribute name is always empty, for example). It is rather painful to extract it from the associationwidget. Furthermore, comments entered in the association properties are not saved at all -- they are lost after closing umbrello.

(Context: I'm generating code from the XMI file using XSLT, which is a lot more flexible and most importantly, it is easily adaptable without recompiling umbrello. Comments hold real comments and additional attributes for code generation, so they are doubly important for me.)
Comment 1 Oliver Kellogg 2006-03-15 21:08:34 UTC
The problem has to do with the way Umbrello automatically maps class
attributes to associations, see UMLView::createAutoAttributeAssociations().
The AssociationWidget is not bound to an UMLAssociation but to an
UMLAttribute. I.e. the association is merely rendered in the diagram but
does not exist as a model object.
Comment 2 Jörg Walter 2006-03-17 16:39:45 UTC
No, I'm not talking about automatic associations created by properties, but classic hand-made connections. These show up as <UML:Association> elements with two <UML:AssociationEnd> tags, but the "name" attribute on these <UML:AssociationEnd> tags is always empty, and the comment is missing, although the GUI has separate input fields for tag comments. In the case of the "name" attribute, I am able to extract the text from the assocwidget, which is annoying but a decent workaround. In the case of the comment, it doesn't appear anywhere in the XMI file.
Comment 3 Oliver Kellogg 2006-03-17 19:27:17 UTC
Created attachment 15168 [details]
assoc.xmi - produced using KDE SVN branches/3.5/KDE/kdesdk/umbrello

Thanks for clarifying - I cannot reproduce your observation.
The attached XMI file has an association like this:

+------------+					  +-----------+
|	     |	multiA			  multiB  |	      |
| nova_klaso |<>----------------------------------| new_class |
|	     |	roleAName   assocName	roleBName |	      |
+------------+					  +-----------+

Name, rolenames, multiplicities, and documentations were entered
in the Properties dialog and appear in the XMI file as expected.
Comment 4 Jörg Walter 2006-03-19 15:09:10 UTC
Yes, you are right. It works in KDE 3.5.1. I wasn't aware that there was a new release, sorry for the trouble.
Comment 5 Jörg Walter 2006-03-19 15:09:36 UTC
*** Bug has been marked as fixed ***.