Search in sources :

Example 1 with JFaceNodeAdapterFactoryCSS

use of org.eclipse.wst.css.ui.internal.contentoutline.JFaceNodeAdapterFactoryCSS in project webtools.sourceediting by eclipse.

the class AdapterFactoryProviderCSS 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 == null) {
        factory = new JFaceNodeAdapterFactoryCSS(IJFaceNodeAdapter.class, true);
        factoryRegistry.addFactory(factory);
    }
}
Also used : JFaceNodeAdapterFactoryCSS(org.eclipse.wst.css.ui.internal.contentoutline.JFaceNodeAdapterFactoryCSS) FactoryRegistry(org.eclipse.wst.sse.core.internal.model.FactoryRegistry) IJFaceNodeAdapter(org.eclipse.wst.sse.ui.internal.contentoutline.IJFaceNodeAdapter) INodeAdapterFactory(org.eclipse.wst.sse.core.internal.provisional.INodeAdapterFactory)

Aggregations

JFaceNodeAdapterFactoryCSS (org.eclipse.wst.css.ui.internal.contentoutline.JFaceNodeAdapterFactoryCSS)1 FactoryRegistry (org.eclipse.wst.sse.core.internal.model.FactoryRegistry)1 INodeAdapterFactory (org.eclipse.wst.sse.core.internal.provisional.INodeAdapterFactory)1 IJFaceNodeAdapter (org.eclipse.wst.sse.ui.internal.contentoutline.IJFaceNodeAdapter)1