Using Umbrello version 2.18.3 on Ubuntu 16.04.x LTS. After adding a package in a C++ class diagram (with or without a stereotype <<namespace>>), I cannot populate its "Contents" with classes or other types (datatypes, interfaces, etc.) There is no button "Add...", and right-clicking in the empty "Contents" box gives me no such option. It remains empty. The documentation offers no help whatsoever here. What good is a namespace if it has no classes?
In the meanwhile, I discovered that I can add classes to a package (AKA namespace), but I cannot add an ordinary datatype to a package. What I would like to do is to build a package for the STL types I am using ... there anren't very many of those, so I wouldn't have to have the entire STL imported into my project. But it would be useful for types such as std::vector, std::string, std::map, and perhaps a few more. Or is there a better way to do this?
(In reply to Robert Hairgrove from comment #1) > In the meanwhile, I discovered that I can add classes to a package (AKA > namespace), but I cannot add an ordinary datatype to a package. Forgot to mention that I did this by dragging the class in the Tree View to the package. Doesn't seem to work that way in the class diagram itself.
(In reply to Robert Hairgrove from comment #1) > Or is there a better way to do this? In the tree view you can add objects through the context menu right clicking on the related package.
(In reply to Robert Hairgrove from comment #2) > Forgot to mention that I did this by dragging the class in the Tree View to > the package. Doesn't seem to work that way in the class diagram itself. I can confirm this behavior. Please file an additional bug for this if you want.
(In reply to Robert Hairgrove from comment #1) > In the meanwhile, I discovered that I can add classes to a package (AKA > namespace), but I cannot add an ordinary datatype to a package. If you refering to adding a datatype through the tree view by right clicking on the package and selecting 'new datatype': The created datatype is created in the datatypes folder and not in the package, which looks like a missing feature. Please file an additional bug for this and add those bug number in the 'depends on' field of this bug. A workaround for this issue is to move the created datatype into the package through the tree view.
Thank you, Ralf, for responding so quickly! Another thing: once I have a package, I can add a new class to it by setting the "Package path" property in the properties dialog of the new class. So ... it's not so difficult after all. :) However, it would be more intuitive if i could add existing classes to a package in the properties dialog of the package (at least to me).