@NotNull
  @Override
  public PsiElement createFromTemplate(@NotNull final Project project, @NotNull final PsiDirectory directory, String fileName, @NotNull final FileTemplate template,
                                       @NotNull final String templateText,
                                       @NotNull final Map<String, Object> props) throws IncorrectOperationException {
    fileName = checkAppendExtension(fileName, template);

    if (FileTypeManager.getInstance().isFileIgnored(fileName)) {
      throw new IncorrectOperationException("This filename is ignored (Settings | Editor | File Types | Ignore files and folders)");
    }

    directory.checkCreateFile(fileName);
    FileType type = FileTypeRegistry.getInstance().getFileTypeByFileName(fileName);
    PsiFile file = PsiFileFactory.getInstance(project).createFileFromText(fileName, type, templateText);

    file = (PsiFile)directory.add(file);
    if (template.isReformatCode()) {
      CodeStyleManager.getInstance(project).scheduleReformatWhenSettingsComputed(file);
    }
    return file;
  }
@NotNull
  @Override
  public PsiElement createFromTemplate(@NotNull final Project project, @NotNull final PsiDirectory directory, String fileName, @NotNull final FileTemplate template,
                                       @NotNull final String templateText,
                                       @NotNull final Map<String, Object> props)