ConsoleExecuteAction (@Nullable ConsoleView consoleView) { if (!(consoleView instanceof LanguageConsoleView)) { return null; } List<AnAction> actions = ActionUtil.getActions(((LanguageConsoleView)consoleView).getConsoleEditor().getComponent()); ConsoleExecuteAction action = ContainerUtil.findInstance(actions, ConsoleExecuteAction.class); return action == null || !action.isEnabled() ? null : action; }