private static String getNewFileName(PsiFile file, String name) {
    if (name != null) {
      String fileExtension = getFileExtension(file);
      return StringUtil.isEmpty(fileExtension) ? name : StringUtil.getQualifiedName(name, fileExtension);
    }
    return file.getName();
  }
private static String getNewFileName(PsiFile file, String name)