@Override
  protected void applyCreate(@NotNull Project project,
                             @NotNull VirtualFile newFile,
                             @Nullable CommitContext commitContext) throws IOException {
    Document document = FileDocumentManager.getInstance().getDocument(newFile);
    if (document == null) {
      throw new IOException("Failed to set contents for new file " + newFile.getPath());
    }

    String charsetName = commitContext == null ? null : CharsetEP.getCharset(newFile.getPath(), commitContext);
    if (charsetName != null) {
      try {
        newFile.setCharset(Charset.forName(charsetName));
      }
      catch (IllegalArgumentException ignore) {
      }
    }
    document.setText(myPatch.getSingleHunkPatchText());
    FileDocumentManager.getInstance().saveDocument(document);
  }
@Override
  protected void applyCreate(@NotNull Project project,
                             @NotNull VirtualFile newFile,
                             @Nullable CommitContext commitContext)