|
39 | 39 | import org.eclipse.core.runtime.Platform;
|
40 | 40 | import org.eclipse.core.runtime.Platform.OS;
|
41 | 41 | import org.eclipse.core.runtime.RegistryFactory;
|
| 42 | +import org.eclipse.core.runtime.preferences.ConfigurationScope; |
42 | 43 | import org.eclipse.core.runtime.preferences.DefaultScope;
|
43 | 44 | import org.eclipse.core.runtime.preferences.IEclipsePreferences;
|
44 | 45 | import org.eclipse.core.runtime.preferences.InstanceScope;
|
@@ -218,8 +219,8 @@ private void createHiDPISettingsGroup(Composite parent) {
|
218 | 219 | infoLabel.setLayoutData(GridDataFactory.defaultsFor(infoLabel).create());
|
219 | 220 | createLabel(group, ""); //$NON-NLS-1$
|
220 | 221 |
|
221 |
| - boolean initialStateRescaleAtRuntime = PrefUtil.getAPIPreferenceStore() |
222 |
| - .getBoolean(IWorkbenchPreferenceConstants.RESCALING_AT_RUNTIME); |
| 222 | + boolean initialStateRescaleAtRuntime = ConfigurationScope.INSTANCE.getNode(WorkbenchPlugin.PI_WORKBENCH) |
| 223 | + .getBoolean(IWorkbenchPreferenceConstants.RESCALING_AT_RUNTIME, false); |
223 | 224 | rescaleAtRuntime = createCheckButton(group, WorkbenchMessages.RescaleAtRuntimeEnabled, initialStateRescaleAtRuntime);
|
224 | 225 | }
|
225 | 226 |
|
@@ -373,10 +374,17 @@ public boolean performOk() {
|
373 | 374 |
|
374 | 375 | boolean isRescaleAtRuntimeChanged = false;
|
375 | 376 | if (rescaleAtRuntime != null) {
|
376 |
| - boolean initialStateRescaleAtRuntime = PrefUtil.getAPIPreferenceStore() |
377 |
| - .getBoolean(IWorkbenchPreferenceConstants.RESCALING_AT_RUNTIME); |
| 377 | + IEclipsePreferences configurationScopeNode = ConfigurationScope.INSTANCE |
| 378 | + .getNode(WorkbenchPlugin.PI_WORKBENCH); |
| 379 | + boolean initialStateRescaleAtRuntime = configurationScopeNode |
| 380 | + .getBoolean(IWorkbenchPreferenceConstants.RESCALING_AT_RUNTIME, false); |
378 | 381 | isRescaleAtRuntimeChanged = initialStateRescaleAtRuntime != rescaleAtRuntime.getSelection();
|
379 |
| - apiStore.setValue(IWorkbenchPreferenceConstants.RESCALING_AT_RUNTIME, rescaleAtRuntime.getSelection()); |
| 382 | + configurationScopeNode.putBoolean(IWorkbenchPreferenceConstants.RESCALING_AT_RUNTIME, |
| 383 | + rescaleAtRuntime.getSelection()); |
| 384 | + try { |
| 385 | + configurationScopeNode.flush(); |
| 386 | + } catch (BackingStoreException e) { |
| 387 | + } |
380 | 388 | }
|
381 | 389 |
|
382 | 390 | prefs.putBoolean(CTabRendering.USE_ROUND_TABS, useRoundTabs.getSelection());
|
|
0 commit comments