@NotNull @Override protected ProcessBackedConsoleExecuteActionHandler createExecuteActionHandler() { myConsoleExecuteActionHandler = new PydevConsoleExecuteActionHandler( getConsoleView(), getProcessHandler(), myPydevConsoleCommunication); myConsoleExecuteActionHandler.setEnabled(false); myHistoryController = new ConsoleHistoryController( myConsoleType.getTypeId(), "", getLanguageConsole(), myConsoleExecuteActionHandler.getConsoleHistoryModel()); myHistoryController.install(); return myConsoleExecuteActionHandler; }
protected void waitForReady() throws InterruptedException { int count = 0; while (!myExecuteHandler.isEnabled() || !canExecuteNow()) { if (count > 10) { Assert.fail("Console is not ready"); } Thread.sleep(300); count++; } }
private void enableConsoleExecuteAction() { myConsoleExecuteActionHandler.setEnabled(true); }
private boolean isIndentSubstring(String text) { int indentSize = myConsoleExecuteActionHandler.getPythonIndent(); return text.length() >= indentSize && CharMatcher.WHITESPACE.matchesAllOf(text.substring(text.length() - indentSize)); }
protected boolean canExecuteNow() { return myExecuteHandler.canExecuteNow(); }