use of org.eclipse.wst.jsdt.web.ui.views.contentoutline.JFaceNodeAdapterFactoryForJSDT in project webtools.sourceediting by eclipse.
the class AdapterFactoryProviderForJSDT method addContentBasedFactories.
protected void addContentBasedFactories(IStructuredModel structuredModel) {
FactoryRegistry factoryRegistry = structuredModel.getFactoryRegistry();
// $NON-NLS-1$
Assert.isNotNull(factoryRegistry, "Program Error: client caller must ensure model has factory registry");
INodeAdapterFactory factory = null;
factory = factoryRegistry.getFactoryFor(IJFaceNodeAdapter.class);
if (!(factory instanceof JFaceNodeAdapterFactoryForJSDT)) {
factoryRegistry.removeFactoriesFor(IJFaceNodeAdapter.class);
factory = new JFaceNodeAdapterFactoryForJSDT(IJFaceNodeAdapter.class, true);
factoryRegistry.addFactory(factory);
}
JsTranslationAdapterFactory.setupAdapterFactory(structuredModel);
}
Aggregations