Skip to content
Commit 8449eba5 authored by Oliver Kellogg's avatar Oliver Kellogg
Browse files

(In reply to comment #21)

> [...]
> This test case contains multiple class diagrams and exposes a bug in the
> current import code:
> Only the last of the class diagrams actually show up.

Here is the fix:

umbrello/umllistview.cpp
- In function slotDiagramCreated(), use return value from
  findUMLObject(scene->folder()) as the `parent' argument in call to
  UMLListViewItem constructor.
- In function slotObjectCreated(), use return value from
  findUMLObject(object->umlPackage()) for `parentItem' instead of using
  determineParentItem(object).

umbrello/widgets/widget_factory.cpp
- In function createWidget() handle type UMLObject::ot_Folder alongside
  ot_Package.

umbrello/import_rose.{h,cpp}
- At function loadFromMDL() change return type to pointer-to-UMLPackage.
  On non NULL parentPkg return result from handleControlledUnit();
  on NULL parentPkg return UMLDoc::m_root[Uml::ModelType::Logical].

umbrello/petaltree2uml.h
- At function petalTree2Uml() change return type to pointer-to-UMLPackage.

umbrello/petaltree2uml.{h,cpp}
- At function handleControlledUnit() change return type to ptr-to-UMLPackage.
  Return object created for controlled unit.
- New function diagramType() maps Rose diagram keyword to corresponding
  Uml::DiagramType::Enum.
- In function umbrellify(),
  - At handling of Class_Category attribute logical_models and SubSystem
    attribute physical_models, for the non controlled-unit case add handling
    of attributes logical_presentations and physical_presentations.
    If unit_reference_list is non empty then create a UML object of type
    ot_Folder instead of ot_Package.
  - At handling of {Class,UseCase,Module_,Process_}Diagram employ function
    diagramType(). Use `parentPkg' cast to UMLFolder* as the rootFolder in
    call to umlDoc->createDiagram().
- At function petalTree2Uml(),
  - Choose attribute to find based on
    umlDoc->rootFolderType(Model_Utils::rootPackage(parentPkg)) :
    - For Uml::ModelType::Logical seek logical_models;
    - For Uml::ModelType::Component seek physical_models.
  - At definition of `atts' use the PetalNode::attributes() of the `models'
    found.
  - Return pointer to the UMLFolder which is created for the controlled unit.

CCBUG:81364
parent 264265da
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment