settingImagePath(path);
initLastCreatedPropertyPath();
loadTemplate();
+ setOptionList(platform.loadOptionList(getItemList()));
}
public List<IOption> getOptionList() {
settingProperty(platform);
+ // TODO
initLastCreatedPropertyPath();
- loadProperty();
- createTemplate();
+ //loadProperty();
+ //createTemplate();
}
private void settingProperty(Platform platform) {
import java.io.FileFilter;
import java.io.IOException;
import java.util.ArrayList;
+import java.util.List;
import org.tizen.emulator.manager.logging.EMLogger;
import org.tizen.emulator.manager.plugin.EMPlugin;
import org.tizen.emulator.manager.vms.RESOLUTION;
import org.tizen.emulator.manager.vms.VMProperty;
import org.tizen.emulator.manager.vms.option.IOptionFactory;
+import org.tizen.emulator.manager.vms.xml.template.ItemList;
+import org.tizen.emulator.manager.vms.option.IOption;
public class Platform {
// platform name = profile + version = profile-version
}
}
+ // Load option list for each image.
+ public List<IOption> loadOptionList(ItemList itemTemplate) {
+ if (plugin != null) {
+ ExtensionItem exItem = getPlugin().getExtensionItem(PluginStringResources.OptionFactory);
+ IOptionFactory f = (IOptionFactory)(exItem.createClass());
+ if (f != null) {
+ return f.makeOptionList(itemTemplate);
+ }
+ }
+ return null;
+ }
+
private void loadProperties() {
if (platformPath == null) {
return;
private void makeItemList(Composite parent, ItemList templateList, boolean isCustom) {
IItemListFactory f = (IItemListFactory)(exItem.createClass());
itemList = new ArrayList<IInfoViewItem>();
- f.makeItemList(itemList, templateList, isCustom);
+ if (f != null) {
+ f.makeItemList(itemList, templateList, isCustom);
+ }
// itemList = f.getInfoItemList(deviceItemList);
}
IItemListFactory f = (IItemListFactory)(exItem.createClass());
itemList = new ArrayList<IModifyViewItem>();
// itemList = f.getModifyItemList(deviceItemList);
- f.makeItemList(itemList, deviceItemList, isCustom);
+ if (f != null) {
+ f.makeItemList(itemList, deviceItemList, isCustom);
+ }
}
private void makeCustomItemList(PModifyViewPage page, List<ItemList> list) {
private Creator(VMPropertyValue newVM) {
this.property = EmulatorVMList.getInstance().getNewProperty(newVM.vmsName);
+ this.property.setPropertyValue(newVM);
this.newVM = newVM;
this.folder = new File(FilePathResources.getVirtualTargetPath(newVM.vmsName));
import org.tizen.emulator.manager.EmulatorManager;
import org.tizen.emulator.manager.EmulatorManager.ManagerModeType;
import org.tizen.emulator.manager.logging.EMLogger;
-import org.tizen.emulator.manager.platform.PlatformList;
import org.tizen.emulator.manager.resources.FilePathResources;
import org.tizen.emulator.manager.resources.StringResources;
import org.tizen.emulator.manager.ui.VMsMainView;
import org.tizen.emulator.manager.vms.helper.VMLauncherException;
import org.tizen.emulator.manager.vms.helper.VMWorkerException;
import org.tizen.emulator.manager.vms.helper.WorkerLock;
-import org.tizen.emulator.manager.vms.xml.CpuType;
import org.tizen.emulator.manager.vms.option.IOption;
public class VMWorkerCommon {
}
// Do argument validation.
- List<IOption> optList = PlatformList.getOptionList(property);
+ List<IOption> optList = property.getPropertyValue().baseImage.getOptionList();
if (optList == null) {
throw new VMLauncherException("Failed to get option list.");
}
import java.util.Map;
import org.tizen.emulator.manager.logging.EMLogger;
-import org.tizen.emulator.manager.platform.PlatformList;
import org.tizen.emulator.manager.resources.FilePathResources;
import org.tizen.emulator.manager.resources.StringResources;
import org.tizen.emulator.manager.vms.VMProperty;
public static void createLaunchConfig(VMProperty property)
throws VMWorkerException {
// 1. Get option list which is matched with base-image.
- List<IOption> optList = PlatformList.getOptionList(property);
+ List<IOption> optList = property.getPropertyValue().baseImage.getOptionList();
if (optList == null) {
throw new VMWorkerException("Failed to get option list.");
}