How to move a class in a package

Hello,

I have a package in my diagram class, and I created a class outside this package.
I’d like now to inlucde in the package.

In the Model Explorer, the class is insode the right “folder”, but in the Diagram Navigator, it is outside.
And when I move the package in the diagram, the class doesn’t follow the package.

Hi user,

Thank you for your post. According to your description, the class in Model Explorer is now the master view of the class. Master view has the control over the parent of a model element. If you want to make the parent of class follow that presented in class diagram, you need to set the class shape in diagram to be the master. Here are the steps:

  1. Select Tools > Application Options from the main menu

  2. In the Application Options window, open General > Environment

  3. Check “Advanced UI mode”

  4. Restart

  5. Right click on the class shape and select “Selection > Set as Master View” from the popup menu

  6. Move the class into the package.

This should work. If not, please post your project file.

Best regards,
Jick Yeung