use of org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry 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;
}
use of org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry in project linuxtools by eclipse.
the class Activator method getContextTypeRegistry.
public ContextTypeRegistry getContextTypeRegistry() {
if (fContextTypeRegistry == null) {
fContextTypeRegistry = new ContributionContextTypeRegistry();
// $NON-NLS-1$
fContextTypeRegistry.addContextType("org.eclipse.linuxtools.rpm.ui.editor.preambleSection");
// $NON-NLS-1$
fContextTypeRegistry.addContextType("org.eclipse.linuxtools.rpm.ui.editor.preSection");
// $NON-NLS-1$
fContextTypeRegistry.addContextType("org.eclipse.linuxtools.rpm.ui.editor.buildSection");
// $NON-NLS-1$
fContextTypeRegistry.addContextType("org.eclipse.linuxtools.rpm.ui.editor.installSection");
// $NON-NLS-1$
fContextTypeRegistry.addContextType("org.eclipse.linuxtools.rpm.ui.editor.changelogSection");
}
return fContextTypeRegistry;
}
use of org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry in project erlide_eclipse by erlang.
the class ErlangSourceContextTypeComment 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(ErlangSourceContextTypeComment.ERLANGSOURCE_CONTEXT_TYPE_COMMENTS);
fRegistry.addContextType(ErlangSourceContextTypeComment.ERLANGSOURCE_CONTEXT_TYPE_BEHAVIOUR);
fRegistry.addContextType(ErlangSourceContextTypeComment.ERLANGSOURCE_CONTEXT_TYPE_LAYOUT);
}
return fRegistry;
}
use of org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry in project erlide_eclipse by erlang.
the class ErlideUIPlugin method getContextTypeRegistry.
public ContextTypeRegistry getContextTypeRegistry() {
if (fContextTypeRegistry == null) {
// create an configure the contexts available in the template editor
fContextTypeRegistry = new ContributionContextTypeRegistry();
fContextTypeRegistry.addContextType(ErlangTemplateContextType.ERLANG_CONTEXT_TYPE_ID);
fContextTypeRegistry.addContextType(ErlangSourceContextTypeModule.ERLANG_SOURCE_CONTEXT_TYPE_MODULE_ID);
fContextTypeRegistry.addContextType(ErlangSourceContextTypeModuleElement.ERLANG_SOURCE_CONTEXT_TYPE_MODULE_ELEMENT_ID);
}
return fContextTypeRegistry;
}
use of org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry in project liferay-ide by liferay.
the class KaleoUI method getTemplateContextRegistry.
public ContextTypeRegistry getTemplateContextRegistry() {
if (_contextTypeRegistry == null) {
ContributionContextTypeRegistry registry = new ContributionContextTypeRegistry();
for (KaleoTemplateContext contextType : KaleoTemplateContext.values()) {
registry.addContextType(contextType.getContextTypeId());
}
_contextTypeRegistry = registry;
}
return _contextTypeRegistry;
}
Aggregations