package org.tizen.emulator.manager.ui.detail.item.property;
+import java.util.List;
+
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.tizen.emulator.manager.ui.detail.item.template.ComboViewItem;
import org.tizen.emulator.manager.ui.widgets.ImageCombo;
import org.tizen.emulator.manager.ui.widgets.WSTATE;
+import org.tizen.emulator.manager.vms.RAM_SIZE;
import org.tizen.emulator.manager.vms.VMPropertyValue;
import org.tizen.emulator.manager.vms.xml.template.Item;
+import org.tizen.emulator.manager.vms.xml.template.Option;
public class RamSizeItem extends ComboViewItem{
}
@Override
+ protected void parseOption(List<Option> optionList) {
+ // make combo option list
+ for (RAM_SIZE r : RAM_SIZE.values()) {
+ comboOptions.add(r.toString());
+ }
+ }
+
+ @Override
public void drawModify() {
if (INPUTBOX_ON_IMAGE == null) {
INPUTBOX_ON_IMAGE = PatchImageResources.getInputBoxON(INPUTBOX_WIDTH - 40);
private static final ArrayList<RAM_SIZE> list;
static{
list = new ArrayList<RAM_SIZE>();
- if (System.getProperty("os.name").toLowerCase().indexOf("windows") > -1) {
+ if (System.getProperty("os.name").toLowerCase().indexOf("windows") > -1
+ && isX86Arch()) {
list.add(RAM512);
} else {
list.add(RAM512);
}
}
+ public static boolean isX86Arch() {
+ // for windows
+ String arch = System.getenv("PROCESSOR_ARCHITECTURE");
+ String wow64Arch = System.getenv("PROCESSOR_ARCHITEW6432");
+
+ if (arch != null && arch.endsWith("64")) {
+ return false;
+ }
+ if (wow64Arch != null && wow64Arch.endsWith("64")) {
+ return false;
+ }
+ return true; // if null,
+
+ }
+
public static ArrayList<RAM_SIZE> values() {
return list;
}