void (@NotNull Runnable task) { TreeModel model = tree.getModel(); if (model instanceof AsyncTreeModel) { invokeWhenProcessingDone(wrap(task), (AsyncTreeModel)model, System.currentTimeMillis(), 0); } else { runOnSwingThread(task); } }