Search in sources :

Example 1 with JFaceNodeAdapterFactoryForHTML

use of org.eclipse.wst.html.ui.internal.contentoutline.JFaceNodeAdapterFactoryForHTML in project webtools.sourceediting by eclipse.

the class AdapterFactoryProviderForHTML 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 JFaceNodeAdapterFactoryForHTML();
        factoryRegistry.addFactory(factory);
    }
}
Also used : JFaceNodeAdapterFactoryForHTML(org.eclipse.wst.html.ui.internal.contentoutline.JFaceNodeAdapterFactoryForHTML) 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)

Example 2 with JFaceNodeAdapterFactoryForHTML

use of org.eclipse.wst.html.ui.internal.contentoutline.JFaceNodeAdapterFactoryForHTML in project webtools.sourceediting by eclipse.

the class AdapterFactoryProviderForJSP 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 JFaceNodeAdapterFactoryForHTML(IJFaceNodeAdapter.class, true);
        factoryRegistry.addFactory(factory);
    }
    ModelHandlerForJSP.ensureTranslationAdapterFactory(structuredModel);
}
Also used : JFaceNodeAdapterFactoryForHTML(org.eclipse.wst.html.ui.internal.contentoutline.JFaceNodeAdapterFactoryForHTML) 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

JFaceNodeAdapterFactoryForHTML (org.eclipse.wst.html.ui.internal.contentoutline.JFaceNodeAdapterFactoryForHTML)2 FactoryRegistry (org.eclipse.wst.sse.core.internal.model.FactoryRegistry)2 INodeAdapterFactory (org.eclipse.wst.sse.core.internal.provisional.INodeAdapterFactory)2 IJFaceNodeAdapter (org.eclipse.wst.sse.ui.internal.contentoutline.IJFaceNodeAdapter)2