Inherit members from classes/interfaces.

When deriving from an interface or a class, we could automatically implement the members in the derived class. There would be some things to check, e.g.

  • Should this be activated per class individually?

  • What to do if a derived member gets edited? A simple solution: When the base is changed, all parents with the same member get automatically be adjusted. As soon as it it changed manually, the member is not connected anymore.

Some ideas:

  • There is a setting to activate the feature, by default, it is active.

  • All members of a class will be inherited, unless they are explicitly declared as private.

  • Inherited members are drawn in gray. When the user edits them, they stop becoming inherited.

  • Changing the base class will update all inherited members.

  • There should be a menu option with a link icon. The element should only be visible for inherited members. If link is removed, changes are not propagated anymore.

  • Maybe we could even add a menu action to show/hide inherited members of the class?

Implementation details:

  • Add a flag inherited to members. Maybe we should even store the id of the base member, as otherwise finding by name would be difficult.

  • When changing members, also check inherited members (maybe we need a new service for that?) by finding all inherited classes.

  • Ensure that undo/redo etc. still works as expected. Undoing a delete should also restore all inherited members.

Please authenticate to join the conversation.

Upvoters
Status

In Review

Board
πŸ’‘

Feature Request

Date

About 1 year ago

Author

UMLBoard

Subscribe to post

Get notified by email when there are changes.