Moving Components to a Subclass
Use
You can move attributes, methods and results of a class to one or more direct subclasses.
Prerequisites
The (private) components to be moved do not yet exist in the subclass.
Procedure
- Select the superclass.
- Make sure you are in Change mode.
- Choose Utilities → Refactoring → Refactoring Assistant.
- Select the component(s) to be moved and move them to the name of a subclass using Drag & Drop.
If there is more than one subclass, you can move the selected components to all the subclasses at one go by dragging the components to Subclasses.
- Choose Save.
Result
The moved components are deleted in their original class and created in the subclass(es).