Search in sources :

Example 1 with NoRegionContentAssistProcessor

use of org.eclipse.wst.xml.ui.internal.contentassist.NoRegionContentAssistProcessor in project jbosstools-hibernate by jbosstools.

the class CFGXMLStructuredTextViewerConfiguration method getContentAssistProcessors.

protected IContentAssistProcessor[] getContentAssistProcessors(ISourceViewer sourceViewer, String partitionType) {
    IContentAssistProcessor[] processors = null;
    IService service = StructuredTextViewerConfigurationUtil.getService(sourceViewer);
    if ((IStructuredPartitions.DEFAULT_PARTITION.equals(partitionType)) || (IXMLPartitions.XML_DEFAULT.equals(partitionType))) {
        // TODO: return cached one ?
        processors = new IContentAssistProcessor[] { new CFGXMLContentAssistProcessor(service) };
    } else if (IStructuredPartitions.UNKNOWN_PARTITION.equals(partitionType)) {
        processors = new IContentAssistProcessor[] { new NoRegionContentAssistProcessor() };
    }
    return processors;
}
Also used : NoRegionContentAssistProcessor(org.eclipse.wst.xml.ui.internal.contentassist.NoRegionContentAssistProcessor) IContentAssistProcessor(org.eclipse.jface.text.contentassist.IContentAssistProcessor) IService(org.jboss.tools.hibernate.runtime.spi.IService)

Aggregations

IContentAssistProcessor (org.eclipse.jface.text.contentassist.IContentAssistProcessor)1 NoRegionContentAssistProcessor (org.eclipse.wst.xml.ui.internal.contentassist.NoRegionContentAssistProcessor)1 IService (org.jboss.tools.hibernate.runtime.spi.IService)1