![]() ![]() But if you move the package the class stays where it is, and in the model explorer, you'll see the class at the same level as the package. Visually, the class seems to be in the package. You may create a package and resiez it, and then add classes clicking into the package. Note that this discrepancy between visualisation and modeling semantic can also happen in the other direction. If you move the package, all the previously selected classes move with the package, but the newly created one stays where it is. Now if you add a new class outside the package, you'll see that by default the numbering restarts at 1 as there are no other classes left at this level. You'll then have the package indicated clearly in plaintext in the diagram: ![]() If you're still not convinced, you may also rightclick on one of those classes, and choose in the menu Format > Show namespace: The only thing you need to do is to resize the package symbol to enclose all the classes that you've dropped into it.ītw, there must be some kind of bug, because if you change the format of the package to Auto Resize, it becomes very tiny again, ignoring the included elements in the size determination. In fact they are positioned relatively to the package symbol. And if you move the package symbol, the classes will follow the movement. ![]() This means that StarUML now considers the classes to be part of the package. But don't be disappointed look at the model explorer and you'll see that the classes now are under the package: When you release the mouse for the drop, the classes will move by translation, but the package symbol remains unchanged, giving the impression of a failed operation. Programmers translate the underlining to the static keyword when they translate the UML class diagram to C++. Alternatively, the UML denotes static features with class ownership by underlining the feature in the class diagram. But caution: it is not sufficient to move the classes around until some overlap the package: you really have to drag the mouse into the package, so that StarUML gives you a visual feedback with the package element surrounded by a highlighting frame (in blue in my screenshot): Unless otherwise specified, features in a UML class diagram are non-static and have instance (i.e., object) ownership. Now I can select the 3 classes and drag and drop them into the package. Here the result look especially at the model explorer that shows the classes and the package at the same level: I have created 3 classes (note the automatic names Class 1, Class 2, Class 3, the next would be Class 4) and then a package. The answer is that moving several classes to a package probably already assigned the classes to the package, but that visually, the package symbol is just no enclosing them. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |