[umbrello-devel] [umbrello] [Bug 81364] Import Rose model files
Oliver Kellogg
okellogg at users.sourceforge.net
Tue Jun 24 05:35:22 UTC 2014
https://bugs.kde.org/show_bug.cgi?id=81364
--- Comment #22 from Oliver Kellogg <okellogg at users.sourceforge.net> ---
Git commit 8449eba58239caad9db2d603197a624905915db2 by Oliver Kellogg.
Committed on 24/06/2014 at 05:35.
Pushed by okellogg into branch 'master'.
(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.
M +7 -5 umbrello/import_rose.cpp
M +1 -1 umbrello/import_rose.h
M +73 -39 umbrello/petaltree2uml.cpp
M +1 -1 umbrello/petaltree2uml.h
M +11 -2 umbrello/umllistview.cpp
M +2 -1 umbrello/widgets/widget_factory.cpp
http://commits.kde.org/umbrello/8449eba58239caad9db2d603197a624905915db2
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the umbrello-devel
mailing list