void (@NotNull AnActionEvent e) { Project project = e.getProject(); if (project != null) { LocalTerminalDirectRunner runner = new LocalTerminalDirectRunner(project) { @Override public @NotNull List<String> getInitialCommand(@NotNull Map<String, String> envs) { return myCommand; } }; TerminalTabState tabState = new TerminalTabState(); tabState.myTabName = myPresentableName.get(); TerminalToolWindowManager.getInstance(project).createNewSession(runner, tabState); } }