1 package org.hibernate.eclipse.mapper.registry; 2 3 import org.eclipse.wst.sse.core.internal.model.FactoryRegistry; 4 import org.eclipse.wst.sse.core.internal.provisional.INodeAdapterFactory; 5 import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel; 6 import org.eclipse.wst.sse.ui.internal.contentoutline.IJFaceNodeAdapter; 7 import org.hibernate.eclipse.mapper.views.contentoutline.JFaceNodeAdapterFactoryForXML; 8 9 10 11 public class AdapterFactoryProviderForXML extends org.eclipse.wst.xml.ui.internal.registry.AdapterFactoryProviderForXML { 12 13 public AdapterFactoryProviderForXML() { 14 15 } 16 17 protected void addContentBasedFactories(IStructuredModel structuredModel) { 18 FactoryRegistry factoryRegistry = structuredModel.getFactoryRegistry(); 19 INodeAdapterFactory factory = null; 21 22 factory = factoryRegistry.getFactoryFor(IJFaceNodeAdapter.class); 23 if (factory == null) { 24 factory = new JFaceNodeAdapterFactoryForXML(); 25 factoryRegistry.addFactory(factory); 26 } 27 super.addContentBasedFactories(structuredModel); 28 } 29 } 30 | Popular Tags |