Book a Demo
Prev Next

Override Parent Operations

You can automatically override operations from parent Classes and from realized Interfaces, using the 'Overrides & Implementations' dialog.  You can configure the system to display this dialog each time you add a Generalization or Realization connector between Classes and Interfaces, and review their possible operations in classes and interfaces to override or implement.

Access

To display the dialog automatically, from the Start ribbon, select 'Appearance > Preferences > Preferences : Links' and select the 'Show Override Operation dialog on new connector' checkbox.

Ribbon

Design > Element > Manage > Overrides and Implementations

Keyboard Shortcuts

Ctrl+Shift+O

Using the dialog

Note: The information presented here applies equally to both base classes and interfaces, from which derived classes or realized interfaces are derived. To improve readability, we will refer only to classes.

Select the checkbox against each operation in the base class that you wish to automatically override (or click on the Select All button);

If the selected operation has already been overridden by an operation in a derived class or realized interface through the use of the 'Enforce Synchronization' option, then the column 'Enforce Synchronization' will display the value 'True'.  In this case, the checkbox 'Enforce Synchronization' will be selected and will also be disabled (the option cannot be changed).  Otherwise, you can select the option 'Enforce Synchronization' to force synchronization of the operation signature to the overridden operation; 

When you click on the OK button, Enterprise Architect generates the equivalent operation definitions in the derived class.

Notes

  • If you select 'Enforce Synchronization' when adding an overriding operation, then if the signature of the operation in the base class is subsequently modified, the corresponding operations in the derived class will also be modified, such that the operation signatures are 'synchronized'.
  • The signature of the operation in the derived class cannot be changed, but it can be deleted.
  • If the operation in the base class is deleted, EA will prompt the user, asking whether to delete the corresponding operation in the derived class, or to delete the operation in the base class only.