Start the timer that handles flushing the console text. Has to be started and stopped/cleared because the Timer thread will keep a reference to its Editor around even after the Editor has been closed, leaking memory.
()
| 101 | * Editor around even after the Editor has been closed, leaking memory. |
| 102 | */ |
| 103 | protected void startTimer() { |
| 104 | if (flushTimer == null) { |
| 105 | // periodically post buffered messages to the console |
| 106 | // should the interval come from the preferences file? |
| 107 | flushTimer = new Timer(250, evt -> flush()); |
| 108 | flushTimer.start(); |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | |
| 113 | protected void stopTimer() { |
no test coverage detected