void () { myUpdater.waitForAllExecuted(10, TimeUnit.SECONDS); // wait for FileAnnotation.close()/reload() to be called - see invalidateAnnotations() if (getApplication().isDispatchThread()) { dispatchAllInvocationEvents(); } else { UIUtil.pump(); } }