|
21 | 21 | import org.eclipse.swt.widgets.Shell;
|
22 | 22 |
|
23 | 23 | import org.eclipse.core.runtime.Assert;
|
| 24 | +import org.eclipse.core.runtime.Platform; |
24 | 25 | import org.eclipse.core.runtime.preferences.IEclipsePreferences;
|
| 26 | +import org.eclipse.core.runtime.preferences.IPreferencesService; |
25 | 27 | import org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener;
|
26 | 28 | import org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent;
|
27 | 29 | import org.eclipse.core.runtime.preferences.InstanceScope;
|
@@ -67,14 +69,15 @@ public class FindReplaceAction extends ResourceAction implements IUpdate {
|
67 | 69 | private static final String FIND_REPLACE_OVERLAY_AT_BOTTOM = "findReplaceOverlayAtBottom"; //$NON-NLS-1$
|
68 | 70 |
|
69 | 71 | private boolean shouldUseOverlay() {
|
70 |
| - IEclipsePreferences preferences = InstanceScope.INSTANCE.getNode(INSTANCE_SCOPE_NODE_NAME); |
71 |
| - boolean overlayPreference = preferences.getBoolean(USE_FIND_REPLACE_OVERLAY, true); |
| 72 | + IPreferencesService preferences = Platform.getPreferencesService(); |
| 73 | + boolean overlayPreference = preferences.getBoolean(INSTANCE_SCOPE_NODE_NAME, USE_FIND_REPLACE_OVERLAY, true, null); |
72 | 74 | return overlayPreference && fWorkbenchPart instanceof StatusTextEditor;
|
73 | 75 | }
|
74 | 76 |
|
75 | 77 | private static boolean shouldPositionOverlayOnTop() {
|
76 |
| - IEclipsePreferences preferences = InstanceScope.INSTANCE.getNode(INSTANCE_SCOPE_NODE_NAME); |
77 |
| - return !preferences.getBoolean(FIND_REPLACE_OVERLAY_AT_BOTTOM, false); |
| 78 | + IPreferencesService preferences = Platform.getPreferencesService(); |
| 79 | + boolean atBottom = preferences.getBoolean(INSTANCE_SCOPE_NODE_NAME, FIND_REPLACE_OVERLAY_AT_BOTTOM, false, null); |
| 80 | + return !atBottom; |
78 | 81 | }
|
79 | 82 |
|
80 | 83 | private IPreferenceChangeListener overlayDialogPreferenceListener = new IPreferenceChangeListener() {
|
|
0 commit comments