Property: Fix Ram-size item.
authorminkee.lee <minkee.lee@samsung.com>
Tue, 5 Aug 2014 05:55:47 +0000 (14:55 +0900)
committerminkee.lee <minkee.lee@samsung.com>
Tue, 12 Aug 2014 13:34:46 +0000 (22:34 +0900)
Change-Id: I5e782f500e40526688c12759cb8c563829d4a48d
Signed-off-by: minkee.lee <minkee.lee@samsung.com>
common-project/src/org/tizen/emulator/manager/ui/detail/item/property/RamSizeItem.java
common-project/src/org/tizen/emulator/manager/vms/RAM_SIZE.java

index f59f078..efc33b4 100644 (file)
@@ -31,6 +31,8 @@
 
 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;
@@ -43,8 +45,10 @@ import org.tizen.emulator.manager.resources.PatchImageResources;
 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{
 
@@ -56,6 +60,14 @@ 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);
index c1d4816..1e12017 100644 (file)
@@ -39,7 +39,8 @@ public class RAM_SIZE {
        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);
@@ -48,6 +49,21 @@ public class RAM_SIZE {
                }
         }
 
+       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;
        }