Umbrello does not generating code if a class or namespace contains a typedef. Reproducible: Always Steps to Reproduce: 1. start umbrello 2. import the appended test case 3. generate code for all classes Actual Results: The datatypes created in the namespace or class are not generated Expected Results: The datatypes should be created
Created attachment 101656 [details] typedef-import.h (import testcase)
Git commit 828f7dac7316cf8b0b13e290b51fcd114b3e06d1 by Ralf Habacker. Committed on 21/10/2016 at 07:57. Pushed by habacker into branch 'master'. Introduce class UMLDatatype. M +1 -0 umbrello/CMakeLists.txt M +2 -2 umbrello/codegenerators/ada/adawriter.cpp M +4 -4 umbrello/codegenerators/codegenerator.cpp M +1 -1 umbrello/codegenerators/cpp/cppheadercodedocument.cpp M +1 -1 umbrello/codegenerators/d/dclassifiercodedocument.cpp M +1 -1 umbrello/codegenerators/d/dwriter.cpp M +1 -1 umbrello/codegenerators/idl/idlwriter.cpp M +1 -1 umbrello/codegenerators/java/javaclassifiercodedocument.cpp M +1 -1 umbrello/codegenerators/java/javawriter.cpp M +1 -1 umbrello/codegenerators/pascal/pascalwriter.cpp M +1 -1 umbrello/codegenerators/perl/perlwriter.cpp M +4 -3 umbrello/codeimport/import_utils.cpp M +2 -1 umbrello/codeimport/kdevcppparser/cpptree2uml.cpp M +10 -7 umbrello/dialogs/pages/classgeneralpage.cpp M +3 -4 umbrello/object_factory.cpp M +1 -1 umbrello/umldoc.cpp M +2 -58 umbrello/umlmodel/classifier.cpp M +0 -10 umbrello/umlmodel/classifier.h A +101 -0 umbrello/umlmodel/datatype.cpp [License: GPL (v2+)] A +45 -0 umbrello/umlmodel/datatype.h [License: GPL (v2+)] M +2 -0 umbrello/umlmodel/umlobject.cpp M +3 -0 umbrello/umlmodel/umlobject.h M +7 -6 umbrello/umlscene.cpp http://commits.kde.org/umbrello/828f7dac7316cf8b0b13e290b51fcd114b3e06d1
Git commit d4f45447822d251e6ff780da47f158c05e74474a by Ralf Habacker. Committed on 21/10/2016 at 07:59. Pushed by habacker into branch 'master'. Write out typedefs located in classes for default code generator. M +24 -0 umbrello/codegenerators/cpp/cppwriter.cpp M +1 -0 umbrello/codegenerators/cpp/cppwriter.h http://commits.kde.org/umbrello/d4f45447822d251e6ff780da47f158c05e74474a
With the last commits writing out typedefs located in classes are implemented. Writing out data types defined in a namespace needs a little more work. Umbrello writes out classes into files named according to the exported class. As typedefs in namespaces may be used in more than one class from the related namespace or from classes outside the namespace umbrello requires some hints where to place those typedefs. There are a few variants possible: 1. Generate an extra header file in the namespace containing all related typedefs and include it in all header files generated for this namespace. 2. Extend umbrello to be able to assign UML objects to filenames which is then used by the code generator to place the typedefs in the related header. Code import can also use this feature to generate UML object to filename tracking which is required for round trip engineering.