[Dev Tools NG] The context menu entry "generate body" for eOperations of interface EClasses doesn't generate the body delegate
Current Status
For eOperations that are defined in interface EClasses, the menu entry to generate the delegation code is shown but has no effect. The sf-dev-tools are preventing this by checking whether the eOperation in question belongs to an interface.
Dissection
This behaviour contradicts the EMF approach to model eOperations. In
general the eOperation bodys are programmed against interfacts, also for
simple getters/setters for attributes defined in interfaces. These are
related to variables by implementation classes.
Thus, defining eOperation bodys in interfaces is non-problematic in the
sense that no variables are directly accessed.
Moreover, EMF does not enforce defining the bodys in eOperations of
sub-classes, no matter if being abstract or not. Thus, the approach to
“enforce” the redefinition of interface eOperations in inheriting
classes is somewhat intransparent to users.
Essentially, this is due to the indirect support of Polymorphism/Mixin
concepts in EMF.
Defining eOperations in interfaces has been tested and found operational. As a test, an eClass deriving from two interfaces with body implementations defined in a different plugin has been created. The body delegates were correctly included in the just created class.
Proposed action
Allow the generation of delegate code in an interface’s eOperations.
(from redmine: issue id 3581, created on 2018-11-21, closed on 2019-05-03)