Search in sources :

Example 6 with ContributionContextTypeRegistry

use of org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry in project liferay-ide by liferay.

the class PortalUI method getTemplateContextRegistry.

public ContextTypeRegistry getTemplateContextRegistry() {
    if (contextTypeRegistry == null) {
        ContributionContextTypeRegistry registry = new ContributionContextTypeRegistry();
        for (StructuresTemplateContext contextType : StructuresTemplateContext.values()) {
            registry.addContextType(contextType.getContextTypeId());
        }
        contextTypeRegistry = registry;
    }
    return contextTypeRegistry;
}
Also used : ContributionContextTypeRegistry(org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry) StructuresTemplateContext(com.liferay.ide.portal.ui.templates.StructuresTemplateContext)

Example 7 with ContributionContextTypeRegistry

use of org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry in project liferay-ide by liferay.

the class LiferayXMLSearchUI method getContextTypeRegistry.

// add context type for templates of service.xml
public ContextTypeRegistry getContextTypeRegistry() {
    if (_contextTypeRegistry == null) {
        ContributionContextTypeRegistry registry = new ContributionContextTypeRegistry();
        registry.addContextType(ServiceXmlContextType.ID_SERVICE_XML_TAG);
        _contextTypeRegistry = registry;
    }
    return _contextTypeRegistry;
}
Also used : ContributionContextTypeRegistry(org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry)

Example 8 with ContributionContextTypeRegistry

use of org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry in project mylyn.docs by eclipse.

the class WikiTextTemplateAccess method getContextTypeRegistry.

public ContextTypeRegistry getContextTypeRegistry() {
    if (registry == null) {
        if (WikiTextUiPlugin.getDefault() != null) {
            ContributionContextTypeRegistry contributionRegistry = new ContributionContextTypeRegistry();
            contributionRegistry.addContextType(SourceTemplateContextType.ID);
            registry = contributionRegistry;
        } else {
            ContextTypeRegistry contextTypeRegistry = new ContextTypeRegistry();
            contextTypeRegistry.addContextType(new SourceTemplateContextType());
            registry = contextTypeRegistry;
        }
    }
    return registry;
}
Also used : ContributionContextTypeRegistry(org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry) ContributionContextTypeRegistry(org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry) ContextTypeRegistry(org.eclipse.jface.text.templates.ContextTypeRegistry)

Example 9 with ContributionContextTypeRegistry

use of org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry in project webtools.sourceediting by eclipse.

the class CSSUIPlugin method getTemplateContextRegistry.

/**
 * Returns the template context type registry for the css plugin.
 *
 * @return the template context type registry for the css plugin
 */
public ContextTypeRegistry getTemplateContextRegistry() {
    if (fContextTypeRegistry == null) {
        ContributionContextTypeRegistry registry = new ContributionContextTypeRegistry();
        registry.addContextType(TemplateContextTypeIdsCSS.ALL);
        registry.addContextType(TemplateContextTypeIdsCSS.NEW);
        fContextTypeRegistry = registry;
    }
    return fContextTypeRegistry;
}
Also used : ContributionContextTypeRegistry(org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry)

Example 10 with ContributionContextTypeRegistry

use of org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry in project che by eclipse.

the class JavaPlugin method getCodeTemplateContextRegistry.

/**
     * Returns the template context type registry for the code generation
     * templates.
     *
     * @return the template context type registry for the code generation
     *         templates
     * @since 3.0
     */
public ContextTypeRegistry getCodeTemplateContextRegistry() {
    if (fCodeTemplateContextTypeRegistry == null) {
        fCodeTemplateContextTypeRegistry = new ContributionContextTypeRegistry();
        CodeTemplateContextType.registerContextTypes(fCodeTemplateContextTypeRegistry);
    }
    return fCodeTemplateContextTypeRegistry;
}
Also used : ContributionContextTypeRegistry(org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry)

Aggregations

ContributionContextTypeRegistry (org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry)23 KaleoTemplateContext (com.liferay.ide.kaleo.ui.xml.KaleoTemplateContext)1 StructuresTemplateContext (com.liferay.ide.portal.ui.templates.StructuresTemplateContext)1 AbstractJavaContextType (org.eclipse.jdt.internal.corext.template.java.AbstractJavaContextType)1 CodeTemplateContextType (org.eclipse.jdt.internal.corext.template.java.CodeTemplateContextType)1 ContextTypeRegistry (org.eclipse.jface.text.templates.ContextTypeRegistry)1 TemplateContextType (org.eclipse.jface.text.templates.TemplateContextType)1