I am comparing two objects that have nested collections inside of them. The resulting diff has everything I would expect, except for how to reconstruct the hierarchy.
As an illustrative example:
I create a new garage, g1, with two cars, c1 and c2. c1 has 2 seats c1s1, c1s2. c2 has 1 seat, c2s1. My SimpleTextChangeLog looks something like this:
new object: ...Garage/g1
new object: ...Seat/c2s1
new object: ...Car/c2
new object: ...Car/c1
new object: ...Seat/c1s1
new object: ...Seat/c1s2
I would like my implementation of ChangeProcessor to print the change in a hierarchical form:
new object: ...Garage/g1
new object: ...Car/c1
new object: ...Seat/c1s1
new object: ...Seat/c1s2
new object: ...Car/c2
new object: ...Seat/c2s1
Class hierarchy:
@entity
class Garage {
Set<Car> cars;
...
}
@entity
class Car {
Set<Seat> seats;
...
}
@entity
class Seat {
...
}
Is there a way to do this?
Change list is a flat, unsorted list, so you can't reproduce hierarchy form changes.
Why not use Shadows?
output: