Project: JDT
Bug 75806 [templates] Should be able to look up Templates by ID
Reported: 2004-10-07 11:25:30 | Status: resolved fixed

Templates added to Eclipse using the extension point org.eclipse.ui.editors. templates have an ID and a name. In a template preference page that is the subclass of org.eclipse.ui.texteditor.templates.TemplatePreferencePage the name of the template is shown to the user, the ID is not. Therefore I would like to internationalize the name in the plugin.xml using %templateName, where templateName is mapped to the actual name in the plugin.properties file. org.eclipse.jface.text.templates.persistence.TemplateStore has a findTemplate() method that takes the name of the template as an argument. It is not possible to look up a template by ID. This makes it impossible for me to internationalize the template name as I would like to. It would be much more convenient if it were possible to look up templates by ID from a TemplateStore.

Files changed in fix:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/ProjectTemplateStore.java