[Uml-devel] [Bug 291159] New: umbrello do not detect

Ralf Habacker ralf.habacker at freenet.de
Tue Jan 10 12:31:56 UTC 2012


https://bugs.kde.org/show_bug.cgi?id=291159

           Summary: umbrello do not detect
           Product: umbrello
           Version: unspecified
          Platform: Unlisted Binaries
        OS/Version: MS Windows
            Status: NEW
          Severity: normal
          Priority: NOR
         Component: general
        AssignedTo: umbrello-devel at kde.org
        ReportedBy: ralf.habacker at freenet.de


Version:           unspecified (using Devel) 
OS:                MS Windows

When opening the UML 1.4 spec from
http://www.omg.org/spec/UML/20010967/01-02-15.xml umbrello detects already
added package names and asks the user for a different package name. This
happens 59 times. 



Reproducible: Always

Steps to Reproduce:
Download the mentioned url and open in umbrello

Actual Results:  
59 packages with name new_package_xx 

Expected Results:  
the packages with the name new_package_xx should not appear

umbrello prints out the following message 

loadFromXMI(UMLRole): id a47 is already in use!!! Please fix your XMI file.

This message is printed in UMLObject::loadFromXMI() although the related file
do specify this id only once.

Further investigation let me assume, that umbrello "autocreates" the related
UMLObject on an hidden place and then is surprised that the related object
already exists 

The object are "official" added in bool UMLPackage::addObject(UMLObject
*pObject) where it first searches if an UMLObject instance with the related
package name is already present and if so ask the user for a new name. 

<excurse>
I doubt that this check is useful,because in a deep package hierachy there may
be packages with the same name. 

As workaround i tried to change the line 

      while ( findObject( name ) != NULL  ) {

into 

      while ( (obj = findObject( name )) != NULL  ) {
         if (obj->id() == pObject->id())
            return false;

which checks the uniq object id and skip adding if the object is already
present and the xmi file could be loaded without any problems. 

If the main issue of hidden "autocreating" of objects could not be solved, from
my current umbrello knowledge I would say that the search should use the object
id instead os using the name. 
</excurse>

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.




More information about the umbrello-devel mailing list