abstract sclass DynPrintLog extends DynModule { transient JFastLogView_noWrap printLogView; transient Lock updatePrintLog_lock = lock(); transient StringBuffer actualPrintLog; visualize { JComponent section = jSection("Log", jscroll_copyBackground(printLogView = jFastLogView_noWrap(getPrintLog()))); componentPopupMenuItem(section, "Clear", rEnter dm_clearModulePrintLog); ret awtEvery(section, 500, r updatePrintLog); } void updatePrintLog { // TODO: optimize lock updatePrintLog_lock; JFastLogView_noWrap _view = printLogView; if (_view == null) ret; if (_view.setText(getPrintLog())) scrollAllTheWayDown(_view); } JFastLogView_noWrap myPrintLogComponent() { ret printLogView; } void enableWordWrap { // TODO } S getPrintLog() { if (actualPrintLog == null) { if (printToModule()) actualPrintLog = _printLog; else actualPrintLog = liveLocalPrintLog_realMC(this); } ret str(actualPrintLog); } }