public void run() { String line = null; try { while ((line = reader.readLine()) != null) { Log.debug("read:" + Util.URIDecode(line)); // $NON-NLS-1$ TestEvent event = TestEvents.fromXML(Util.URIDecode(line)); // kludge for the mo' if (event instanceof TestCompleteEvent) { manager.postTestResult(((TestCompleteEvent) event).getTestResult()); String cmd = continueText(); Log.debug("writing: " + cmd); // $NON-NLS-1$ writeOut(cmd); } else if (event instanceof AllCompleteEvent) { endSession(); fireComplete(); // TODO: this is a place where a debug event would happen return; } else if (event instanceof TestSuspendedEvent) { // TODO: this is where we'd extract the debug info... Log.debug("hit a breakpoint... suspending!"); // $NON-NLS-1$ fireSuspended(((TestSuspendedEvent) event).getScriptState()); return; } } } catch (IOException e) { Log.error(e); } catch (RuntimeException e) { Log.error(e); try { endSession(); } catch (Exception e1) { } } }
public ErrorDecorator() { LSLForgePlugin.getDefault().setErrorDecorator(this); descriptor = Util.findDescriptor(ICON_PATH); }
private void writeOut(String cmd) { writer.println(Util.URIEncode(cmd)); writer.flush(); }