@Override
  public Result apply(@NotNull VirtualFile fileToPatch,
                      ApplyPatchContext context,
                      @NotNull Project project,
                      FilePath pathBeforeRename,
                      Supplier<? extends CharSequence> baseContents,
                      @Nullable CommitContext commitContext) throws IOException {
    if (LOG.isDebugEnabled()) {
      LOG.debug("apply patch called for : " + fileToPatch.getPath());
    }
    if (myPatch.isNewFile()) {
      // File was already created by PathsVerifier.CheckAdded.check(), now set its content
      applyCreate(project, fileToPatch, commitContext);
    }
    else if (myPatch.isDeletedFile()) {
      FileEditorManager.getInstance(project).closeFile(fileToPatch);
      fileToPatch.delete(this);
    }
    else {
      return applyChange(project, fileToPatch, pathBeforeRename, baseContents);
    }
    return SUCCESS;
  }
@Override
  public Result apply(@NotNull VirtualFile fileToPatch,
                      ApplyPatchContext context,
                      @NotNull Project project,
                      FilePath pathBeforeRename,
                      Supplier<? extends CharSequence> baseContents,
                      @Nullable CommitContext commitContext)