*/
@SuppressWarnings({ "unchecked" })
public void addConsoleInputListener() {
IConsole console = DebugUITools.getConsole(this.getProcess());
if (console instanceof ProcessConsole) {
final ProcessConsole c = (ProcessConsole) console;
final List<IConsoleInputListener> participants = ExtensionHelper
.getParticipants(ExtensionHelper.PYDEV_DEBUG_CONSOLE_INPUT_LISTENER);
final AbstractDebugTarget target = this;
//let's listen the doc for the changes
c.getDocument().addDocumentListener(new IDocumentListener() {
public void documentAboutToBeChanged(DocumentEvent event) {
//only report when we have a new line
if (event.fText.indexOf('\r') != -1 || event.fText.indexOf('\n') != -1) {
try {