private boolean handshake() { boolean res; long started = System.currentTimeMillis(); do { try { res = myPydevConsoleCommunication.handshake(); } catch (XmlRpcException ignored) { res = false; } if (res) { break; } else { long now = System.currentTimeMillis(); if (now - started > APPROPRIATE_TO_WAIT) { break; } else { try { Thread.sleep(100); } catch (InterruptedException ignored) { } } } } while (true); return res; }
@Override protected PythonConsoleView createConsoleView() { PythonConsoleView consoleView = new PythonConsoleView(getProject(), getConsoleTitle(), mySdk); myPydevConsoleCommunication.setConsoleFile(consoleView.getConsoleVirtualFile()); consoleView.addMessageFilter(new PythonTracebackFilter(getProject())); return consoleView; }
private void closeCommunication() { if (!myProcessHandler.isProcessTerminated()) { myPydevConsoleCommunication.close(); } }