diff --git a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/Workbench.java b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/Workbench.java index 21961d1d76e..96c4e7037b2 100644 --- a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/Workbench.java +++ b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/Workbench.java @@ -81,6 +81,7 @@ import org.eclipse.core.runtime.SubMonitor; import org.eclipse.core.runtime.dynamichelpers.IExtensionTracker; import org.eclipse.core.runtime.jobs.Job; +import org.eclipse.core.runtime.preferences.ConfigurationScope; import org.eclipse.e4.core.contexts.ContextFunction; import org.eclipse.e4.core.contexts.ContextInjectionFactory; import org.eclipse.e4.core.contexts.IEclipseContext; @@ -687,8 +688,8 @@ private static void setRescaleAtRuntimePropertyFromPreference() { + " is configured (e.g., via the INI), but the according preference should be preferred instead." //$NON-NLS-1$ )); } else { - boolean rescaleAtRuntime = PrefUtil.getAPIPreferenceStore() - .getBoolean(IWorkbenchPreferenceConstants.RESCALING_AT_RUNTIME); + boolean rescaleAtRuntime = ConfigurationScope.INSTANCE.getNode(WorkbenchPlugin.PI_WORKBENCH) + .getBoolean(IWorkbenchPreferenceConstants.RESCALING_AT_RUNTIME, false); System.setProperty(SWT_RESCALE_AT_RUNTIME_PROPERTY, Boolean.toString(rescaleAtRuntime)); } } diff --git a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/dialogs/ViewsPreferencePage.java b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/dialogs/ViewsPreferencePage.java index cc76a5897fe..5f9e07422b0 100644 --- a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/dialogs/ViewsPreferencePage.java +++ b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/dialogs/ViewsPreferencePage.java @@ -39,6 +39,7 @@ import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.Platform.OS; import org.eclipse.core.runtime.RegistryFactory; +import org.eclipse.core.runtime.preferences.ConfigurationScope; import org.eclipse.core.runtime.preferences.DefaultScope; import org.eclipse.core.runtime.preferences.IEclipsePreferences; import org.eclipse.core.runtime.preferences.InstanceScope; @@ -218,8 +219,8 @@ private void createHiDPISettingsGroup(Composite parent) { infoLabel.setLayoutData(GridDataFactory.defaultsFor(infoLabel).create()); createLabel(group, ""); //$NON-NLS-1$ - boolean initialStateRescaleAtRuntime = PrefUtil.getAPIPreferenceStore() - .getBoolean(IWorkbenchPreferenceConstants.RESCALING_AT_RUNTIME); + boolean initialStateRescaleAtRuntime = ConfigurationScope.INSTANCE.getNode(WorkbenchPlugin.PI_WORKBENCH) + .getBoolean(IWorkbenchPreferenceConstants.RESCALING_AT_RUNTIME, false); rescaleAtRuntime = createCheckButton(group, WorkbenchMessages.RescaleAtRuntimeEnabled, initialStateRescaleAtRuntime); } @@ -373,10 +374,17 @@ public boolean performOk() { boolean isRescaleAtRuntimeChanged = false; if (rescaleAtRuntime != null) { - boolean initialStateRescaleAtRuntime = PrefUtil.getAPIPreferenceStore() - .getBoolean(IWorkbenchPreferenceConstants.RESCALING_AT_RUNTIME); + IEclipsePreferences configurationScopeNode = ConfigurationScope.INSTANCE + .getNode(WorkbenchPlugin.PI_WORKBENCH); + boolean initialStateRescaleAtRuntime = configurationScopeNode + .getBoolean(IWorkbenchPreferenceConstants.RESCALING_AT_RUNTIME, false); isRescaleAtRuntimeChanged = initialStateRescaleAtRuntime != rescaleAtRuntime.getSelection(); - apiStore.setValue(IWorkbenchPreferenceConstants.RESCALING_AT_RUNTIME, rescaleAtRuntime.getSelection()); + configurationScopeNode.putBoolean(IWorkbenchPreferenceConstants.RESCALING_AT_RUNTIME, + rescaleAtRuntime.getSelection()); + try { + configurationScopeNode.flush(); + } catch (BackingStoreException e) { + } } prefs.putBoolean(CTabRendering.USE_ROUND_TABS, useRoundTabs.getSelection());