imagePath = checkImagePath(imagePath);
CustomPlatformImageValue value = new CustomPlatformImageValue(imagePath, basePlatform);
- platform = Platform.createCustomInstance(value);
+ platform = Platform.createTemporaryCustomInstance(value);
if (platform == null) {
throw new ConsoleException(Messages.getString("ConsoleCreateVM.PlatformError.3"));
}
import org.tizen.emulator.manager.logging.EMLogger;
import org.tizen.emulator.manager.platform.custom.CustomPlatform;
import org.tizen.emulator.manager.platform.custom.CustomPlatformImageValue;
+import org.tizen.emulator.manager.platform.custom.TemporaryCustomPlatform;
import org.tizen.emulator.manager.plugin.EMPlugin;
import org.tizen.emulator.manager.template.renewal.VMItem;
import org.tizen.emulator.manager.template.renewal.VMTemplate;
return platform;
}
+ public static Platform createTemporaryCustomInstance(CustomPlatformImageValue value) {
+ if (value == null || value.getPlatform() == null) {
+ return null;
+ }
+
+ Platform platform = new TemporaryCustomPlatform(value);
+
+ return platform;
+ }
+
private static List<Platform> platformList = new ArrayList<Platform>();
private synchronized static void addPlatform(Platform platform) {
return false;
}
+ @Override
+ public String toString() {
+ return getName();
+ }
+
public abstract Architecture getImageArch();
public abstract SKIN_SHAPE getImageSkinShape();
public abstract String getImageBinaryVersion();
public class CustomPlatform extends Platform {
- private Platform basePlatform = null;
+ protected Platform basePlatform = null;
public CustomPlatform(CustomPlatformImageValue value) {
setValue(value);
--- /dev/null
+package org.tizen.emulator.manager.platform.custom;
+
+
+public class TemporaryCustomPlatform extends CustomPlatform {
+ public TemporaryCustomPlatform(CustomPlatformImageValue value) {
+ super(value);
+ }
+
+ @Override
+ public String toString() {
+ return basePlatform.getName();
+ }
+}
configuration.getBaseInformation().setName(value.vmsName);
configuration.getBaseInformation().setArchitecture(value.getImageArch().toString());
- configuration.getBaseInformation().setPlatform(value.getPlatformName());
+ configuration.getBaseInformation().setPlatform(value.getPlatform().toString());
if (value.deviceName != null && !value.deviceName.isEmpty()) {
DeviceTemplateType device = new DeviceTemplateType();
if (basePlatform instanceof StandardPlatform) {
CustomPlatformImageValue value
= new CustomPlatformImageValue(getBaseImagePath(), basePlatform);
- newPlatform = Platform.createCustomInstance(value);
+ newPlatform = Platform.createTemporaryCustomInstance(value);
}
return newPlatform;