Object[] toAdd = added.toArray();
if (viewer instanceof TableViewer) {
TableViewer tv = (TableViewer) viewer;
tv.add(toAdd);
} else if (viewer instanceof AbstractListViewer) {
AbstractListViewer lv = (AbstractListViewer) viewer;
lv.add(toAdd);
}
Object[] toRemove = removed.toArray();
if (viewer instanceof TableViewer) {
TableViewer tv = (TableViewer) viewer;
tv.remove(toRemove);
} else if (viewer instanceof AbstractListViewer) {
AbstractListViewer lv = (AbstractListViewer) viewer;
lv.remove(toRemove);
}
}
knownElements.doFireDiff(Collections.EMPTY_SET, removed);
}