Version: 1.5.3 (using KDE KDE 3.5.2)
Installed from: Debian testing/unstable Packages
The XMI File of a Model, which was created in Umbrello and then saved contains all
deleted (and current) associations between classes in the <XMI.content> part.
I did not look at the <XMI.extensions> part, but I assume that the deleted associations are not included in that part, because the visual representation of the UML diagramm, which is displayed by Umbrello is correct.
To recreate this bug, just follow these simple steps:
1.) Create a new UML document with ctrl+n
2.) Create a new UML class diagram.
3.) Create two new classes in the diagram.
4.) create an Aggregation association between the two classes.
5.) Click on the Aggregation and delete it.
6.) create a Composition association between the two classes.
7.) save the UML file
8.) check the saved file and there are two <UML:Assocation> elements below <XMI.content> and not one. (There is no way to decide which of the two is the current one.
This bug is really bad, for people trying to generate source code from the XMI file :P
I will attach a sample XMI file to this bug, as soon as I see how to do that.
Created attachment 16796 [details]
this XMI file has two associations in the XMI.content section but only one in the UML diagram
the attachment demonstrates the bug
Same problem with UML:Generalization and UML:Abstraction. When I remove a generalization or an abstraction in the diagram, it's still in the XMI file (in the UML:Model tree).
I've looked for a way to remove the generalization/abstraction/association in the model using the GUI but I can't find any.
For me, it's a GUI issue. It's correct to keep things in the model when we remove them in the diagram. But there should be a way to edit the model. Two possible solutions :
- add associations, generalizations and associations in the "logical view" part of the left tree (so it would be possible to delete them)
- in the diagram editor, add a shorcut that means "remove in the diagrame AND in the model"
In Rational Rose, the model components like associations appear in a "model tree", and so it is possible to remove them. And in the diagram editor there are two ways to remove something :
- the "delete" key means "remove in the diagram"
- the Control-d shortcut means "remove both in the diagram AND in the model"
This is a big issue for me cause I've written a kind code generator that reads the XMI file. So right now I've got to clean up the XMI by hand.
Thank you for your work, umbrello is great !
umbrello version : 1.5.2
distro version : kubuntu 6.0.6
I'll try to look into this as soon as the 3.5 branch is back to stable
I followed the steps you gave but I can't recreate the problem
using branches/KDE/3.5/umbrello of today.
Could you try again - if possible with the current 3.5 branch version?
I simple follow the steps mentioned by Benjamin Heitmann and can produce the same behavior.
there are two <UML:Assocation> elements (aggregation="aggregate" _and_ aggregation="composite") below <XMI.content> and not only the composite aggregation. so, the xmi is broken.
in the <XMI.extensions> part, there is only the Composition association, which is then correctly displayed in the gui.
> I simple follow the steps mentioned by Benjamin Heitmann and can produce
> the same behavior.
> umbrello: 3.5.2-1+b2
It's very possible there was a problem in 1.5.2.
I believe this has been fixed, at least I can't confirm using
1.5.4 and 1.5.5.
I've tested it just now with umbrello version 1.5.5 and the problem is not fixed. there is still the deleted aggregation association in the <XMI.content>.
Umbrello UML Modeller: 1.5.5
Finally I was able to reproduce the bug and it is fixed by commit 598502
> removeAllAssociations(): Do not increment the iterator when positioned on an
> association. Remove the association from m_List unconditionally.
this seems related (or even the same) as 100142
> this seems related (or even the same) as 100142
Are you saying that it's still happening for you on current branches/KDE/3.5/kdesdk? If so then feel free to reopen.
*** Bug 140612 has been marked as a duplicate of this bug. ***