@ApiStatus.Internal
  public static void saveDocumentIfFileWillBecomeBinary(VirtualFile vFile, @NotNull String newName) {
    FileType newFileType = FileTypeRegistry.getInstance().getFileTypeByFileName(newName);
    if (UnknownFileType.INSTANCE.equals(newFileType) || newFileType.isBinary()) {
      FileDocumentManager fdm = FileDocumentManager.getInstance();
      Document doc = fdm.getCachedDocument(vFile);
      if (doc != null) {
        fdm.saveDocumentAsIs(doc);
      }
    }
  }
@ApiStatus.Internal
  public static void saveDocumentIfFileWillBecomeBinary(VirtualFile vFile, @NotNull String newName)