ActionCallback (final Object element, final boolean forceResort, final boolean updateStructure) { AbstractTreeUi ui = getUi(); if (ui == null) { return ActionCallback.REJECTED; } final ActionCallback result = new ActionCallback(); ui.invokeLaterIfNeeded(false, new TreeRunnable("AbstractTreeBuilder.queueUpdateFrom") { @Override public void perform() { AbstractTreeUi ui = getUi(); if (ui == null) { result.reject("ui is null"); return; } if (updateStructure && forceResort) { ui.incComparatorStamp(); } ui.queueUpdate(element, updateStructure).notify(result); } }); return result; }