void (final TestFrameworkRunningModel model) { if (myModel != null) myModel.getTreeView().removeTreeSelectionListener(myTreeSelectionListener); myModel = model; if (model != null) { myTreeSelectionListener = new MyTreeSelectionListener(); myUpdateCoverageAlarm = new Alarm(Alarm.ThreadToUse.POOLED_THREAD, myModel); model.getTreeView().addTreeSelectionListener(myTreeSelectionListener); Disposer.register(model, new Disposable() { @Override public void dispose() { restoreMergedCoverage(); } }); } }