import org.tizen.dynamicanalyzer.setting.SettingDataManager;
import org.tizen.dynamicanalyzer.swap.platform.BinarySettingManager;
import org.tizen.dynamicanalyzer.ui.toolbar.Toolbar;
+import org.eclipse.swt.widgets.Display;
+
public class AnalyzerPerspectiveListener extends PerspectiveAdapter {
private static boolean init = false;
@SuppressWarnings("unused")
SettingDataManager setting = SettingDataManager.INSTANCE;
- // initialize device connection
- DeviceManager.init();
- DeviceManager.addDeviceListener();
- DeviceManager.loadDevices();
-
- // initialize toolbar control state
- Toolbar.INSTANCE.updateDeviceCombo(null);
- Toolbar.INSTANCE.updateAppCombo(true);
+ Thread deviceinitthread = new Thread(new Runnable() {
+ public void run() {
+ Display.getDefault().syncExec(new Runnable() {
+ public void run() {
+ // initialize device connection
+ DeviceManager.init();
+ DeviceManager.addDeviceListener();
+ DeviceManager.loadDevices();
+
+ // initialize toolbar control state
+ Toolbar.INSTANCE.updateDeviceCombo(null);
+ Toolbar.INSTANCE.updateAppCombo(true);
+ }
+ });
+ }
+ });
+ deviceinitthread.start();
// initialize binary setting
BinarySettingManager.getInstance().initBinarySettings();