Change Request #2228
IElementCompositorService should be used to compose model elements that have been instantiated programmatically
- The current resolution of #2208 consists of triggering the construction of the annotations a newly constructed model element when it is hooked to the existing model. This is implemented in
HierarchicElementCompositorBase.compose()that must be called from all derived compositors.
- However, this approach can only work if compositors / the
IElementCompositorServiceare actually used. This currently is the case when models are created manually using the editor, but most model-transformations directly call
- The same problem also exists for hooking programmatically instantiated @Connector@s and @Connection@s to the model.
- This problem could be considered as an evidence that the
IElementCompositorService(along with its @Compositor@s) actually should be moved the model plugins since it imposes and constructively ensures) constraints on the structure of model instances.
- Ideally, the direct (low-level) access of the lists containing @IHierarchicElement@s' children, connectors and connections should be prevented
- Alternatively, the construction of annotations could be ensured in
HierarchicElementCompositorBase.compose(), but in the factory constructing the respective model elemnent (e.g., by changing the EMF code generator code template)
#5 Updated by Alexander Diewald about 5 years ago
- Status changed from New to Feedback
- % Done changed from 0 to 80
All Compositors have been moved to the model plugins. Hence, it is possible to use the ICompositionService for, e.g., M2M transformations as well.
Leaving this bug in Feedback state for now to capture the additional work needed to fix bugs introduced by this large modification.