Show TOC

 Moving Components to a SubclassLocate this document in the navigation structure

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
  1. Select the superclass.
  2. Make sure you are in Change mode.
  3. Choose Utilities → Refactoring → Refactoring Assistant.
  4. 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.

  5. Choose Save.
Result

The moved components are deleted in their original class and created in the subclass(es).

Caution

If you did not move the components from the superclass to all direct subclasses, these components are be deleted from all the subclasses that are not affected.