protected PsiElement[] create(final String newName, final PsiDirectory directory) throws Exception {
@NonNls final String fileName = getFileName(newName);
final Module module = ModuleUtilCore.findModuleForPsiElement(directory);
StrutsFileTemplateProvider templateProvider = new StrutsFileTemplateProvider(module);
final FileTemplate strutsXmlTemplate = templateProvider.determineFileTemplate();
final PsiElement file = FileTemplateUtil.createFromTemplate(strutsXmlTemplate,
fileName,
null,
directory);
return new PsiElement[]{file};