private @NotNull AnActionEvent createAnEvent(InputEvent inputEvent, int modifiers) {
    Presentation presentation = myAction.getTemplatePresentation().clone();
    DataContext parent = DataManager.getInstance().getDataContext(myInplaceButton);
    DataContext dataContext = CustomizedDataContext.withSnapshot(parent, sink -> {
      sink.set(CommonDataKeys.VIRTUAL_FILE, ObjectUtils.tryCast(myTabInfo.getObject(), VirtualFile.class));
    });
    return new AnActionEvent(inputEvent, dataContext, myPlace != null ? myPlace : ActionPlaces.UNKNOWN, presentation,
                             ActionManager.getInstance(), modifiers);
  }
private @NotNull AnActionEvent createAnEvent(InputEvent inputEvent, int modifiers)