Project

General

Profile

Change Request #2228

IElementCompositorService should be used to compose model elements that have been instantiated programmatically

Added by Simon Barner almost 6 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Start date:
01/23/2015
Due date:
% Done:

100%

Estimated time:

Description

Rationale
  • 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 IElementCompositorService are actually used. This currently is the case when models are created manually using the editor, but most model-transformations directly call container.getContainedElements().add(newChild)
  • The same problem also exists for hooking programmatically instantiated @Connector@s and @Connection@s to the model.
Further analysis
  • 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)

History

#1 Updated by Anonymous over 5 years ago

  • Assignee set to Anonymous
  • Target version changed from AF3 2.8 RC1 (Feature Freeze) to AF3 2.8 RC2 (Tested & Bugfixed)

#2 Updated by Anonymous over 5 years ago

  • Assignee changed from Anonymous to Alexander Diewald

#3 Updated by Alexander Diewald about 5 years ago

  • Target version changed from AF3 2.8 RC2 (Tested & Bugfixed) to AF3 2.8 Post-release

Moved to the AF3 post-release milestone, since the changes introduced by this request are intrusive and may have a large impact on the overall AF3 project.

#4 Updated by Anonymous about 5 years ago

  • Priority changed from Normal to High

#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.

#6 Updated by Anonymous about 5 years ago

  • Priority changed from High to Normal

#7 Updated by Anonymous about 5 years ago

  • Target version changed from AF3 2.8 Post-release to AF3 2.9 RC1 (Features frozen)

#8 Updated by Alexander Diewald almost 5 years ago

  • Status changed from Feedback to Closed
  • % Done changed from 80 to 100

No issues were reported during the last 2-3 months, so closing.

Also available in: Atom PDF