Promise<Object> (@NotNull PlaybackContext context) { final ActionCallback actionCallback = new ActionCallbackProfilerStopper(); final MessageBusConnection busConnection = context.getProject().getMessageBus().connect(); busConnection.subscribe(PowerSaveMode.TOPIC, () -> actionCallback.setDone()); ApplicationManager.getApplication().invokeAndWait(() -> { PowerSaveMode.setEnabled(true); }); return Promises.toPromise(actionCallback); }