Search in sources :

Example 1 with IDataModelProvider

use of com.redhat.qute.jdt.template.datamodel.IDataModelProvider in project quarkus-ls by redhat-developer.

the class DataModelProviderRegistry method createProvider.

@Override
protected IDataModelProvider createProvider(IConfigurationElement ce) throws CoreException {
    IDataModelProvider provider = super.createProvider(ce);
    String namespaces = ce.getAttribute(NAMESPACES_ATTR);
    if (StringUtils.isNotEmpty(namespaces)) {
        String description = ce.getAttribute(DESCRIPTION_ATTR);
        String url = ce.getAttribute(URL_ATTR);
        NamespaceResolverInfo info = new NamespaceResolverInfo();
        info.setNamespaces(Arrays.asList(namespaces.split(",")));
        info.setDescription(description);
        info.setUrl(url);
        provider.setNamespaceResolverInfo(info);
    }
    return provider;
}
Also used : NamespaceResolverInfo(com.redhat.qute.commons.datamodel.resolvers.NamespaceResolverInfo) IDataModelProvider(com.redhat.qute.jdt.template.datamodel.IDataModelProvider)

Aggregations

NamespaceResolverInfo (com.redhat.qute.commons.datamodel.resolvers.NamespaceResolverInfo)1 IDataModelProvider (com.redhat.qute.jdt.template.datamodel.IDataModelProvider)1