Search in sources :

Example 1 with GitTemplateVariableResolver

use of org.eclipse.egit.ui.internal.variables.GitTemplateVariableResolver in project egit by eclipse.

the class Activator method registerTemplateVariableResolvers.

private void registerTemplateVariableResolvers() {
    if (hasJavaPlugin()) {
        final ContextTypeRegistry codeTemplateContextRegistry = JavaPlugin.getDefault().getCodeTemplateContextRegistry();
        final Iterator<?> ctIter = codeTemplateContextRegistry.contextTypes();
        while (ctIter.hasNext()) {
            final TemplateContextType contextType = (TemplateContextType) ctIter.next();
            contextType.addResolver(new GitTemplateVariableResolver(// $NON-NLS-1$
            "git_config", UIText.GitTemplateVariableResolver_GitConfigDescription));
        }
    }
}
Also used : ContextTypeRegistry(org.eclipse.jface.text.templates.ContextTypeRegistry) GitTemplateVariableResolver(org.eclipse.egit.ui.internal.variables.GitTemplateVariableResolver) TemplateContextType(org.eclipse.jface.text.templates.TemplateContextType)

Aggregations

GitTemplateVariableResolver (org.eclipse.egit.ui.internal.variables.GitTemplateVariableResolver)1 ContextTypeRegistry (org.eclipse.jface.text.templates.ContextTypeRegistry)1 TemplateContextType (org.eclipse.jface.text.templates.TemplateContextType)1