List<String> (@NotNull String consoleTitle) { PythonConsoleToolWindow toolWindow = PythonConsoleToolWindow.getInstance(myProject); if (toolWindow != null && toolWindow.isInitialized()) { return Arrays.stream(toolWindow.getToolWindow().getContentManager().getContents()).map(c -> c.getDisplayName()) .filter(s -> s.startsWith(myTitle)).collect(Collectors.toList()); } else { return super.getActiveConsoles(consoleTitle); } }