Bug 111470

Summary: Loading template element from xmi file fails
Product: [Applications] umbrello Reporter: Peter Soetens <peter.soetens>
Component: generalAssignee: Umbrello Development Group <umbrello-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: PATCH Corrected writing of template elements to xmi file

Description Peter Soetens 2005-08-25 11:37:14 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc 3.3 
OS:                Linux

Version :todays KDE 3.5 kdesdk trunk: rev 453115
The class modelled was Sequence<T> without any operations,attributes...
My xmi file contains this piece of code, generated with Umbrello :

    <UML:ModelElement.templateParameter>
     <UML:TemplateParameter isSpecification="false" isLeaf="false" visibility="public" xmi.id="8162" isRoot="false" isAbstract="false" name="T" \
/>
    </UML:ModelElement.templateParameter>
    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="8127" isRoot="false" isAbstract="false" name="Sequence" />

When loading this file, i get a bunch of parse errors:
umbrello: ERROR: Cannot load UML:ModelElement.templateParameter because xmi.id is missing
....
umbrello: UMLListView::loadChildrenFromXMI: item 8162 (of type 816) does not yet exist...
umbrello: UMLListView::loadChildrenFromXMI:  lvtype 816 child object 8162 not found
umbrello: WARNING: unused list view item 8162 of lvtype 816
...
mbrello: ERROR:  LoadFromXMI: can't load classfield parent_id:1981 do you have a corrupt savefile?
umbrello: ERROR: Failed to find codeclassfield for parent uml id:3150 (role id:0) Do you have a corrupt classifier code document?
umbrello: ERROR:  LoadFromXMI: can't load classfield parent_id:3150 do you have a corrupt savefile?
umbrello: ERROR: Failed to find codeclassfield for parent uml id:1950 (role id:0) Do you have a corrupt classifier code document?
umbrello: ERROR:  LoadFromXMI: can't load classfield parent_id:1950 do you have a corrupt savefile?
umbrello: ERROR: Failed to find codeclassfield for parent uml id:2012 (role id:1) Do you have a corrupt classifier code document?
umbrello: ERROR:  LoadFromXMI: can't load classfield parent_id:2012 do you have a corrupt savefile?
umbrello: ERROR: Failed to find codeclassfield for parent uml id:2100 (role id:1) Do you have a corrupt classifier code document?
(lots of times)

The result in the class diagram view is that all template parameters are gone.

I also have a DataType with name="T" if that matters.
Comment 1 Peter Soetens 2005-08-25 14:03:29 UTC
Created attachment 12369 [details]
PATCH Corrected writing of template elements to xmi file

Fixes this bug report.
Comment 2 Oliver Kellogg 2005-08-27 21:47:42 UTC
Ouch! I made a typo in the bug number, see
http://bugs.kde.org/show_bug.cgi?id=111407#c5

Many thanks Peter for your patches!