question: public static void addToInvokeLater ( final Runnable runnable ) { final Application application = ApplicationManager . getApplication ( ) ; final boolean unitTestMode = application . isUnitTestMode ( ) ; if ( unitTestMode ) { UIUtil . invokeLaterIfNeeded ( runnable ) ; } else if ( application . isHeadlessEnvironment ( ) || application . isDispatchThread ( ) ) { runnable . run ( ) ; } else { TRANSFER_TO_EDT_QUEUE . offer ( runnable ) ; } }
target:  Adds runnable to Event Dispatch Queue if we aren't in UnitTest of Headless environment mode