// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2015.08.03 at 02:50:57 PM KST
+// Generated on: 2015.11.02 at 07:56:31 PM KST
//
-package org.tizen.emulator.manager.vms.xml.template2;
+package org.tizen.emulator.manager.vms.xml.template.v2;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2015.08.03 at 02:50:57 PM KST
+// Generated on: 2015.11.02 at 07:56:31 PM KST
//
-package org.tizen.emulator.manager.vms.xml.template2;
+package org.tizen.emulator.manager.vms.xml.template.v2;
import java.util.ArrayList;
import java.util.List;
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2015.08.03 at 02:50:57 PM KST
+// Generated on: 2015.11.02 at 07:56:31 PM KST
//
-package org.tizen.emulator.manager.vms.xml.template2;
+package org.tizen.emulator.manager.vms.xml.template.v2;
import java.util.ArrayList;
import java.util.List;
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2015.08.03 at 02:50:57 PM KST
+// Generated on: 2015.11.02 at 07:56:31 PM KST
//
-package org.tizen.emulator.manager.vms.xml.template2;
+package org.tizen.emulator.manager.vms.xml.template.v2;
import java.util.ArrayList;
import java.util.List;
"information",
"itemGroup"
})
-@XmlRootElement(name = "ItemList2")
-public class ItemList2 {
+@XmlRootElement(name = "ItemList")
+public class ItemList {
protected Information information;
protected List<ItemGroup> itemGroup;
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2015.08.03 at 02:50:57 PM KST
+// Generated on: 2015.11.02 at 07:56:31 PM KST
//
-package org.tizen.emulator.manager.vms.xml.template2;
+package org.tizen.emulator.manager.vms.xml.template.v2;
import javax.xml.bind.annotation.XmlRegistry;
/**
* This object contains factory methods for each
* Java content interface and Java element interface
- * generated in the org.tizen.emulator.manager.vms.xml.template2 package.
+ * generated in the org.tizen.emulator.manager.vms.xml.template.v2 package.
* <p>An ObjectFactory allows you to programatically
* construct new instances of the Java representation
* for XML content. The Java representation of XML
/**
- * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.tizen.emulator.manager.vms.xml.template2
+ * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.tizen.emulator.manager.vms.xml.template.v2
*
*/
public ObjectFactory() {
}
/**
- * Create an instance of {@link ItemList2 }
+ * Create an instance of {@link ItemList }
*
*/
- public ItemList2 createItemList2() {
- return new ItemList2();
+ public ItemList createItemList() {
+ return new ItemList();
}
/**
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2015.08.03 at 02:50:57 PM KST
+// Generated on: 2015.11.02 at 07:56:31 PM KST
//
-package org.tizen.emulator.manager.vms.xml.template2;
+package org.tizen.emulator.manager.vms.xml.template.v2;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2015.08.03 at 02:50:57 PM KST
+// Generated on: 2015.11.02 at 07:56:31 PM KST
//
@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.tizen.org/em/template", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
-package org.tizen.emulator.manager.vms.xml.template2;
+package org.tizen.emulator.manager.vms.xml.template.v2;
import org.tizen.emulator.manager.logging.EMLogger;
import org.tizen.emulator.manager.platform.baseimage.CustomBaseImageWorker;
+import org.tizen.emulator.manager.plugin.ExtensionItem;
import org.tizen.emulator.manager.plugin.PluginStringResources;
import org.tizen.emulator.manager.resources.FilePathResources;
import org.tizen.emulator.manager.resources.StringResources;
import org.tizen.emulator.manager.template.ITemplate;
+import org.tizen.emulator.manager.ui.renewal.dialoghandler.VMModifyHandler;
+import org.tizen.emulator.manager.ui.renewal.item.CommonItemListFactory;
+import org.tizen.emulator.manager.ui.renewal.item.IItemListFactory;
+import org.tizen.emulator.manager.ui.renewal.item.modify.common.ModifyDialogItem;
import org.tizen.emulator.manager.vms.SKIN_SHAPE;
import org.tizen.emulator.manager.vms.VMProperty;
import org.tizen.emulator.manager.vms.VMProperty.Architecture;
import org.tizen.emulator.manager.vms.helper.HelperClass;
import org.tizen.emulator.manager.vms.option.IOption;
+import org.tizen.emulator.manager.vms.xml.template.v2.ItemList;
public class BaseImage {
public static BaseImage createCustomBaseImage(Platform platform, String path, String name) {
private VMProperty defaultProperty;
private ITemplate itemTemplate;
- private List<IOption> optionList;
+ protected List<ModifyDialogItem> defaultItemList;
+ protected List<ModifyDialogItem> advancedItemList;
+
+
+
+ protected List<IOption> optionList;
//private LaunchConfig launchTemplate; // TODO replace xDefaultOption.java
// for custom base image
return optionList;
}
+
public VMProperty getDefaultProperty() {
return defaultProperty;
}
public void setWorker(CustomBaseImageWorker worker) {
this.worker = worker;
}
+
+ public List<ModifyDialogItem> getDefaultItemList() {
+ if (defaultItemList == null) {
+ makeItemList();
+ }
+
+ return defaultItemList;
+ }
+
+
+ public List<ModifyDialogItem> getAdvancedItemList() {
+ if (advancedItemList == null) {
+ makeItemList();
+ }
+
+ return advancedItemList;
+ }
+
+
+ private void makeItemList() {
+
+ ItemList template = platform.findTemplate(imageName);
+ if (template == null) {
+ // load template in {SRC_DIR}/xsd
+ template = VMModifyHandler.getTmpItemList(profile);
+ EMLogger.getLogger().warning("Fail to find template. Image : " + imageName);
+ EMLogger.getLogger().info("Use temp template.");
+ }
+
+ IItemListFactory f = null;
+ ExtensionItem exItem = getPlatform().getPlugin().getExtensionItem(PluginStringResources.ItemFactoryV2);
+ if (exItem != null) {
+ f = (IItemListFactory)(exItem.getInstance());
+ }
+ if (f == null) {
+ f = new CommonItemListFactory();
+ EMLogger.getLogger().warning("Fail to load ItemListFactory2.");
+ EMLogger.getLogger().info("Use CommonItemListFactory2.");
+ }
+ defaultItemList = f.makeDefaultItemList(template);
+ advancedItemList = f.makeAdvancedItemList(template);
+
+ }
+
+
}
import org.tizen.emulator.manager.resources.FilePathResources;
import org.tizen.emulator.manager.resources.StringResources;
import org.tizen.emulator.manager.template.ITemplate;
-import org.tizen.emulator.manager.template.TemplateLoader;
+import org.tizen.emulator.manager.template.renewal.TemplateLoader;
import org.tizen.emulator.manager.vms.RESOLUTION;
import org.tizen.emulator.manager.vms.SKIN_SHAPE;
import org.tizen.emulator.manager.vms.VMProperty;
+import org.tizen.emulator.manager.vms.xml.template.v2.ItemList;
public class Platform {
public static Platform createInstance(Profile profile, EMPlugin plugin) {
private VMProperty defaultProperty;
private ITemplate defaultItemTemplate;
+ // for new template
+ private final List<ItemList> templateList = new ArrayList<ItemList>();
+ private ItemList defaultTemplate;
+
// for custom base image
private ITemplate customItemTemplate;
loadSkins();
loadPlugin();
- TemplateLoader.load(this);
}
private String makingEmulatorDir() {
public void setCustomItemTemplate(ITemplate customItemTemplate) {
this.customItemTemplate = customItemTemplate;
}
+
+ public List<ItemList> getTemplateList() {
+ return templateList;
+ }
+
+ public void setDefaultTemplate(ItemList defaultTemplate) {
+ this.defaultTemplate = defaultTemplate;
+ }
+
+ public ItemList findTemplate(String imageName) {
+ if (templateList.size() == 0) {
+ TemplateLoader.load(this);
+ }
+
+ for (ItemList template : templateList) {
+ if (template.getInformation().getImage().equals(imageName)) {
+ return template;
+ }
+ }
+ return defaultTemplate;
+ }
}
// extension point
// org.tizen.emulator.manager.ui.detail.IItemListFactory
public final static String ItemFactory = "Item-Factory"; //$NON-NLS-1$
+ public final static String ItemFactoryV2 = "Item-Factory-v2"; //$NON-NLS-1$
// org.tizen.emulator.manager.ui.widgets.IVMButtonPainter
public final static String VMButtonPainter = "VMButton-Painter"; //$NON-NLS-1$
// org.tizen.emulator.manager.vms.IVMWorker
private final static String sdcard_suffix = File.separator + "sdcard"; //$NON-NLS-1$
private final static String skins_suffix = File.separator + "skins"; //$NON-NLS-1$
private final static String template_suffix = File.separator + "template"; //$NON-NLS-1$
- private final static String template2_suffix = File.separator + "template2"; //$NON-NLS-1$
private final static String plugins_suffix = File.separator + "plugins"; //$NON-NLS-1$
private final static String sdkdata_new_emulator_suffix = File.separator
// Platform
private static String platformSkinsPath;
private static String platformTemplatePath;
- private static String platformTemplate2Path;
private static String platformPluginsPath;
private static String platformImagesPath;
platformSkinsPath = resource_suffix + skins_suffix;
platformTemplatePath = resource_suffix + template_suffix;
- platformTemplate2Path = resource_suffix + template2_suffix;
platformPluginsPath = resource_suffix + plugins_suffix;
// SDB path
return platformTemplatePath;
}
- public static String getPlatformTemplate2Path() {
- return platformTemplate2Path;
- }
-
public static String getPlatformPluginsPath() {
return platformPluginsPath;
}
public static final String TOTAL_PROFILE = "all"; //$NON-NLS-1$
public static final String REG_EXP_SPLIT_COMMA = "\\s{0,},\\s{0,}"; //$NON-NLS-1$
+
+ public static final String XML_EXTENSION = ".xml";
}
import org.tizen.emulator.manager.plugin.EMPlugin;
import org.tizen.emulator.manager.ui.detail.item.IViewItem;
import org.tizen.emulator.manager.vms.option.IOption;
-import org.tizen.emulator.manager.vms.xml.template2.ItemList2;
+import org.tizen.emulator.manager.vms.xml.template.v2.ItemList;
public class Template2 implements ITemplate {
- private ItemList2 template;
+ private ItemList template;
@Override
public String getImageName() {
@Override
public Class<?> getXMLObjectType() {
- return ItemList2.class;
+ return ItemList.class;
}
@Override
public void setXMLObject(Object obj) {
- if (obj instanceof ItemList2) {
- template = (ItemList2)obj;
+ if (obj instanceof ItemList) {
+ template = (ItemList)obj;
}
}
private static boolean loadTemplateV2(Platform platform) {
File templateDir = new File(platform.getPlatformPath() + File.separator
- + FilePathResources.getPlatformTemplate2Path());
+ + FilePathResources.getPlatformTemplatePath());
if (!templateExist(templateDir)) {
return false;
}
--- /dev/null
+/*
+ * Emulator Manager
+ *
+ * Copyright (C) 2012 - 2015 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * JiHye Kim <jihye424.kim@samsung.com>
+ * Minkee Lee <minkee.lee@samsung.com>
+ * SeokYeon Hwang <syeon.hwang@samsung.com>
+ * Sangho Park <sangho1206.park@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.emulator.manager.template.renewal;
+
+import java.io.File;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Unmarshaller;
+import javax.xml.transform.stream.StreamSource;
+
+import org.tizen.emulator.manager.logging.EMLogger;
+import org.tizen.emulator.manager.platform.Platform;
+import org.tizen.emulator.manager.platform.PlatformStringResources;
+import org.tizen.emulator.manager.resources.FilePathResources;
+import org.tizen.emulator.manager.resources.StringResources;
+import org.tizen.emulator.manager.vms.EmulatorVMList;
+import org.tizen.emulator.manager.vms.VMProperty;
+import org.tizen.emulator.manager.vms.xml.template.v2.ItemList;
+
+public class TemplateLoader {
+
+ private static JAXBContext context;
+
+ /** load template for new-ui */
+ public static void load(Platform platform) {
+ // get template dir
+ File templateDir = new File(platform.getPlatformPath() + File.separator
+ + FilePathResources.getPlatformTemplatePath());
+ if (!templateExist(templateDir)) {
+ return;
+ }
+
+ // load template file, default file
+ for (File f : templateDir.listFiles()) {
+ if (!f.getName().endsWith(StringResources.XML_EXTENSION)) {
+ continue;
+ }
+ if (f.getName().contains(PlatformStringResources.TEMPLATE)) { // ui template file for detail view
+ ItemList template = loadTemplate(f);
+ if (template != null) {
+ if (!checkTemplate(template)) {
+ continue;
+ }
+ platform.getTemplateList().add(template);
+
+ // setting default item list
+ if (f.getName().contains(PlatformStringResources.STANDARD)) {
+ platform.setDefaultTemplate(template);
+ }
+
+ }
+
+ } else { // property file
+ EmulatorVMList vmList = EmulatorVMList.getInstance();
+ VMProperty defaultProperty = vmList.parseXML(f);
+ if (defaultProperty != null) {
+ platform.getPropertyList().add(defaultProperty);
+
+ // setting default property
+ if (f.getName().contains(PlatformStringResources.STANDARD)) {
+ platform.setDefaultProperty(defaultProperty);
+ }
+ }
+ }
+ }
+ }
+
+ private static boolean checkTemplate(ItemList template) {
+ if (template.getInformation() == null) {
+ return false;
+ }
+ if (template.getItemGroup() == null) {
+ return false;
+ }
+ if (template.getVersion() == null) {
+ return false;
+ }
+ return true;
+ }
+
+ private static boolean templateExist(File template) {
+ if (template == null || !template.exists() || !template.isDirectory()) {
+ return false;
+ }
+ return true;
+ }
+
+ public static ItemList loadTemplate (File f) {
+ @SuppressWarnings("rawtypes")
+ JAXBElement element = null;
+ JAXBContext context = getContext();
+ if (context != null) {
+ try {
+ Unmarshaller unmarshaller = context.createUnmarshaller();
+ element = unmarshaller.unmarshal(new StreamSource(f), ItemList.class);
+ } catch (JAXBException e) {
+ e.printStackTrace();
+ EMLogger.getLogger().warning("Can not load config file( " //$NON-NLS-1$
+ + f.getName() + ")" + StringResources.NEW_LINE + e.getMessage()); //$NON-NLS-1$
+ element = null;
+ }
+ if (element != null) {
+ return (ItemList)element.getValue();
+ }
+ }
+ return null;
+
+ }
+
+
+ private static JAXBContext getContext() {
+ if (context == null) {
+ try {
+ context = JAXBContext.newInstance(ItemList.class);
+ } catch (JAXBException e){
+ EMLogger.getLogger().warning(e.getMessage());
+ }
+ }
+ return context;
+ }
+}
import java.util.ArrayList;
import java.util.List;
+import org.tizen.emulator.manager.EmulatorManager;
import org.tizen.emulator.manager.logging.EMLogger;
import org.tizen.emulator.manager.ui.renewal.item.ItemName;
import org.tizen.emulator.manager.ui.renewal.item.ItemType;
import org.tizen.emulator.manager.ui.renewal.item.modify.common.SensorItem;
import org.tizen.emulator.manager.ui.renewal.item.modify.template.CameraItem;
import org.tizen.emulator.manager.vms.RESOLUTION;
-import org.tizen.emulator.manager.vms.xml.template2.Item;
-import org.tizen.emulator.manager.vms.xml.template2.ItemGroup;
-import org.tizen.emulator.manager.vms.xml.template2.ItemList2;
-import org.tizen.emulator.manager.vms.xml.template2.Option;
+import org.tizen.emulator.manager.vms.xml.template.v2.Item;
+import org.tizen.emulator.manager.vms.xml.template.v2.ItemGroup;
+import org.tizen.emulator.manager.vms.xml.template.v2.ItemList;
+import org.tizen.emulator.manager.vms.xml.template.v2.Option;
public class ItemListUtil {
/** Get UI item for device-template dialog. */
- public static List<ModifyDialogItem> getDeviceTemplateItemList(ItemList2 itemList2) {
+ public static List<ModifyDialogItem> getDeviceTemplateItemList(ItemList itemList2) {
if (itemList2 == null) {
return null;
}
return itemList;
}
+
+ public static List<ModifyDialogItem> getVMTemplateItemList(ItemList itemList2) {
+ List<ModifyDialogItem> itemList = new ArrayList<ModifyDialogItem>();
+ // TODO get plugin, getItemListFactory, makeItemList
+ return itemList;
+ }
+
private static void addItemList(ItemGroup group, List<ModifyDialogItem> itemList) {
String name;
String title;
dialogItem = new ProfileItem();
} else if (name.equals(ItemName.DISPLAY)) {
- dialogItem = new DisplayItem(getResolutionList(item));
+ dialogItem = new DisplayItem(null, getResolutionList(item));
} else if (name.equals(ItemName.PROCESSORS)) {
- dialogItem = new ProcessorItem();
+ dialogItem = new ProcessorItem(null);
} else if (name.equals(ItemName.RAM_SIZE)) {
- dialogItem = new RamSizeItem();
+ dialogItem = new RamSizeItem(null);
} else if (name.equals(ItemName.SENSOR)) {
- dialogItem = new SensorItem(getCheckBoxDataList(item));
+ dialogItem = new SensorItem(null, getCheckBoxDataList(item));
} else if (name.equals(ItemName.CONNECTIVITY)) {
- dialogItem = new ConnectivityItem(getCheckBoxDataList(item));
+ dialogItem = new ConnectivityItem(null, getCheckBoxDataList(item));
} else if (name.equals(ItemName.CAMERA)) {
dialogItem = new CameraItem(getCheckBoxDataList(item));
// check item type
if (type.equals(ItemType.CHECK_LABEL)) {
dialogItem = new CheckBoxItem(name, title, getCheckBoxNumColumn(item),
- getCheckBoxDataList(item));
+ null, getCheckBoxDataList(item));
}
if (dialogItem != null) {
itemList.add(dialogItem);
}
}
- private static final int DEFAULT_NUM_COLUMN = 3;
- private static int getCheckBoxNumColumn(Item item) {
+ public static final int DEFAULT_NUM_COLUMN = 3;
+ public static int getCheckBoxNumColumn(Item item) {
int numColumn = DEFAULT_NUM_COLUMN;
String str = getOption(item.getOption(), OptionName.NUM_COLUMN);
if (str != null) {
return numColumn;
}
- private static List<CheckItemData> getCheckBoxDataList(Item item) {
+ public static List<CheckItemData> getCheckBoxDataList(Item item) {
List<CheckItemData> dataList = new ArrayList<CheckItemData>();
for (Item subItem : item.getItem()) {
dataList.add(new CheckItemData(subItem.getName(), subItem.getTitle()));
}
- private static String getOption(List<Option> options, String optionName) {
+ public static String getOption(List<Option> options, String optionName) {
String option = null;
for (Option opt : options) {
if (opt.getName().equals(optionName)) {
return option;
}
- private static List<RESOLUTION> getResolutionList(Item item) {
+ public static List<RESOLUTION> getResolutionList(Item item) {
// get sub item(resolution item)
Item displayItem = getSubItem(item, ItemName.RESOLUTION);
if (displayItem == null) {
// get resolution list
List<RESOLUTION> list = new ArrayList<RESOLUTION>();
for (Option opt : displayItem.getOption()) {
+ if (checkExperimentalOption(opt)) {
+ continue;
+ }
String[] split = opt.getValue().split(","); //$NON-NLS-1$
if (split.length == 4) { // name, width, height, dpi
RESOLUTION resolution = null;
return list;
}
- private static Item getSubItem(Item item, String itemName) {
+ public static Item getSubItem(Item item, String itemName) {
for (Item subItem : item.getItem()) {
if (subItem.getName().equals(itemName)) {
return subItem;
return null;
}
+ public static boolean checkExperimentalOption(Option option) {
+ String attr = option.getAttr();
+ if (attr.equals(OptionName.EXPERIMENTAL) && !EmulatorManager.isInhouseMode() ) {
+ return true;
+ }
+ return false;
+ }
+
}
import org.tizen.emulator.manager.devices.DeviceTemplateValue;
import org.tizen.emulator.manager.logging.EMLogger;
import org.tizen.emulator.manager.resources.FilePathResources;
-import org.tizen.emulator.manager.template.TemplateLoader;
+import org.tizen.emulator.manager.template.renewal.TemplateLoader;
import org.tizen.emulator.manager.ui.renewal.MainDialog;
import org.tizen.emulator.manager.ui.renewal.dialog.DIALOG_MODE;
import org.tizen.emulator.manager.ui.renewal.dialog.DeviceTemplateModifyDialog;
import org.tizen.emulator.manager.ui.renewal.item.modify.comp.PropertyValue;
import org.tizen.emulator.manager.ui.renewal.item.modify.template.CameraItem;
import org.tizen.emulator.manager.vms.RESOLUTION;
-import org.tizen.emulator.manager.vms.xml.template2.ItemList2;
+import org.tizen.emulator.manager.vms.xml.template.v2.ItemList;
public class DeviceTemplateDialogHandler {
// 1. use xml in deploy path.
String filePath = getTemplatePath(profile);
- ItemList2 itemList2 = loadItemList(new File(filePath));
+ ItemList itemList2 = loadItemList(new File(filePath));
if (itemList2 == null) {
// 2. use default xml. (in source)
filePath = getDefaultTemplatePath(profile);
}
- private static ItemList2 loadItemList(File file) {
+ private static ItemList loadItemList(File file) {
if (!file.exists()) {
return null;
}
- return (ItemList2)TemplateLoader.loadTemplate(file, ItemList2.class);
+ return TemplateLoader.loadTemplate(file);
}
itemList.add(new NameItem("name", "Device Name"));
itemList.add(new ProfileItem());
- itemList.add(new DisplayItem(new ArrayList<RESOLUTION>()));
- itemList.add(new RamSizeItem());
- itemList.add(new ProcessorItem());
- itemList.add(new SensorItem(new ArrayList<CheckItemData>()));
- itemList.add(new ConnectivityItem(new ArrayList<CheckItemData>()));
+ itemList.add(new DisplayItem(null, new ArrayList<RESOLUTION>()));
+ itemList.add(new RamSizeItem(null));
+ itemList.add(new ProcessorItem(null));
+ itemList.add(new SensorItem(null, new ArrayList<CheckItemData>()));
+ itemList.add(new ConnectivityItem(null, new ArrayList<CheckItemData>()));
itemList.add(new CameraItem(new ArrayList<CheckItemData>()));
return itemList;
package org.tizen.emulator.manager.ui.renewal.dialoghandler;
+import java.io.File;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.swt.SWT;
+import org.tizen.emulator.manager.platform.BaseImage;
+import org.tizen.emulator.manager.template.renewal.TemplateLoader;
import org.tizen.emulator.manager.ui.renewal.MainDialog;
import org.tizen.emulator.manager.ui.renewal.dialog.DIALOG_MODE;
import org.tizen.emulator.manager.ui.renewal.dialog.VMModifyDialog;
import org.tizen.emulator.manager.ui.renewal.item.modify.vm.HWSupportItem;
import org.tizen.emulator.manager.vms.VMProperty;
import org.tizen.emulator.manager.vms.VMPropertyValue;
+import org.tizen.emulator.manager.vms.xml.template.v2.ItemList;
public class VMModifyHandler {
VMPropertyValue newValue = property.getPropertyValue().clone();
dialog.create(newValue, getItemList(property));
- // TODO set display value to dialog
int retValue = dialog.open();
if (retValue == SWT.OK) {
}
private static List<ModifyDialogItem> getItemList(VMProperty property) {
- // TODO make item list using Image's item-template
- return getTmpItemList();
+ BaseImage baseImage = property.getPropertyValue().baseImage;
+ if (baseImage == null) {
+ return getTmpItemList();
+ }
+
+ List<ModifyDialogItem> itemList = new ArrayList<ModifyDialogItem>();
+ if (baseImage.getDefaultItemList() != null) {
+ itemList.addAll(baseImage.getDefaultItemList());
+ }
+ if (baseImage.getAdvancedItemList() != null) {
+ itemList.addAll(baseImage.getAdvancedItemList());
+ }
+ return itemList;
}
}
+ public static ItemList getTmpItemList(String profile) {
+
+ File f = new File("xsd" + File.separator
+ + "x86-standard-template" + "-" + profile + ".xml");
+ if (!f.exists()) {
+ f = new File("xsd" + File.separator
+ + "x86-standard-template.xml");
+ }
+ System.out.println("get temp template xml : " + f.getName());
+
+ return TemplateLoader.loadTemplate(f);
+
+ }
}
--- /dev/null
+/*
+ * Emulator Manager
+ *
+ * Copyright (C) 2015 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Minkee Lee <minkee.lee@samsung.com>
+ * JiHye Kim <jihye424.kim@samsung.com>
+ * SeokYeon Hwang <syeon.hwang@samsung.com>
+ * Sangho Park <sangho1206.park@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.emulator.manager.ui.renewal.item;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.tizen.emulator.manager.EmulatorManager;
+import org.tizen.emulator.manager.resources.StringResources;
+import org.tizen.emulator.manager.ui.detail.item.OptionType;
+import org.tizen.emulator.manager.ui.renewal.dialog.ItemListUtil;
+import org.tizen.emulator.manager.ui.renewal.item.modify.common.ConnectivityItem;
+import org.tizen.emulator.manager.ui.renewal.item.modify.common.DisplayItem;
+import org.tizen.emulator.manager.ui.renewal.item.modify.common.ImageItem;
+import org.tizen.emulator.manager.ui.renewal.item.modify.common.ModifyDialogItem;
+import org.tizen.emulator.manager.ui.renewal.item.modify.common.NameItem;
+import org.tizen.emulator.manager.ui.renewal.item.modify.common.ProcessorItem;
+import org.tizen.emulator.manager.ui.renewal.item.modify.common.ProfileItem;
+import org.tizen.emulator.manager.ui.renewal.item.modify.common.RamSizeItem;
+import org.tizen.emulator.manager.ui.renewal.item.modify.common.SensorItem;
+import org.tizen.emulator.manager.ui.renewal.item.modify.comp.TreeModifyItem;
+import org.tizen.emulator.manager.ui.renewal.item.modify.vm.DeviceTemplateItem;
+import org.tizen.emulator.manager.ui.renewal.item.modify.vm.FileSharingItem;
+import org.tizen.emulator.manager.ui.renewal.item.modify.vm.HWSupportItem;
+import org.tizen.emulator.manager.vms.xml.template.v2.Item;
+import org.tizen.emulator.manager.vms.xml.template.v2.ItemGroup;
+import org.tizen.emulator.manager.vms.xml.template.v2.ItemList;
+import org.tizen.emulator.manager.vms.xml.template.v2.Option;
+
+public class CommonItemListFactory implements IItemListFactory{
+
+ @Override
+ public List<ModifyDialogItem> makeDefaultItemList(ItemList template) {
+ List<ModifyDialogItem> itemList = new ArrayList<ModifyDialogItem>();
+ ItemGroup group = getDefaultItemGroup(template);
+ if (group == null) {
+ return itemList;
+ }
+
+ addItems(group.getItem(), itemList);
+ return itemList;
+ }
+
+
+ @Override
+ public List<ModifyDialogItem> makeAdvancedItemList(ItemList template) {
+ List<ModifyDialogItem> itemList = new ArrayList<ModifyDialogItem>();
+ ItemGroup group = getAdvancedItemGroup(template);
+ if (group == null) {
+ return itemList;
+ }
+
+ addItems(group.getItem(), itemList);
+ return itemList;
+ }
+
+ public void addItems(List<Item> items, List<ModifyDialogItem> itemList) {
+ for (Item item : items) {
+ if (checkExperimental(item)) {
+ continue;
+ }
+ if (!isSupportOS(item)) {
+ continue;
+ }
+ addItem(item, itemList);
+ }
+ }
+
+
+ public ItemGroup getDefaultItemGroup(ItemList template) {
+ for (ItemGroup group : template.getItemGroup()) {
+ if (group.getName().equals(ItemName.GROUP_DEFAULT)) {
+ return group;
+ }
+ }
+ return null;
+ }
+
+ public ItemGroup getAdvancedItemGroup(ItemList template) {
+ for (ItemGroup group : template.getItemGroup()) {
+ if (group.getName().equals(ItemName.GROUP_ADVANCED)) {
+ return group;
+ }
+ }
+ return null;
+ }
+
+
+ /** Subclass in each plugin can should override this
+ * if they has own item */
+ protected TreeModifyItem treeRoot = null;
+ public void addItem(Item item, List<ModifyDialogItem> itemList) {
+ if (item == null) {
+ return;
+ }
+
+ String name = item.getName();
+ String title = item.getTitle();
+
+
+ if (name.equals(ItemName.NAME)) {
+ itemList.add(new NameItem(name, title));
+
+ } else if (name.equals(ItemName.PROFILE)) {
+ itemList.add(new ProfileItem());
+
+ } else if (name.equals(ItemName.BASE_IMAGE)) {
+ itemList.add(new ImageItem());
+
+ } else if (name.equals(ItemName.DEVICE_TEMPLATE)) {
+ DeviceTemplateItem deviceItem = new DeviceTemplateItem();
+ treeRoot = deviceItem.getTreeRoot();
+ itemList.add(deviceItem);
+ // add sub items
+ addItems(item.getItem(), itemList);
+
+ } else if (name.equals(ItemName.DISPLAY)) {
+ itemList.add(new DisplayItem(treeRoot, ItemListUtil.getResolutionList(item)));
+
+ } else if (name.equals(ItemName.RAM_SIZE)) {
+ itemList.add(new RamSizeItem(treeRoot));
+
+ } else if (name.equals(ItemName.PROCESSORS)) {
+ itemList.add(new ProcessorItem(treeRoot));
+
+ } else if (name.equals(ItemName.SENSOR)) {
+ itemList.add(new SensorItem(treeRoot, ItemListUtil.getCheckBoxDataList(item)));
+
+ } else if (name.equals(ItemName.CONNECTIVITY)) {
+ itemList.add(new ConnectivityItem(treeRoot, ItemListUtil.getCheckBoxDataList(item)));
+
+ } else if (name.equals(ItemName.FILE_SHARE)) {
+ itemList.add(new FileSharingItem());
+
+ } else if (name.equals(ItemName.HW_SUPPORT)) {
+ itemList.add(new HWSupportItem());
+
+ }
+
+ }
+
+
+ public static boolean checkExperimental(Item item) {
+ boolean isExperimentalItem = false;
+ for (Option opt : item.getOption()) {
+ if (opt.getName().equals(OptionType.EXPERIMENTAL.getName())) {
+ if (opt.getValue().equals(OptionType.VALUE_TRUE)) {
+ isExperimentalItem = true;
+ }
+ }
+ }
+ return isExperimentalItem && !EmulatorManager.isInhouseMode();
+ }
+
+ public static boolean isSupportOS(Item item) {
+ boolean isSupportOS = true;
+ for (Option opt : item.getOption()) {
+ if (opt.getName().equals(OptionType.SUPPORT_OS.getName())) {
+ List<String> osList = Arrays.asList(opt.getValue().trim().
+ split(StringResources.REG_EXP_SPLIT_COMMA));
+
+ if (EmulatorManager.isWin() && !osList.contains(OptionType.WIN)) {
+ isSupportOS = false;
+ }
+ if (EmulatorManager.isLinux() && !osList.contains(OptionType.LINUX)) {
+ isSupportOS = false;
+ }
+ if (EmulatorManager.isMac() && !osList.contains(OptionType.MAC)) {
+ isSupportOS = false;
+ }
+ }
+ }
+ return isSupportOS;
+ }
+}
--- /dev/null
+/*
+ * Emulator Manager
+ *
+ * Copyright (C) 2015 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Minkee Lee <minkee.lee@samsung.com>
+ * JiHye Kim <jihye424.kim@samsung.com>
+ * SeokYeon Hwang <syeon.hwang@samsung.com>
+ * Sangho Park <sangho1206.park@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.emulator.manager.ui.renewal.item;
+
+import java.util.List;
+
+import org.tizen.emulator.manager.ui.renewal.item.modify.common.ModifyDialogItem;
+import org.tizen.emulator.manager.vms.xml.template.v2.ItemList;
+
+public interface IItemListFactory {
+ public List<ModifyDialogItem> makeDefaultItemList(ItemList template);
+ public List<ModifyDialogItem> makeAdvancedItemList(ItemList template);
+}
package org.tizen.emulator.manager.ui.renewal.item;
public class ItemName {
+ public static final String GROUP_DEFAULT = "default";
+ public static final String GROUP_ADVANCED = "advanced";
public static final String NAME = "name"; //$NON-NLS-1$
public static final String PROFILE = "profile"; //$NON-NLS-1$
public static final String BASE_IMAGE = "baseImage"; //$NON-NLS-1$
public static final String FILE_SHARE = "fileShare"; //$NON-NLS-1$
public static final String HW_SUPPORT = "hwSupport"; //$NON-NLS-1$
public static final String PROCESSORS = "processors"; //$NON-NLS-1$
+ public static final String DEVICE_TEMPLATE = "deviceTemplate";
public static final String CONNECTIVITY = "connectivity";
public static final String SENSOR = "sensor"; //$NON-NLS-1$
public class OptionName {
public static final String NUM_COLUMN = "numColumn";
+ public static final String EXPERIMENTAL = "experimental";
}
super(name, title, ItemType.CHECK_LABEL);
this.numColumns = numColomn;
this.dataList = dataList;
- initSubTreeItem(treeRoot);
+ if (treeRoot == null) {
+ init();
+
+ } else {
+ initSubTreeItem(treeRoot);
+ }
}
return dataList;
}
- public CheckBoxItem(String name, String title, int numColomn,
- List<CheckItemData> dataList) {
- super(name, title, ItemType.CHECK_LABEL);
- this.numColumns = numColomn;
- this.dataList = dataList;
- init();
- }
private void initSubTreeItem(TreeModifyItem treeRoot) {
initDataList();
public ModifyDialogItem cloneItem() {
List<CheckItemData> dataList = new ArrayList<CheckItemData>();
dataList.addAll(this.dataList);
- return new CheckBoxItem(getName(), getTitle(), numColumns, dataList);
+ return new CheckBoxItem(getName(), getTitle(), numColumns, null, dataList);
}
super(NAME, TITLE, NUM_COLUMN, treeRoot, dataList);
}
- public ConnectivityItem(List<CheckItemData> dataList) {
- super(NAME, TITLE, NUM_COLUMN, dataList);
- }
-
@Override
public void create(Composite parent) {
/** constructor for tree sub item */
public DisplayItem(TreeModifyItem treeRoot, List<RESOLUTION> resList) {
super(NAME, TITLE);
- item = new SubTreeModifyItem(this, treeRoot);
- item.setItemHeight(ROW_HEIGHT * ROW_NUM + ModifyItem.LINE_WIDTH);
- treeRoot.addSubItem((SubTreeModifyItem)item);
+ if (treeRoot == null) {
+ item = new ModifyItem();
+ item.setItemHeight(ROW_HEIGHT * ROW_NUM);
+ } else {
+ item = new SubTreeModifyItem(this, treeRoot);
+ item.setItemHeight(ROW_HEIGHT * ROW_NUM + ModifyItem.LINE_WIDTH);
+ treeRoot.addSubItem((SubTreeModifyItem)item);
+
+ }
resolutionItem = new ResolutionSubItem(this, resList);
skinItem = new SkinSubItem(this);
}
- public DisplayItem(List<RESOLUTION> resList) {
- super(NAME, TITLE);
- item = new ModifyItem();
- item.setItemHeight(ROW_HEIGHT * ROW_NUM);
-
- resolutionItem = new ResolutionSubItem(this, resList);
- skinItem = new SkinSubItem(this);
- }
-
@Override
public ModifyDialogItem cloneItem() {
List<RESOLUTION> resList = new ArrayList<RESOLUTION>();
if (resolutionItem.getResolutionList() != null) {
resList.addAll(resolutionItem.getResolutionList());
}
- return new DisplayItem(resList);
+ return new DisplayItem(null, resList);
}
/** constructor for tree sub item */
public ProcessorItem(TreeModifyItem treeRoot) {
super(NAME, TITLE);
- item = new SubTreeModifyItem(this,treeRoot);
- treeRoot.addSubItem((SubTreeModifyItem)item);
- }
+ if (treeRoot == null) {
+ item = new ModifyItem();
- public ProcessorItem() {
- super(NAME, TITLE);
- item = new ModifyItem();
+ } else {
+ item = new SubTreeModifyItem(this,treeRoot);
+ treeRoot.addSubItem((SubTreeModifyItem)item);
+ }
}
+
@Override
public void create(Composite parent) {
item.init(parent);
@Override
public ModifyDialogItem cloneItem() {
// TODO ProcessorItem(TreeModifyItem treeRoot) ??
- return new ProcessorItem();
+ return new ProcessorItem(null);
}
/** constructor for tree sub item */
public RamSizeItem(TreeModifyItem treeRoot) {
super(NAME, TITLE);
- item = new SubTreeModifyItem(this,treeRoot);
- treeRoot.addSubItem((SubTreeModifyItem)item);
- }
+ if (treeRoot == null) {
+ item = new ModifyItem();
- public RamSizeItem() {
- super(NAME, TITLE);
- item = new ModifyItem();
+ } else {
+ item = new SubTreeModifyItem(this,treeRoot);
+ treeRoot.addSubItem((SubTreeModifyItem)item);
+ }
}
@Override
public ModifyDialogItem cloneItem() {
// TODO RamSizeItem(TreeModifyItem treeRoot) ??
- return new RamSizeItem();
+ return new RamSizeItem(null);
}
}
- public SensorItem(List<CheckItemData> dataList) {
- super(NAME, TITLE, NUM_COLUMN, dataList);
- }
-
-
@Override
public void create(Composite parent) {
item.init(parent);
public CameraItem(List<CheckItemData> dataList) {
- super(NAME, TITLE, NUM_COLUMN, dataList);
+ super(NAME, TITLE, NUM_COLUMN, null, dataList);
}
<item name="size" title="Size" type="textInput" />
<item name="skin" title="Skin" type="combo"/>
</item>
- <item name="processors" title="Processorse" type="combo" />
+ <item name="processors" title="Processors" type="combo" />
<item name="ramSize" title="Ram" type="combo" >
<option name="list">512,768,1024</option>
</item>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.tizen.org/em/template"
xmlns:em-template="http://www.tizen.org/em/template" elementFormDefault="qualified">
- <element name="ItemList2">
+ <element name="ItemList">
<complexType>
<sequence>
<element name="information" type="em-template:information" minOccurs="0" maxOccurs="1"/>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-
-<!-- This file describes dialog for device template create/modify -->
-
-<ItemList xmlns="http://www.tizen.org/em/template" version="2.0">
- <information profile="mobile" />
-
- <itemGroup name="default">
- <item name="name" title="Device Name" type="textInput"/>
- <item name="profile" title="Profile"/>
- <item name="display" title="Display" type="label">
- <item name="resolution" title="Resolution" type="combo">
- <!-- name, width, height, dpi -->
- <option name="320"> ,320,320,316 </option>
- <option name="hvga"> HVGA,320,480,160 </option>
- <option name="wvga"> WVGA,480,800,233 </option>
- <option name="wsvga"> WSVGA,600,1024,207 </option>
- <option name="WSVGA"> WSVGA,600,1024,207 </option>
- <option name="qhd"> qHD,540,960,220 </option>
- <option name="hd"> HD,720,1280,306 </option>
- <option name="WXGA"> WXGA,1280,800,300 </option>
- <option name="WQXGA"> WQXGA,2560,1600,301 </option>
- <option name="FULLHD"> FULLHD,1080,1920,314 </option>
- </item>
- <item name="size" title="Size" type="textInput" />
- <item name="skin" title="Skin" type="combo"/>
- </item>
- <item name="processors" title="Processorse" type="combo" />
- <item name="ramSize" title="Ram" type="combo" >
- <option name="list">512,768,1024</option>
- </item>
-
- <item name="sensor" title="Sensor" type="checkLabel" >
- <item name="accel" title="Accelerometer" type="checkbox" />
- <item name="gyro" title="Gyroscope" type="checkbox" />
- <item name="geo" title="Geo-magnetic" type="checkbox" />
- <item name="proxi" title="Proximity" type="checkbox"/>
- <item name="light" title="Light" type="checkbox"/>
- <item name="haptic" title="Haptic" type="checkbox"/>
- <item name="press" title="Pressure" type="checkbox"/>
- <item name="uv" title="Ultraviolet" type="checkbox"/>
- <item name="hrm" title="Heartbeat Rate" type="checkbox"/>
- <item name="test" title="Test"/>
- <option name="numColumn">3</option>
- </item>
- <item name="connectivity" title="Connectivity" type="checkLabel">
- <item name="nfc" title="NFC" type="checkbox" />
- <option name="numColumn">3</option>
- </item>
- <item name="camera" title="Camera" type="checkLabel">
- <item name="rear" title="Rear" type="checkbox" />
- <item name="front" title="Front" type="checkbox" />
- <option name="numColumn">2</option>
- </item>
- </itemGroup>
-
-</ItemList>
-
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+
+<!-- This file describes component of VM property UI in Emulator manager.
+ (VM property UI descriptor)
+ Each element in this file is matched with an item of vm property UI. -->
+
+<ItemList xmlns="http://www.tizen.org/em/template" version="2.0">
+ <information profile="mobile" version="2.4" image="x86-standard"/>
+
+ <itemGroup name="default">
+ <item name="vmName" title="VM Name" type="textInput"/>
+ <item name="profile" title="Profile"/>
+ <item name="baseImage" title="Base Image"/>
+ <item name="deviceTemplate" title="Device" type="treeRoot">
+ <item type="label" name="display" title="Display">
+ <item name="resolution" title="Resolution" type="combo" >
+ <!-- name, width, height, dpi -->
+ <option name="320" attr="experimental"> ,320,320,316 </option>
+ <option name="hvga" attr="experimental"> HVGA,320,480,160 </option>
+ <option name="wvga"> WVGA,480,800,233 </option>
+ <option name="WSVGA" attr="experimental"> WSVGA,600,1024,207 </option>
+ <option name="qhd"> qHD,540,960,220 </option>
+ <option name="hd"> HD,720,1280,306 </option>
+ <option name="WXGA" attr="experimental"> WXGA,1280,800,300 </option>
+ <option name="WQXGA" attr="experimental"> WQXGA,2560,1600,301 </option>
+ <option name="FULLHD" attr="experimental"> FULLHD,1080,1920,314 </option>
+ </item>
+ <item name="size" title="Size" type="textInput" />
+ <item name="skin" title="Skin" type="combo" />
+ </item>
+ <item name="processors" title="Processors" type="combo" />
+ <item name="ramSize" title="Ram" type="combo" >
+ <option name="useConfig">false</option>
+ <option name="list">512,768,1024</option>
+ </item>
+ <item name="sensor" title="Sensor" type="checkLabel" >
+ <item name="accel" title="Accelerometer" type="checkbox" />
+ <item name="gyro" title="Gyroscope" type="checkbox" />
+ <item name="geo" title="Geo-magnetic" type="checkbox" />
+ <item name="proxi" title="Proximity" type="checkbox"/>
+ <item name="light" title="Light" type="checkbox"/>
+ <item name="haptic" title="Haptic" type="checkbox"/>
+ <item name="press" title="Pressure" type="checkbox"/>
+ <item name="uv" title="Ultraviolet" type="checkbox"/>
+ <item name="hrm" title="Heartbeat Rate" type="checkbox"/>
+ <option name="numColumn">2</option>
+ </item>
+ <item name="connectivity" title="Connectivity" type="checkLabel">
+ <item name="nfc" title="NFC" type="checkbox" />
+ <option name="numColumn">2</option>
+ </item>
+ <item name="camera" title="Camera" type="checkLabel">
+ <item name="rear" title="Rear" type="checkbox" />
+<!-- <item name="front" title="Front" type="checkbox" /> -->
+ <option name="numColumn">2</option>
+ </item>
+ </item>
+ </itemGroup>
+<!-- <item type="label" name="camera" title="Camera"> -->
+<!-- <item type="combo" name="frontType" title="Front"/> -->
+<!-- <item type="file" name="frontImage" title="(image)"/> -->
+<!-- <item type="combo" name="rearType" title="Rear"/> -->
+<!-- <item type="file" name="rearImage" title="(image)"/> -->
+
+
+ <itemGroup name="advanced">
+ <item name="suspendSupport" title="Suspend" type="toggle" >
+ <option name="experimental">true</option>
+ </item>
+ <item type="combo" name="maxTouch" title="Max Touch Point"/>
+ <item name="fileShare" title="File Sharing" type="file">
+ <option name="dialogType">directory</option>
+ </item>
+ <item name="network" title="Network" type="label">
+ <item name="proxy" title="Proxy" type="combo" >
+ <option name="none">No proxy</option>
+ <option name="auto">Use host proxy</option>
+ <option name="manual">Use manual proxy</option>
+ <option name="defaultOnCreate">auto</option>
+ </item>
+ <item name="netConnectType" type="combo" title="Connect Type">
+ <option name="list">NAT, Bridge</option>
+ </item>
+ <item name="netTapDevice" type="combo" title="Base Network">
+ <option name="supportOS">mac,linux</option>
+ </item>
+ <item name="netTapDevice" type="combo" title="Tap Device">
+ <option name="supportOS">win</option>
+ </item>
+ <item name="netIpInfo" title="VM IP info" type="subLabel">
+ <item name="useDHCP" title="Use DHCP" type="checkbox" >
+ <option name="defaultOnCreate">off</option>
+ </item>
+ <item name="ipAddr" title="IP Address" type="text" />
+ <item name="subnet" title="Subnet" type="text"/>
+ <item name="gateway" title="Gateway" type="text"/>
+ </item>
+ <item name="netDns" type="text" title="DNS" />
+ <item name="netMac" type="text" title="MAC" />
+ </item>
+ <item name="hwSupport" title="HW Support" type="label" >
+ <item name="cpu" title="CPU VT" type="toggle" />
+ <item name="gpu" title="GPU" type="toggle" />
+ </item>
+ <item name="glVersion" title="OpenGL ES Ver" type="combo">
+ <option name="v2.0_v3.0">v2.0 & v3.0</option>
+ <option name="v1.1_v2.0">v1.1 & v2.0</option>
+ <option name="supportOS">mac</option>
+ </item>
+ <item name="viewer" title="Viewer" type="label" >
+ <item name="type" title="Type" type="combo">
+ <option name="list">Native, Web</option>
+ <option name="experimental">true</option>
+ <option name="defaultOnCreate">Native</option>
+ </item>
+ </item>
+ </itemGroup>
+
+</ItemList>
+
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-
-<!-- This file describes component of VM property UI in Emulator manager.
- (VM property UI descriptor)
- Each element in this file is matched with an item of vm property UI. -->
-
-<ItemList xmlns="http://www.tizen.org/em/template" version="2.0">
- <information profile="mobile" version="2.4" image="x86-standard"/>
-
- <itemGroup name="default">
- <item type="text" name="vmName" title="Name"/>
- <item type="file" name="baseImage" title="Base Image">
- <option name="dialogType">file</option>
- </item>
- <item type="label" name="display" title="Display">
- <item type="combo" name="resolution" title="Resolution">
- <!-- name, width, height, dpi -->
- <option name="320" attr="experimental"> ,320,320,316 </option>
- <option name="hvga" attr="experimental"> HVGA,320,480,160 </option>
- <option name="wvga"> WVGA,480,800,233 </option>
- <option name="wsvga"> WSVGA,600,1024,207 </option>
- <option name="WSVGA" attr="experimental"> WSVGA,600,1024,207 </option>
- <option name="qhd"> qHD,540,960,220 </option>
- <option name="hd"> HD,720,1280,306 </option>
- <option name="WXGA" attr="experimental"> WXGA,1280,800,300 </option>
- <option name="WQXGA" attr="experimental"> WQXGA,2560,1600,301 </option>
- <option name="FULLHD" attr="experimental"> FULLHD,1080,1920,314 </option>
- </item>
- <item type="spinner" name="dpi" title="Density"/>
- <item type="combo" name="skin" title="Skin"/>
- </item>
- <item type="combo" name="processors" title="Processors" />
- <item type="combo" name="ramSize" title="RAM Size">
- <option name="list">512,768,1024</option>
- </item>
- <item type="toggle" name="suspendSupport" title="Suspend">
- <option name="experimental">true</option>
- </item>
-<!-- <item type="combo" name="maxTouch" title="Max Touch Point"/> -->
- <item type="label" name="fileShare" title="File Sharing">
- <item type="toggle" name="share" title="Sharing"/>
- <item type="file" name="directory" title="Directory">
- <option name="dialogType">directory</option>
- </item>
- </item>
- <item type="label" name="hwSupport" title="HW Support">
- <item type="toggle" name="cpu" title="CPU VT"/>
- <item type="toggle" name="gpu" title="GPU"/>
- </item>
- <item type="combo" name="glVersion" title="OpenGL ES Ver">
- <option name="v2.0_v3.0">v2.0 & v3.0</option>
- <option name="v1.1_v2.0">v1.1 & v2.0</option>
- <option name="supportOS">mac</option>
- </item>
-
- <item name="kernel" type="hidden"/>
- <item name="default" type="hidden"/>
- <item name="remote" type="hidden"/>
- <item name="maxTouch" type="hidden"/>
- <item name="power" type="hidden"/>
- </itemGroup>
-
-<!-- Followings are drawn as check box in Emulator Manager vm property UI.-->
- <itemGroup name="advanced">
- <item type="lineLabel" name="advancedOption" title="Advanced Option"/>
- <item type="label" name="camera" title="Camera">
-<!-- <item type="combo" name="frontType" title="Front"/> -->
-<!-- <item type="file" name="frontImage" title="(image)"/> -->
- <item type="combo" name="rearType" title="Rear"/>
- <item type="file" name="rearImage" title="(image)"/>
- </item>
- <item type="checkLabel" name="sensor" title="Sensor">
- <item type="checkbox" name="accel" title="Accelerometer"/>
- <item type="checkbox" name="gyro" title="Gyroscope"/>
- <item type="checkbox" name="geo" title="Geo-magnetic"/>
- <item type="checkbox" name="proxi" title="Proximity"/>
- <item type="checkbox" name="light" title="Light"/>
- <item type="checkbox" name="haptic" title="Haptic"/>
- <item type="checkbox" name="press" title="Pressure"/>
- <item type="checkbox" name="uv" title="Ultraviolet"/>
- <item type="checkbox" name="hrm" title="Heartbeat Rate"/>
- </item>
- <item type="checkLabel" name="device" title="Device">
- <item type="checkbox" name="nfc" title="NFC"/>
- </item>
-
- <!-- Network configuration -->
- <item name="netConfig" type="lineLabel" title="Network Configuration">
- <option name="spreadOnStart">false</option>
- </item>
- <item name="proxy" type="combo" title="Proxy">
- <option name="none">No proxy</option>
- <option name="auto">Use host proxy</option>
- <option name="manual">Use manual proxy</option>
- <option name="defaultOnCreate">auto</option>
- </item>
- <item name="netConnectType" type="combo" title="Connect Type">
- <option name="list">NAT, Bridge</option>
- </item>
- <item name="netTapDevice" type="combo" title="Base Network">
- <option name="supportOS">mac,linux</option>
- </item>
- <item name="netTapDevice" type="combo" title="Tap Device">
- <option name="supportOS">win</option>
- </item>
- <item name="netIpInfo" type="label" title="VM IP info">
- <item name="useDHCP" type="checkbox" title="Use DHCP">
- <option name="defaultOnCreate">off</option>
- </item>
- <item name="ipAddr" type="text" title="IP Address" />
- <item name="subnet" type="text" title="Subnet" />
- <item name="gateway" type="text" title="Gateway" />
- </item>
- <item name="netDns" type="text" title="DNS" />
- <item name="netMac" type="text" title="MAC" />
-
- <item type="lineLabel" name="experimental" title="Experimental Options"/>
- <item type="label" name="viewer" title="Viewer">
- <item type="combo" name="type" title="Type">
- <option name="list">Native, Web</option>
- <option name="defaultOnCreate">Native</option>
- </item>
- </item>
- </itemGroup>
-
-</ItemList>
-