Aleksandar,
You need to look the "old" value up yourself. Note that the following is only true for differences of type "CHANGE" (single-valued attribute). For diffs of type "ADD" or "DELETE" (multi-valued attribute), there is no old value.
In two-way :
Object oldAttributeValue = null;
Match match = diff.getMatch();
if (match.getRight() != null) {
value = match.getRight().eGet(diff.getAttribute());
} else {
// this item didn't exist previously
}
In three-way:
Match match = diff.getMatch();
if (match.getOrigin() != null) {
value = match.getOrigin().eGet(diff.getAttribute());
} else {
// this item didn't exist previously
}
as you can see, there is no real sense to "old" value : it could have been null, or the object where we detected a change didn't previously exist.
Laurent Goubet
Obeo