final ODOMElement contextRootElement = context.getRootElement();
if (rootElement == null && contextRootElement != null ||
rootElement != null && !rootElement.equals(contextRootElement)) {
updateRootElement();
} else if (event.getChangeQualifier() == ChangeQualifier.HIERARCHY) {
treeViewer.refresh();
} else {
// If the source is an attribute then it is the parent
// element that we want to update. Otherwise just
// use the source as the element to update.
Object source = event.getSource();