* @param pathTemplate The path of the templates.
* @param pathCache The path of the cache of the templates.
* @param sharedTemplates True if the templates are shared templates (in the shared directory).
*/
protected void createMenuItems(final String pathTemplate, final String pathCache, final boolean sharedTemplates) {
final SVGFilter filter = new SVGFilter();
final File[] files = new File(pathTemplate).listFiles();
if(files!=null)
for(int i=0; i<files.length; i++)
if(filter.accept(files[i]) && !files[i].isDirectory()) {
final MMenuItem menu = createTemplateMenuItem(files[i].getPath(), files[i].getName()+PNGFilter.PNG_EXTENSION, pathCache);
if(menu!=null)
templatesMenu.add(menu, i);
}