private void doCreate(@Nullable String fileName)  {
    try {
      Properties properties = myAttrPanel.getProperties(myDefaultProperties);
      for (FileTemplate child : myTemplate.getChildren()) {
        createFile(child.getFileName(), child, properties);
      }

      String mainFileName;
      String templateFileName = myTemplate.getFileName();
      String propertiesFileName = properties.getProperty(FileTemplate.ATTRIBUTE_FILE_NAME);
      if (!StringUtil.isEmpty(templateFileName)) {
        mainFileName = templateFileName;
      } else if (!StringUtil.isEmpty(propertiesFileName)) {
        mainFileName = propertiesFileName;
      } else {
        mainFileName = fileName;
      }

      myCreatedElement = createFile(mainFileName, myTemplate, properties);

      PsiFile psiFile = myCreatedElement.getContainingFile();
      VirtualFile virtualFile = psiFile.getVirtualFile();
      if (virtualFile != null) {
        FileTypeUsageCounterCollector.logCreated(myProject, virtualFile, myTemplate);
      }
    }
    catch (Exception e) {
      showErrorDialog(e);
    }
  }
private void doCreate(@Nullable String fileName)