Update Metamodel to add references

Issue #456 new
Matthias Schoettle created an issue

The metamodel needs to be updated in CORE and RAM to reflect the new changes introduced in regards to references.

Following that, the code needs to be updated in order to create references whenever an element is selected which is located in another model. The best place to accomplish this is inside the controllers. Probably, a generic method could be implemented that takes care of this.

Comments (47)

  1. Matthias Schoettle reporter

    References #456: Fixes compile errors in controllers and tests.

    Also, refactors CORE controllers to make them independent of RAM. Renames InstantiationController to MappingsController.

    → <<cset d4743cf0fe41>>

  2. Jörg Kienzle

    I am working on the references, but unfortunately I think we need to do another meta model change, because it now is necessary to be able to map enumeration types :)

    For instance, it is possible in an aspect A that extends aspect B to define a class X with an attribute C that has as a type an enum Y defined in B... In this case the correct behaviour would be to create a "ghost" enum Y in A, and create a reference mapping for it.

  3. Matthias Schoettle reporter

    We also need to change the way message view references work. Currently, the MessageViewReference links to an external MessageView. Since we can't localize it, but have to localize the operation anyhow, it would be better to have an OperationReference or something (maybe EmptyMessageView, which can also be used for partial operations that require an affectedBy) instead.

    So to summarize we need:

    • mapping of enums
    • mapping of association ends (associations maybe too?)
    • different way of referencing external message views to advice them
  4. Matthias Schoettle reporter

    References #456: Improves reference handling in views.

    Views respond to reference notifications and don't store the reference property anymore.

    In order to support that, the RAMReferenceUtil executes a separate SetCommand to set the reference property of the corresponding mapping to trigger updates in the view. This is required, because the cloned/local element is added first, and after the mapping is added. Therefore, when the clone is added, it cannot be determined yet that the element is a reference.

    → <<cset 700ab70198b5>>

  5. Matthias Schoettle reporter

    References #456: Moves filtering of mapped elements to helper method.

    Small refactoring of filtering to make use of eAllContents, which includes nested children.

    → <<cset 9d5462fd23ee>>

  6. Matthias Schoettle reporter

    @djeminy Can you confirm that in mappings, when selecting as the "to element" an element from another extended model, that that element should be localized as well?

  7. Matthias Schoettle reporter

    References #456: Removes custom label providers.

    The custom label providers prefixed the label for elements from external models with the model name. Because referenced elements will now be localized, this is not required anymore.

    → <<cset bdfc30daa431>>

  8. Matthias Schoettle reporter

    References #456: Temporarily adds RAMReferenceUtilTest to controller project due to current test structure.

    Access required to utility classes and methods in test's controller.util package.

    → <<cset 5652e326d89c>>

  9. Matthias Schoettle reporter

    References #456: Refactors RAMReferenceUtil to be more generic.

    Distinguishes between containers (classes, enums) and elements of those containers right now due to the additional layout requirement for containers.

    → <<cset f2096fe2568e>>

  10. Matthias Schoettle reporter

    References #456: Ensures that the mapping.to is set using a command to force a notification for the derived property (COREModelElement.reference).

    Also ensures that containing references are never updated, as this would cause problems. The container is already localized at this point.

    → <<cset e27d8a24057d>>

  11. Matthias Schoettle reporter

    References #456: Removes type names to be shown visually different than they are.

    This is not necessary anymore since they will have to be localized and have the appropriate name.

    → <<cset f1ca3c21c6d1>>

  12. Matthias Schoettle reporter

    References #456: Fixes merging of compositions to merge duplicate extensions instead of reuses. Only extensions can be duplicated during weaving of the extension hierarchy.

    → <<cset 700d814dc9de>>

  13. Jörg Kienzle

    References #456

    COREModelReferenceUpdater now working. This means that the structural weaver does not need to use the RAMReferenceUpdater any more. Whether we still need it or not remains to be determined when we start working on updating the MessageViewWeaver.

    → <<cset 1fed8b4fc5eb>>

  14. Log in to comment