Search in sources :

Example 11 with ContributionContextTypeRegistry

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

the class TemplateEditorUI method getContextTypeRegistry.

/**
 * Returns this plug-in's context type registry.
 *
 * @return the context type registry for this plug-in instance
 */
public ContextTypeRegistry getContextTypeRegistry() {
    if (fRegistry == null) {
        // create an configure the contexts available in the template editor
        fRegistry = new ContributionContextTypeRegistry();
        fRegistry.addContextType(XMLContextType.XML_CONTEXT_TYPE);
    }
    return fRegistry;
}
Also used : ContributionContextTypeRegistry(org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry)

Example 12 with ContributionContextTypeRegistry

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

the class XMLUIPlugin method getTemplateContextRegistry.

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

Example 13 with ContributionContextTypeRegistry

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

the class XPathUIPlugin method getXPathTemplateContextRegistry.

/**
 * Returns the template context type registry for xpath
 *
 * @return the template context type registry for xpath
 */
public ContextTypeRegistry getXPathTemplateContextRegistry() {
    if (fXPathContextTypeRegistry == null) {
        ContributionContextTypeRegistry registry = new ContributionContextTypeRegistry();
        // $NON-NLS-1$
        registry.addContextType("xsl_xpath");
        // $NON-NLS-1$
        registry.addContextType("xpath_operator");
        // $NON-NLS-1$
        registry.addContextType("xpath_axis");
        // $NON-NLS-1$
        registry.addContextType("exslt_function");
        // $NON-NLS-1$
        registry.addContextType("xpath_2");
        // $NON-NLS-1$
        registry.addContextType("extension_function");
        fXPathContextTypeRegistry = registry;
    }
    return fXPathContextTypeRegistry;
}
Also used : ContributionContextTypeRegistry(org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry)

Example 14 with ContributionContextTypeRegistry

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

the class DTDUIPlugin method getTemplateContextRegistry.

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

Example 15 with ContributionContextTypeRegistry

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

the class HTMLUIPlugin method getTemplateContextRegistry.

/**
 * Returns the template context type registry for the html plugin.
 *
 * @return the template context type registry for the html plugin
 */
public ContextTypeRegistry getTemplateContextRegistry() {
    if (fContextTypeRegistry == null) {
        ContributionContextTypeRegistry registry = new ContributionContextTypeRegistry();
        registry.addContextType(TemplateContextTypeIdsHTML.ALL);
        registry.addContextType(TemplateContextTypeIdsHTML.NEW);
        registry.addContextType(TemplateContextTypeIdsHTML.TAG);
        registry.addContextType(TemplateContextTypeIdsHTML.ATTRIBUTE);
        registry.addContextType(TemplateContextTypeIdsHTML.ATTRIBUTE_VALUE);
        fContextTypeRegistry = registry;
    }
    return fContextTypeRegistry;
}
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