void (@NotNull Component componentToDetach, @Nullable Runnable onDone) { slidingPanel.swipe(ROOT_ID, JBCardLayout.SwipeDirection.BACKWARD).doWhenDone(() -> { if (onDone != null) { onDone.run(); } slidingPanel.getLayout().removeLayoutComponent(componentToDetach); setTitle(getApplicationTitle()); IdeFocusManager.getGlobalInstance().doWhenFocusSettlesDown(() -> { IdeFocusManager.getGlobalInstance().requestFocus(slidingPanel, true); }); }); }