Search in sources :

Example 1 with AbstractJavaContextType

use of org.eclipse.jdt.internal.corext.template.java.AbstractJavaContextType in project che by eclipse.

the class JavaPlugin method getTemplateContextRegistry.

/**
     * Returns the template context type registry for the java plug-in.
     *
     * @return the template context type registry for the java plug-in
     * @since 3.0
     */
public synchronized ContextTypeRegistry getTemplateContextRegistry() {
    if (fContextTypeRegistry == null) {
        ContributionContextTypeRegistry registry = new ContributionContextTypeRegistry(ID_CU_EDITOR);
        TemplateContextType all_contextType = registry.getContextType(JavaContextType.ID_ALL);
        ((AbstractJavaContextType) all_contextType).initializeContextTypeResolvers();
        registerJavaContext(registry, JavaContextType.ID_MEMBERS, all_contextType);
        registerJavaContext(registry, JavaContextType.ID_STATEMENTS, all_contextType);
        //            registerJavaContext(registry, SWTContextType.ID_ALL, all_contextType);
        //            all_contextType= registry.getContextType(SWTContextType.ID_ALL);
        //
        //            registerJavaContext(registry, SWTContextType.ID_MEMBERS, all_contextType);
        //            registerJavaContext(registry, SWTContextType.ID_STATEMENTS, all_contextType);
        fContextTypeRegistry = registry;
    }
    return fContextTypeRegistry;
}
Also used : AbstractJavaContextType(org.eclipse.jdt.internal.corext.template.java.AbstractJavaContextType) ContributionContextTypeRegistry(org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry) TemplateContextType(org.eclipse.jface.text.templates.TemplateContextType) CodeTemplateContextType(org.eclipse.jdt.internal.corext.template.java.CodeTemplateContextType)

Aggregations

AbstractJavaContextType (org.eclipse.jdt.internal.corext.template.java.AbstractJavaContextType)1 CodeTemplateContextType (org.eclipse.jdt.internal.corext.template.java.CodeTemplateContextType)1 TemplateContextType (org.eclipse.jface.text.templates.TemplateContextType)1 ContributionContextTypeRegistry (org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry)1