Problem when weaving after opening then closing a woven aspect

Issue #389 resolved
Romain Alexandre created an issue

In the Bank example, if you open the Transfer Aspect and then open and close an extended aspect or woven aspect, you will not be able to weave all the Transfer Aspect. You will get the exception : No GL in the current Thread The problem comes from the unloading of an aspect. When we close the opened woven aspect, it will unload it. And when we try to weave all, a Resolve notification will be sent to the TextView of the mappings of this Instantiation.

A solution is to not unload extended aspects and woven aspect.

Comments (3)

  1. Matthias Schoettle

    See also https://bitbucket.org/mcgillram/touchram/issues/198/unexpected-caching#comment-19964673.

    Concern models should not be unloaded, unless the concern is closed. Woven aspects from reused concerns should only unloaded when the reusing aspect is closed.

    In addition, a problem exists once unloading is not done:

    Opening an extended aspect from the extending aspect a second time will not propagate notifications to the extending aspect, because a different adapter factory is created for the extended aspect. This is because whenever an aspect scene is destroyed, the corresponding adapter factory is disposed (AdapterFactoryRegistry.disposeAdapterFactoryFor(...)). Instead of doing that on scene destruction, it should be done at the same time when the corresponding model is unloaded.

  2. Romain Alexandre reporter

    References #389: Correct the bugs listed in the issue

    • Only unload a Concern models with all aspects when closing the concern (go back home or reusing)
    • Only unload Woven Aspect when reusing aspect is closed.
    • Move AdapterFeactorRegistry.disposeAdapterFactoryFor(...) in COREModelUtil.unloadEObject(EObject)
    • Update the TextView only if the text has changed.

    → <<cset f1919864b50d>>

  3. Log in to comment