Bug 136848 - program design: UMLAssociation handling
Summary: program design: UMLAssociation handling
Status: CONFIRMED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-04 21:56 UTC by Oliver Kellogg
Modified: 2006-11-05 15:26 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Kellogg 2006-11-04 21:56:13 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources

Currently, there is no owner of UMLAssociation.
Proposed change:
* Add new method UMLPackage::addAssociation(). Here the
  UMLAssociation is added to the m_objects of the owning
  UMLPackage.
* Rename UMLCanvasObject::addAssociation() to addAssociationEnd().
  Do not add the UMLAssociation there but only the proper UMLRole
  object. Navigation to the UMLAssociation is always possible
  using UMLRole::getParentAssociation().
Comment 1 Oliver Kellogg 2006-11-05 15:26:56 UTC
SVN commit 602228 by okellogg:

CCBUG:136848 - The chosen resolution is slightly different than proposed in that
 UMLPackage::addObject() is used for all object types including associations.

Detailed list of changes:
UMLCanvasObject::{add,remove}Association: Rename to {add,remove}AssociationEnd.
 Still TODO: Change argument to UMLRole*.
UMLCanvasObject::sigAssociation{Added,Removed}: Rename to
 sigAssociationEnd{Added,Removed}.
 Still TODO: Change argument to UMLRole*.
UMLCanvasObject::removeAllAssociations(): Rename to removeAllAssociationEnds.
UMLDoc::{addAssocTo,removeAssocFrom}Concepts(): move to UMLPackage.
UMLDoc::removeAssociation(): Add an optional arg, doSetModified.
UMLDoc::removeUMLObject(): Call removeAssociation() in the ot_Association case.
UMLDoc::addAssociation(): Call UMLPackage::addObject() for the association.
UMLListView::deleteItem(): Call UMLCanvasObject::removeAllChildObjects().


 M  +1 -2      association.cpp  
 M  +3 -1      classifier.cpp  
 M  +2 -2      classifiercodedocument.cpp  
 M  +59 -12    package.cpp  
 M  +22 -2     package.h  
 M  +8 -9      umlcanvasobject.cpp  
 M  +15 -9     umlcanvasobject.h  
 M  +15 -75    umldoc.cpp  
 M  +2 -17     umldoc.h  
 M  +1 -1      umllistview.cpp