void (@NotNull List<ValidationInfo> infos) { //init was not called - there's nothing to update ErrorText errorText = myErrorText; if (errorText == null) return; Runnable updateRunnable = () -> { if (!myDisposed) doUpdateErrorText(errorText, infos); }; Application application = ApplicationManager.getApplication(); boolean headless = application != null && application.isHeadlessEnvironment(); if (headless) { updateRunnable.run(); } else { SwingUtilities.invokeLater(updateRunnable); } }