fabioz/Pydev — pull request #107 by ecatmur (2013-12-12 16:59:48+00:00)
Title: Improve stdout/stderr buffering in the console

This substantial change rewrites a considerable amount of code to
provide an asynchronous stream for the ScriptConsoleDocumentListener to
listen to as events rather than some ad hoc event loop distributed
between several files.

This is done by providing a few new interfaces and implementations for
asynchronous stream reading and monitoring. To wit: StreamReader<..>
will listen to the Streams from stdout and stderr and add them to a
BlockingQueue. IStreamMonitor (concretely ThreadedStreamMonitor) will
listen to the same BlockingQueue and notify listeners of the new stream
inputs. Finally, the ScriptConsoleDocumentListener is not an
IStreamListener and implements the onStream message and this will add
the text to the console after some judicious prompt manipulation.