public static void refreshVMPropertyList(boolean isClear) {
ProfileList.settingVMPropertyList();
- CheckingRunningEmulator.refreshVMPropertyList();
+ // check vm socket connection
RefreshWorker.refreshVMConnect();
+ // check running emulator list
+ CheckingRunningEmulator.refreshVMPropertyList();
if (isClear) {
tabFolder.getSelection().draw();
}
- // block other function while to create base image
- property.setRunning(true);
-
WorkerThread worker = new WorkerThread(property, path, useCompress);
worker.start();
}
});
- } finally {
- property.setRunning(false);
}
}
}
EMLogger.getLogger().info("Start creating new base image"
+ (useCompress ? " using compress." : "."));
+
+ // block other function while to create base image
+ CheckingRunningEmulator.addEmulator(property);
} finally {
// lock.release
WorkerLock.release();
propertyLockFile.delete();
}
+ CheckingRunningEmulator.removeEmulator(property, false);
EMLogger.getLogger().info("Success to create base image."
+ StringResources.NEW_LINE
+ "Base image path: " + baseImagePath);
emList.add(prop.getName());
}
}
- setRunning(prop, true);
+ setRunning(prop.getName(), true);
}
public static void removeEmulator(VMProperty prop, boolean isSuccess) {
emList.remove(prop.getName());
}
if (!isSuccess) {
- setRunning(prop, false);
+ setRunning(prop.getName(), false);
} else {
addLaunchedVMList(prop.getName());
boolean checkFinished;