else
renderer = new AlertRenderer(loader);
}
private TemplateLoader createTemplateLoader() {
final IPathFinder pathFinder = Activator.getDefault().getPathFinder();
if(pathFinder == null)
throw new IllegalStateException("Cannot find templates to render because path finder service is not available");
final File templateDirectory = new File(pathFinder.getDataDirectory(), "templates");
try {
return new FileTemplateLoader(templateDirectory);
} catch (IOException e) {
logger.log(Level.WARNING, "Failed to open template directory: "+ e.getMessage());
return null;