AnActionEvent (@NotNull AnActionEvent e, @NotNull PythonConsoleView consoleView) { DataContext dataContext = SimpleDataContext.builder() .setParent(e.getDataContext()) .add(CommonDataKeys.EDITOR, consoleView.getEditor()) .build(); return e.withDataContext(dataContext); }