- marked as blocker
Improve ReferenceUpdater
The ReferenceUpdater
should be changed to use a switch and be called by using an iterator over all contents (visitor-based). I.e., EcoreUtil.getAllContents(...)
and RamSwitch
.
This way, no instanceof
checks and casts are necessary due to the polyphormism limitations of Java.
More specifically: The ReferenceUpdater
should contain a method updateReferences(EObject, WeavingInformation)
, which should use the iterator and for each object call doSwitch(...)
of the switch. All required updates are then performed in the corresponding caseXXX(XXX)
methods that can be overridden.
This way, any class of RAM can be updated using weaving information.
Comments (5)
-
reporter -
reporter References issue
#161: Moved WeavingInformation to util package as preparation.→ <<cset 0da8b39878ca>>
-
reporter - changed status to resolved
Resolved issue
#161: Improved the ReferenceUpdater as per instruction and moved it to the util package.→ <<cset 17097ab18a86>>
-
reporter References issue
#161: Small fix to ReferenceUpdater to update type of Reference in case it was woven.→ <<cset d5a758e8bd6a>>
-
reporter References
#161: Fixes an issue where updating the direct containment hierarchy of the object to be updated stops after the hierarchy level. Instead, update will recursively call itself to ensure that the complete hierarchy is updated.→ <<cset 8c0c489a9ba2>>
- Log in to comment
Issue
#160depends on this.