void () { if (isEmpty()) { return; } if (myFlushing) { return; } if (!isModalityStateCorrect()) { return; } if (myExecuteInDispatchThread) { EdtInvocationManager.invokeAndWaitIfNeeded(() -> doFlush()); } else { doFlush(); } }