static @NotNull ScratchFileCreationHelper.Context createContext(@NotNull AnActionEvent e) {
    Project project = Objects.requireNonNull(e.getProject());
    PsiFile file = e.getData(CommonDataKeys.PSI_FILE);
    Editor editor = e.getData(CommonDataKeys.EDITOR);
    if (file == null && editor != null) {
      // see data provider in com.intellij.diff.tools.holders.TextEditorHolder
      file = PsiDocumentManager.getInstance(project).getPsiFile(editor.getDocument());
    }
    return createContext(project, file, editor, e.getDataContext());
  }
static @NotNull ScratchFileCreationHelper.Context createContext(@NotNull AnActionEvent e)