void (@NotNull AnActionEvent e) { Project project = e.getProject(); VirtualFile selectedFile = getSelectedFile(e); if (project == null || selectedFile == null) { return; } TerminalToolWindowManager.getInstance(project).openTerminalIn(selectedFile); }