| Summary: | Provide a way to add dynamicFeatures to a static EClass | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Modeling] EMF | Reporter: | Mickael Istria <mistria> | ||||
| Component: | Core | Assignee: | Ed Merks <Ed.Merks> | ||||
| Status: | RESOLVED WONTFIX | QA Contact: | |||||
| Severity: | enhancement | ||||||
| Priority: | P3 | CC: | gdupe, marc.dutoo | ||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Mickael Istria
Here is the client code I use to add extension to the metamodel: JbiPackage.Literals.CONSUMES.eAddDynamicFeature(Cdk5Package.Literals.CDK5_CONSUMES__OPERATION); Sorry, but adding support in the core for modifying a generated model is just not something I'm going to consider. Any class down stream in the inheritance from a dynamically extended class will find that its getEAllStructuralFeatures list has changed and hence the indexes of all its local features have shifted such that they will not be properly switched in the generated reflective accessors. The whole notion of allowing an arbitrary number of downstream clients to modify a shared base model with their own contributions just sounds like a formula for chaos to me. How to do so such modifications to what's supposed to be a read-only model and do so in a thread-safe deterministic way. How to avoid and detect conflicts in the new features? How to ensure that serialized instances can be read when some of the contributions might be absent elsewhere or later? It's just a path to hell, no matter how good the intention. |