boolean (@NotNull JBTerminalWidget widget) { DataContext dataContext = DataManager.getInstance().getDataContext(widget.getTerminalPanel()); ToolWindow toolWindow = dataContext.getData(PlatformDataKeys.TOOL_WINDOW); return isTerminalToolWindow(toolWindow); }