void (@NotNull Runnable request, int delayMillis, boolean runWithActiveFrameOnly) { if (runWithActiveFrameOnly && !ApplicationManager.getApplication().isActive()) { MessageBus bus = ApplicationManager.getApplication().getMessageBus(); MessageBusConnection connection = bus.connect(this); connection.subscribe(ApplicationActivationListener.TOPIC, new ApplicationActivationListener() { @Override public void applicationActivated(@NotNull IdeFrame ideFrame) { connection.disconnect(); addRequest(request, delayMillis); } }); } else { addRequest(request, delayMillis); } }