void () { TreeUpdatePass[] passes; synchronized (this) { passes = myNodeQueue.toArray(new TreeUpdatePass[0]); myNodeQueue.clear(); } myUpdateQueue.cancelAllUpdates(); AbstractTreeUi ui = myTreeBuilder.getUi(); if (ui != null) { for (TreeUpdatePass each : passes) { ui.addToCancelled(each.getNode()); } } }