void (@NotNull Editor editor, @NotNull JBPopup popup) { CodeFloatingToolbar floatingToolbar = CodeFloatingToolbar.getToolbar(editor); if (floatingToolbar == null) return; boolean wasVisible = floatingToolbar.isShown(); floatingToolbar.scheduleHide(); Disposable disposable = getPopupDisposable(popup); CodeFloatingToolbar.temporarilyDisable(true); Disposer.register(disposable, () -> { if (wasVisible) { floatingToolbar.allowInstantShowing(); } CodeFloatingToolbar.temporarilyDisable(false); }); }