use of org.eclipse.jface.text.templates.persistence.TemplateStore in project flux by eclipse.
the class StubUtility method setCodeTemplate.
/**
* Only to be used by tests
*
* @param templateId the template id
* @param pattern the new pattern
* @param project not used
*/
public static void setCodeTemplate(String templateId, String pattern, IJavaProject project) {
TemplateStore codeTemplateStore = JavaPlugin.getDefault().getCodeTemplateStore();
TemplatePersistenceData data = codeTemplateStore.getTemplateData(templateId);
Template orig = data.getTemplate();
Template copy = new Template(orig.getName(), orig.getDescription(), orig.getContextTypeId(), pattern, true);
data.setTemplate(copy);
}
Aggregations