protected PydevConsoleRunner( @NotNull final Project project, @NotNull Sdk sdk, @NotNull final PyConsoleType consoleType, @Nullable final String workingDir, Map<String, String> environmentVariables) { super(project, consoleType.getTitle(), workingDir); mySdk = sdk; myConsoleType = consoleType; myEnvironmentVariables = environmentVariables; }
private static int[] findAvailablePorts(Project project, PyConsoleType consoleType) { final int[] ports; try { // File "pydev/console/pydevconsole.py", line 223, in <module> // port, client_port = sys.argv[1:3] ports = NetUtils.findAvailableSocketPorts(2); } catch (IOException e) { ExecutionHelper.showErrors( project, Arrays.<Exception>asList(e), consoleType.getTitle(), null); return null; } return ports; }