- edited description
From element in mapping should include extended model elements
When selecting the from element in a classifier mapping, only the classes from the instantiated aspect are shown.
Steps to reproduce:
- Open the Association concern
- Make sure that the Association aspect has a reference to Collection (empty class)
- Open the ArrayList aspect and in the instantiation for Ordered, create a ClassifierMapping and attempt to select the from element
The selector will only show |Data, but should also show classes from extended aspects higher up the hierarchy. This only applies to instantiations that are of type Extends.
Comments (15)
-
reporter -
reporter - changed status to resolved
Resolves
#309: Adds classes from extended aspects to the from choice of values for ClassifierMappings.→ <<cset b798bb44d4c4>>
-
reporter This leads to the following problem:
Consider the Association concern and the following facts: There is a class Collection in Association and ArrayList (extends Ordered, which extends Association) maps Collection to ArrayList<...>.
If woven, the result will contain both Collection and ArrayList<...>, because after weaving ArrayList into Ordered, the mapping is lost.
I see two posibilities:
- we don't allow to select elements from other extended aspects. Instead, the extended aspect must propagate/delegate the fact that a concrete class needs to be provided for Collection (in line with the concern partiality)
- the weaver detects that an element from another aspect is mapped and adds that mapping to the extension of the aspect
@djeminy: What do you think?
-
Unfortunately I think we have to go with option 2. Otherwise, the designer of the "middle" feature, in our example "Ordered", would have to guess which classes could possibly be mapped in child features. In general I think this is not possible.
-
reporter Hm, I thought it would be the same person, because it is within a concern (i.e., the concern designer).
-
reporter References
#309: Reverts commit b798bb44d4c43bbd6aa17f92a3dedf17a872a5b2.Instead of showing elements from grandparents, the extended aspect needs to propagate the decision down to child features. This is ok, because it happens within a concern (i.e., the concern designer is responsible).
→ <<cset df65b7e4db0d>>
-
reporter - changed status to open
Unmapped operations (that are concern partial) from extended aspects should, however, be shown.
E.g., in Association the operations of Data are incrementally added throughout the hierarchy, and, in the leaf features, all operations are mapped to the actual operations.
-
reporter - changed status to resolved
Resolves
#309: Adds all concern partial operations from extended aspects that are higher up in the hierarchy to be able to map them.→ <<cset 5b0b87d5dfe3>>
-
reporter - changed status to open
As discussed in our meeting today, it should be possible to map elements within the extends hierarchy (within a concern). And the weaver needs to handle it accordingly. See #435 for more information.
-
reporter I think it makes most sense to incorporate this into
COREMappingItemProvider
and make use of theModelExtensions
, so it requires the metamodel to be updated first. -
reporter - changed title to From element in mapping should include extended model elements
-
assigned issue to
-
reporter See
COREMappingItemProvider
andCOREModelUtil.collectExtendedModels(COREModel)
orCOREModelUtil.collectModelExtensions(COREModel)
. -
reporter -
assigned issue to
- marked as major
-
assigned issue to
-
reporter References
#309: Removes custom filtering as it is now done by COREMappingItemProvider in a generic way.→ <<cset e31a2a3fe1a9>>
-
reporter - changed status to resolved
Resolved with above commit and core/3c9a105.
- Log in to comment