protected class TracerListener implements ViewContextChangeListener {
protected Tracer tracer;
public TracerListener(ViewContext viewContext) {
final Document doc = viewContext.get(Document.class);
tracer = new ToolkitTracer(new Tracer.Emitter() {
public void emit(String text) {
try {
doc.insertString(doc.getLength(), text, null);
} catch (BadLocationException e) {
}