use of org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery in project webtools.sourceediting by eclipse.
the class JFaceNodeAdapterFactory method initAdapter.
protected synchronized void initAdapter(INodeAdapter adapter, INodeNotifier node) {
Assert.isTrue(cmDocumentManager == null);
Assert.isTrue(fCMDocumentManagerListener == null);
// register for CMDocumentManager events
ModelQueryAdapter mqadapter = (ModelQueryAdapter) node.getAdapterFor(ModelQueryAdapter.class);
if (mqadapter != null) {
ModelQuery mquery = mqadapter.getModelQuery();
if ((mquery != null) && (mquery.getCMDocumentManager() != null)) {
cmDocumentManager = mquery.getCMDocumentManager();
fCMDocumentManagerListener = new CMDocumentManagerListenerImpl();
cmDocumentManager.addListener(fCMDocumentManagerListener);
}
}
}
Aggregations