From 0d07238e115beb895a4adf4ff7130803d1c4c34a Mon Sep 17 00:00:00 2001 From: Lars Vogel Date: Wed, 26 Aug 2026 15:49:37 +0200 Subject: [PATCH] Do not persist status line visibility under the perspective bar key setStatusLineVisible wrote the perspectiveBarVisible entry into the window's persisted state, so hiding the status line via WorkbenchWindowConfigurer.setShowStatusLine changed the perspective bar state on the next start. Nothing reads back a status line key, and the Hide Status Bar command persists through MUIElement.visible, so drop the write instead of adding a key. Also corrects the copy-pasted Javadoc. Introduced by 8a8be4d8d1 (Bug 403461 - Allow toggling toolbar on per-window basis). --- .../org/eclipse/ui/internal/WorkbenchWindow.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/WorkbenchWindow.java b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/WorkbenchWindow.java index 48a5c0d11fe..d5a1f4004da 100644 --- a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/WorkbenchWindow.java +++ b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/WorkbenchWindow.java @@ -2826,16 +2826,13 @@ public boolean getPerspectiveBarVisible() { } /** - * @param visible whether the perspective bar should be shown. This is only - * applicable if the window configurer also wishes either the - * perspective bar to be visible. + * @param visible whether the status line should be shown * @since 3.0 */ public void setStatusLineVisible(boolean visible) { boolean oldValue = statusLineVisible; statusLineVisible = visible; if (oldValue != statusLineVisible) { - getModel().getPersistedState().put(IPreferenceConstants.PERSPECTIVEBAR_VISIBLE, Boolean.toString(visible)); updateLayoutDataForContents(); firePropertyChanged(PROP_STATUS_LINE_VISIBLE, oldValue ? Boolean.TRUE : Boolean.FALSE, statusLineVisible ? Boolean.TRUE : Boolean.FALSE); @@ -2843,9 +2840,7 @@ public void setStatusLineVisible(boolean visible) { } /** - * @return whether the perspective bar should be shown. This is only applicable - * if the window configurer also wishes either the perspective bar to be - * visible. + * @return whether the status line should be shown * @since 3.0 */ public boolean getStatusLineVisible() {