|
15 | 15 | package com.espressif.idf.debug.gdbjtag.openocd.dsf; |
16 | 16 |
|
17 | 17 | import ilg.gnumcueclipse.core.StringUtils; |
| 18 | +import ilg.gnumcueclipse.core.preferences.ScopedPreferenceStoreWithoutDefaults; |
18 | 19 | import ilg.gnumcueclipse.debug.gdbjtag.dsf.GnuMcuGdbServerBackend; |
19 | 20 |
|
20 | 21 | import org.eclipse.cdt.dsf.concurrent.RequestMonitor; |
21 | 22 | import org.eclipse.cdt.dsf.service.DsfSession; |
22 | 23 | import org.eclipse.core.runtime.CoreException; |
23 | 24 | import org.eclipse.core.runtime.IStatus; |
24 | 25 | import org.eclipse.core.runtime.Status; |
| 26 | +import org.eclipse.core.runtime.preferences.InstanceScope; |
25 | 27 | import org.eclipse.debug.core.ILaunchConfiguration; |
| 28 | +import org.eclipse.jface.preference.IPreferenceStore; |
26 | 29 | import org.osgi.framework.BundleContext; |
27 | 30 |
|
28 | 31 | import com.espressif.idf.debug.gdbjtag.openocd.Activator; |
29 | 32 | import com.espressif.idf.debug.gdbjtag.openocd.Configuration; |
| 33 | +import com.espressif.idf.ui.UIPlugin; |
30 | 34 |
|
31 | 35 | public class GdbServerBackend extends GnuMcuGdbServerBackend { |
32 | 36 |
|
33 | 37 | // ------------------------------------------------------------------------ |
34 | 38 |
|
35 | | -// protected int fGdbServerLaunchTimeout = 25; |
36 | 39 | protected boolean fDoStartGdbClient; |
37 | 40 |
|
38 | 41 | // ------------------------------------------------------------------------ |
@@ -139,7 +142,8 @@ public String getServerCommandName() { |
139 | 142 |
|
140 | 143 | @Override |
141 | 144 | public int getServerLaunchTimeoutSeconds() { |
142 | | - return Activator.getInstance().getPreferenceStore().getInt(Activator.GDB_SERVER_LAUNCH_TIMEOUT); |
| 145 | + IPreferenceStore preferenceStore = new ScopedPreferenceStoreWithoutDefaults(InstanceScope.INSTANCE, UIPlugin.PLUGIN_ID); |
| 146 | + return preferenceStore.getInt(Activator.GDB_SERVER_LAUNCH_TIMEOUT); |
143 | 147 | } |
144 | 148 |
|
145 | 149 | public String getServerName() { |
|
0 commit comments