updateActionsWhenModelChange();
}
}
if (model instanceof IDOMModel) {
IDOMDocument doc = ((IDOMModel) model).getDocument();
PropagatingAdapter adapter = (PropagatingAdapter) doc
.getAdapterFor(PropagatingAdapter.class);
if (adapter != null) {
INodeAdapterFactory factory = RefresherFactory.getInstance();
adapter.addAdaptOnCreateFactory(factory);
adapter.initializeForFactory(factory, doc);
// CSSStyleAdapterFactory fac2 =
// CSSStyleAdapterFactory.getInstance();
// adapter.addAdaptOnCreateFactory(fac2);
// adapter.initializeForFactory(fac2, doc);
}
((IDOMModel) model).getFactoryRegistry().addFactory(
CSSStyleAdapterFactory.getInstance());
// _viewer.getDestDocumentForDesign().getModel().getFactoryRegistry().addFactory(CSSStyleAdapterFactory.getInstance());
((IDOMModel) model).getFactoryRegistry().addFactory(
new PageVariableAdapterFactory());
doc.addAdapter(new DocumentPageVariableAdapter(doc));
_viewer.setContents(((IDOMModel) model).getDocument());
} else {
_viewer.setContents((EditPart) null);
}
}