Add creation of model reuse

Issue #275 resolved
Matthias Schoettle created an issue

Currently, COREModelReuses are never created when reusing a concern.

As discussed in the meeting on 05.03.2015, the following needs to be done:

  • This requires a small metamodel change in CORE to begin with: The reference from COREModelReuse to COREReuse needs to be of multiplicity 1 and named reuse
  • Create a COREModelReuse (with the link to the COREReuse) in addition to an instantiation
  • When removing an instantiation, the COREModelReuse needs to be removed
  • The COREReuse is not deleted automatically (this is covered by #216)

Comments (6)

  1. Matthias Schoettle reporter

    A problem can occur if an aspect reuses a concern (which modifies the feature model), but the aspect is never saved. This does not revert the changes made in the concern. Perhaps, when deciding not to save any changes, all changes to the aspect (or any COREModel) should be rolled back to the previous saved state. This would ensure that the modifications to the concern are undone.

  2. Matthias Schoettle reporter
    • changed status to open

    When removing an instantiation that belongs to a reuse, it is not removed. This is because the model reuses are searched for in the reused model instead of the current model (aspect).

    Aspect owner = (Aspect) instantiation.getSource();

    Since the metamodel changed, the creation and handling of model reuses needs to be updated anyway.

  3. Log in to comment