Eclipse >> Data binding >> IObservableSet
//Obtain an IObservableSet
IObservableSet set = ViatraObservables
.observeMatchesAsSet(matcher);
//Add change listener to the IObservableSet
set.addSetChangeListener(new ISetChangeListener() {
@Override
public void handleSetChange(SetChangeEvent event) {
for (Object addition : event.diff.getAdditions()) {
//Processing of addition
}
for (Object removal : event.diff.getRemovals()) {
//Processing of removal
}
}
})