VM-property: deprecate some getter function
authorMinkee Lee <minkee.lee@samsung.com>
Thu, 4 Feb 2016 12:01:53 +0000 (21:01 +0900)
committerSeokYeon Hwang <syeon.hwang@samsung.com>
Thu, 11 Feb 2016 07:19:25 +0000 (16:19 +0900)
Some getter functions of class "VMPropertyConfiguration" should
have private access. So I deprecate these functions and
use getter functions of class "VMPropertyValue" instead.

Deprecated functions will be changed to 'private' later.

Change-Id: I7b2dbe9e9ddfc1491c089ccd74ba721fe8f9b49c
Signed-off-by: Minkee Lee <minkee.lee@samsung.com>
14 files changed:
src/org/tizen/emulator/manager/console/ConsoleProcessor.java
src/org/tizen/emulator/manager/ui/list/ColumnContentHelper.java
src/org/tizen/emulator/manager/vms/VMPropertyConfiguration.java
src/org/tizen/emulator/manager/vms/VMPropertyValue.java
src/org/tizen/emulator/manager/vms/option/CPUSupportOption.java
src/org/tizen/emulator/manager/vms/option/DisplayModeOption.java
src/org/tizen/emulator/manager/vms/option/DisplayOption.java
src/org/tizen/emulator/manager/vms/option/FileShareOption.java
src/org/tizen/emulator/manager/vms/option/GLVersionOption.java
src/org/tizen/emulator/manager/vms/option/GPUSupportOption.java
src/org/tizen/emulator/manager/vms/option/ProcessorOption.java
src/org/tizen/emulator/manager/vms/option/RamSizeOption.java
src/org/tizen/emulator/manager/vms/option/SuspendSupportOption.java
src/org/tizen/emulator/manager/vms/option/TouchPointOption.java

index 21218fe..38504ec 100644 (file)
@@ -44,7 +44,7 @@ import org.tizen.emulator.manager.resources.FilePathResources;
 import org.tizen.emulator.manager.resources.StringResources;
 import org.tizen.emulator.manager.tool.About;
 import org.tizen.emulator.manager.vms.VMProperty;
-import org.tizen.emulator.manager.vms.VMPropertyConfiguration;
+import org.tizen.emulator.manager.vms.VMPropertyValue;
 import org.tizen.emulator.manager.vms.exception.VMWorkerException;
 import org.tizen.emulator.manager.vms.helper.HelperClass;
 import org.tizen.emulator.manager.vms.option.LaunchConfig;
@@ -66,29 +66,29 @@ public class ConsoleProcessor {
        public String getDetailInfoOfVM(VMProperty prop) {
                String str = new String();
                try {
-                       VMPropertyConfiguration conf = prop.getVMConfiguration();
-                       str += String.format("%s" + StringResources.NEW_LINE, prop.getPropertyValue().vmsName); //$NON-NLS-1$
-                       str+= String.format("\t%-17s : %s" + StringResources.NEW_LINE, "ImageType", conf.getBaseImageType()); //$NON-NLS-1$ //$NON-NLS-2$
-                       str+= String.format("\t%-17s : %s" + StringResources.NEW_LINE, "Platform", conf.getPlatformName()); //$NON-NLS-1$ //$NON-NLS-2$
-                       str+= String.format("\t%-17s : %s" + StringResources.NEW_LINE, "Profile", conf.getBaseImageProfile()); //$NON-NLS-1$ //$NON-NLS-2$
-                       str+= String.format("\t%-17s : %s" + StringResources.NEW_LINE, "Version", conf.getBaseImageVersion()); //$NON-NLS-1$ //$NON-NLS-2$
-                       str+= String.format("\t%-17s : %s" + StringResources.NEW_LINE, "Image Name", conf.getBaseImageName()); //$NON-NLS-1$ //$NON-NLS-2$
-                       str+= String.format("\t%-17s : %s" + StringResources.NEW_LINE, "Base Disk Image", conf.getBaseImagePath());//$NON-NLS-1$ //$NON-NLS-2$
-                       str+= String.format("\t%-17s : %s" + StringResources.NEW_LINE, "Child Disk Image", conf.getChildImagePath());//$NON-NLS-1$ //$NON-NLS-2$
-                       str+= String.format("\t%-17s : %s" + StringResources.NEW_LINE, "Resolution", (conf.getDisplayWidth() + "x" + conf.getDisplayHeight()));
-                       str+= String.format("\t%-17s : %s" + StringResources.NEW_LINE, "DPI", conf.getDisplayDPI());//$NON-NLS-1$ //$NON-NLS-2$
-                       str+= String.format("\t%-17s : %s" + StringResources.NEW_LINE, "Skin Path", conf.getSkinPath() == null ? "" : conf.getSkinPath());//$NON-NLS-1$ //$NON-NLS-2$
-                       str+= String.format("\t%-17s : %s" + StringResources.NEW_LINE, "Max Touch Point", conf.getMaxTouchPoint());//$NON-NLS-1$ //$NON-NLS-2$
-                       str+= String.format("\t%-17s : %s" + StringResources.NEW_LINE, "RAM Size", conf.getRamSize());//$NON-NLS-1$ //$NON-NLS-2$
-                       String filePath = conf.getFileSharingPath();
+                       VMPropertyValue value = prop.getPropertyValue();
+                       str += String.format("%s" + StringResources.NEW_LINE, value.vmsName); //$NON-NLS-1$
+                       str+= String.format("\t%-17s : %s" + StringResources.NEW_LINE, "ImageType", value.getImageType()); //$NON-NLS-1$ //$NON-NLS-2$
+                       str+= String.format("\t%-17s : %s" + StringResources.NEW_LINE, "Platform", value.getPlatformName()); //$NON-NLS-1$ //$NON-NLS-2$
+                       str+= String.format("\t%-17s : %s" + StringResources.NEW_LINE, "Profile", value.getProfile()); //$NON-NLS-1$ //$NON-NLS-2$
+                       str+= String.format("\t%-17s : %s" + StringResources.NEW_LINE, "Version", value.getImageVersion()); //$NON-NLS-1$ //$NON-NLS-2$
+                       str+= String.format("\t%-17s : %s" + StringResources.NEW_LINE, "Image Name", value.getImageName()); //$NON-NLS-1$ //$NON-NLS-2$
+                       str+= String.format("\t%-17s : %s" + StringResources.NEW_LINE, "Base Disk Image", value.getImagePath());//$NON-NLS-1$ //$NON-NLS-2$
+                       str+= String.format("\t%-17s : %s" + StringResources.NEW_LINE, "Child Disk Image", value.childImagePath);//$NON-NLS-1$ //$NON-NLS-2$
+                       str+= String.format("\t%-17s : %s" + StringResources.NEW_LINE, "Resolution", (value.resolution.getWidth()+ "x" + value.resolution.getHeight()));
+                       str+= String.format("\t%-17s : %s" + StringResources.NEW_LINE, "DPI", value.dpi);//$NON-NLS-1$ //$NON-NLS-2$
+                       str+= String.format("\t%-17s : %s" + StringResources.NEW_LINE, "Skin Path", value.skinPath == null ? "" : value.skinPath);//$NON-NLS-1$ //$NON-NLS-2$
+                       str+= String.format("\t%-17s : %s" + StringResources.NEW_LINE, "Max Touch Point", value.maxTouchCount);//$NON-NLS-1$ //$NON-NLS-2$
+                       str+= String.format("\t%-17s : %s" + StringResources.NEW_LINE, "RAM Size", value.ramSize);//$NON-NLS-1$ //$NON-NLS-2$
+                       String filePath = value.fileSharePath;
                        if (filePath != null && !filePath.isEmpty()) {
                                str+= String.format("\t%-17s : %s" + StringResources.NEW_LINE, "File Sharing Path", filePath); //$NON-NLS-1$ //$NON-NLS-2$
                        }
                        str+= String.format("\t%-17s : %s" + StringResources.NEW_LINE, "HW Virtualization", //$NON-NLS-1$ //$NON-NLS-2$
-                                       (conf.supportHWVirtualization() ? "TRUE" : "FALSE")); //$NON-NLS-1$ //$NON-NLS-2$
+                                       (value.isHWVirtualization ? "TRUE" : "FALSE")); //$NON-NLS-1$ //$NON-NLS-2$
 
                        str+= String.format("\t%-17s : %s" + StringResources.NEW_LINE, "HW GL Acceleration", //$NON-NLS-1$ //$NON-NLS-2$
-                                       (conf.supporGLAcceleration() ? "TRUE" : "FALSE")); //$NON-NLS-1$ //$NON-NLS-2$
+                                       (value.isGLAcceleration ? "TRUE" : "FALSE")); //$NON-NLS-1$ //$NON-NLS-2$
                } catch (NullPointerException e) {
                        System.out.println(e.getMessage());
                        return null;
index 08aa9ea..e4c891b 100644 (file)
@@ -100,8 +100,8 @@ class ResolutionContentHelper extends ColumnContentHelper {
        @Override
        public String getContent(VMProperty property) {
 
-               return property.getVMConfiguration().getDisplayWidth()
-                               + " x " + property.getVMConfiguration().getDisplayHeight(); //$NON-NLS-1$
+               return property.getPropertyValue().resolution.getWidth()
+                               + " x " + property.getPropertyValue().resolution.getHeight(); //$NON-NLS-1$
        }
 }
 
@@ -125,6 +125,6 @@ class RAMSizeContentHelper extends ColumnContentHelper {
 
        @Override
        public String getContent(VMProperty property) {
-               return property.getVMConfiguration().getRamSize() + ""; //$NON-NLS-1$
+               return property.getPropertyValue().ramSize + ""; //$NON-NLS-1$
        }
 }
index a90ea7f..b98bd0a 100644 (file)
@@ -76,6 +76,7 @@ public class VMPropertyConfiguration {
                this.configuration = configuration;
        }
 
+       @Deprecated // TODO private
        public String getName() {
                if(configuration == null
                                || configuration.getBaseInformation() == null) {
@@ -84,7 +85,7 @@ public class VMPropertyConfiguration {
 
                return configuration.getBaseInformation().getName();
        }
-
+       @Deprecated // TODO private
        public Architecture getArch() {
                if(configuration == null
                                || configuration.getBaseInformation() == null) {
@@ -92,7 +93,7 @@ public class VMPropertyConfiguration {
                }
                return Architecture.getDisplayType(configuration.getBaseInformation().getArchitecture());
        }
-
+       @Deprecated // TODO private
        public Architecture getArchInternal() {
                if(configuration == null
                                || configuration.getBaseInformation() == null) {
@@ -100,7 +101,7 @@ public class VMPropertyConfiguration {
                }
                return Architecture.getType(configuration.getBaseInformation().getArchitecture());
        }
-
+       @Deprecated // TODO private
        public String getPlatformName() {
                if (configuration == null
                                || configuration.getBaseInformation() == null) {
@@ -108,7 +109,7 @@ public class VMPropertyConfiguration {
                }
                return configuration.getBaseInformation().getPlatform();
        }
-
+       @Deprecated // TODO private
        public String getBaseImageName() {
                if(configuration == null
                                || configuration.getBaseInformation() == null || configuration.getBaseInformation().getDiskImage() == null) {
@@ -117,7 +118,7 @@ public class VMPropertyConfiguration {
 
                return configuration.getBaseInformation().getDiskImage().getBase();
        }
-
+       @Deprecated // TODO private
        public String getDeviceTemplatePath() {
                if (configuration == null
                                || configuration.getBaseInformation() == null
@@ -127,54 +128,47 @@ public class VMPropertyConfiguration {
 
                return configuration.getBaseInformation().getDeviceTemplate().getPath();
        }
-
+       @Deprecated // TODO private
        public String getDeviceTemplateName() {
-               if (configuration == null
-                               || configuration.getBaseInformation() == null
-                               || configuration.getBaseInformation().getDeviceTemplate() == null) {
+               if (isDeviceTemplateNone()) {
                        return "";
                }
 
                return configuration.getBaseInformation().getDeviceTemplate().getName();
        }
-
+       @Deprecated // TODO private
        public double getDeviceTemplateVersion() {
-               if (configuration == null
-                               || configuration.getBaseInformation() == null
-                               || configuration.getBaseInformation().getDeviceTemplate() == null) {
+               if (isDeviceTemplateNone()) {
                        return 1.0;
                }
                return configuration.getBaseInformation().getDeviceTemplate().getVersion();
        }
-
+       @Deprecated // TODO private
        public FSImageType getBaseImageType() {
-               if(configuration == null
-                               || configuration.getBaseInformation() == null || configuration.getBaseInformation().getDiskImage() == null) {
+               if(isDiskImageNone()) {
                        return null;
                }
 
                return FSImageType.standard.toString().equals(configuration.getBaseInformation().getDiskImage().getType()) ?
                                FSImageType.standard : FSImageType.custom;
        }
-
+       @Deprecated // TODO private
        public String getBaseImageVersion() {
-               if(configuration == null
-                               || configuration.getBaseInformation() == null || configuration.getBaseInformation().getDiskImage() == null) {
+               if(isDiskImageNone()) {
                        return ""; //$NON-NLS-1$
                }
 
                return configuration.getBaseInformation().getDiskImage().getVersion();
        }
-
+       @Deprecated // TODO private
        public String getBaseImageProfile() {
-               if(configuration == null
-                               || configuration.getBaseInformation() == null || configuration.getBaseInformation().getDiskImage() == null) {
+               if(isDiskImageNone()) {
                        return ""; //$NON-NLS-1$
                }
 
                return configuration.getBaseInformation().getDiskImage().getProfile();
        }
-
+       @Deprecated // TODO private
        public String getBaseImagePlatform() {
                if (configuration != null && configuration.getBaseInformation() != null
                                && configuration.getBaseInformation().getPlatform() != null) {
@@ -188,42 +182,34 @@ public class VMPropertyConfiguration {
                        return profile + "-" + version; //$NON-NLS-1$
                }
        }
-
+       @Deprecated // TODO private
        public String getBaseImageBinaryVersion() {
-               if (configuration == null
-                               || configuration.getBaseInformation() == null
-                               || configuration.getBaseInformation().getDiskImage() == null) {
+               if (isBaseDiskImageNone()) {
                        return ""; //$NON-NLS-1$
                }
 
                return configuration.getBaseInformation().getDiskImage().getBaseDiskImage().getVersion();
        }
-
+       @Deprecated // TODO private
        public String getBaseImagePath() {
-               if (configuration == null
-                               || configuration.getBaseInformation() == null
-                               || configuration.getBaseInformation().getDiskImage() == null) {
+               if (isBaseDiskImageNone()) {
                        return ""; //$NON-NLS-1$
                }
 
                return configuration.getBaseInformation().getDiskImage().getBaseDiskImage().getValue();
        }
-
+       @Deprecated // TODO private
        public String getChildImagePath() {
-               if(configuration == null
-                               || configuration.getBaseInformation() == null
-                               || configuration.getBaseInformation().getDiskImage() == null
+               if(isDiskImageNone()
                                || configuration.getBaseInformation().getDiskImage().getCurrentDiskImage() == null) {
                        return ""; //$NON-NLS-1$
                }
 
                return configuration.getBaseInformation().getDiskImage().getCurrentDiskImage().getValue();
        }
-
+       @Deprecated // TODO private
        public String getSwapImagePath() {
-               if(configuration == null
-                               || configuration.getBaseInformation() == null
-                               || configuration.getBaseInformation().getDiskImage() == null
+               if(isDiskImageNone()
                                || configuration.getBaseInformation().getDiskImage().getSwapDiskImage() == null) {
                        return ""; //$NON-NLS-1$
                }
@@ -231,6 +217,7 @@ public class VMPropertyConfiguration {
                return configuration.getBaseInformation().getDiskImage().getSwapDiskImage().getValue();
        }
 
+       @Deprecated // TODO private
        public String getLoggingLevel() {
                if (configuration == null
                                || configuration.getUsability() == null
@@ -240,7 +227,7 @@ public class VMPropertyConfiguration {
 
                return configuration.getUsability().getLogging().getLevel();
        }
-
+       @Deprecated // TODO private
        public String getFileSharingPath() {
                if (configuration == null
                                || configuration.getUsability() == null
@@ -250,7 +237,7 @@ public class VMPropertyConfiguration {
 
                return configuration.getUsability().getFileSharing().getPath();
        }
-
+       @Deprecated // TODO private
        public boolean supportHWVirtualization() {
                if (configuration == null
                                || configuration.getUsability() == null) {
@@ -258,7 +245,7 @@ public class VMPropertyConfiguration {
                }
                return configuration.getUsability().isHwVirtualization();
        }
-
+       @Deprecated // TODO private
        public boolean supporGLAcceleration() {
                if (configuration == null
                                || configuration.getUsability() == null) {
@@ -266,7 +253,7 @@ public class VMPropertyConfiguration {
                }
                return configuration.getUsability().isHwGLAcceleration();
        }
-
+       @Deprecated // TODO private
        public boolean supportSuspend() {
                if (configuration == null
                                || configuration.getUsability() == null) {
@@ -274,7 +261,7 @@ public class VMPropertyConfiguration {
                }
                return configuration.getUsability().isSupportSuspend();
        }
-
+       @Deprecated // TODO private
        public int getDisplayWidth() {
                if (configuration == null
                                || configuration.getDevice() == null
@@ -284,7 +271,7 @@ public class VMPropertyConfiguration {
                }
                return configuration.getDevice().getDisplay().getResolution().getWidth();
        }
-
+       @Deprecated // TODO private
        public int getDisplayHeight() {
                if (configuration == null
                                || configuration.getDevice() == null
@@ -294,7 +281,7 @@ public class VMPropertyConfiguration {
                }
                return configuration.getDevice().getDisplay().getResolution().getHeight();
        }
-
+       @Deprecated // TODO private
        public int getDisplayDPI() {
                if (configuration == null
                                || configuration.getDevice() == null
@@ -304,7 +291,7 @@ public class VMPropertyConfiguration {
                }
                return configuration.getDevice().getDisplay().getDensity().getValue();
        }
-
+       @Deprecated // TODO private
        public double getDisplaySize() {
                if (configuration == null
                                || configuration.getDevice() == null
@@ -314,7 +301,7 @@ public class VMPropertyConfiguration {
                }
                return configuration.getDevice().getDisplay().getScreenSize().getValue();
        }
-
+       @Deprecated // TODO private
        public String getSkinPath() {
                if (configuration == null
                                || configuration.getDevice() == null
@@ -325,7 +312,7 @@ public class VMPropertyConfiguration {
 
                return configuration.getDevice().getDisplay().getSkinPath().getPath();
        }
-
+       @Deprecated // TODO private
        public int getCPUCount() {
                if (configuration == null
                                || configuration.getDevice() == null
@@ -335,7 +322,7 @@ public class VMPropertyConfiguration {
                }
                return configuration.getDevice().getCPU().getValue().getValue();
        }
-
+       @Deprecated // TODO private
        public int getRamSize() {
                if (configuration == null
                                || configuration.getDevice() == null
@@ -345,7 +332,7 @@ public class VMPropertyConfiguration {
                }
                return configuration.getDevice().getRAM().getSize().getValue();
        }
-
+       @Deprecated // TODO private
        public int getMaxTouchPoint() {
                if (configuration == null
                                || configuration.getDevice() == null
@@ -354,7 +341,7 @@ public class VMPropertyConfiguration {
                }
                return configuration.getDevice().getTouch().getMaxTouchPoint();
        }
-
+       @Deprecated // TODO private
        public String getOciOptions() {
                if (configuration == null
                                || configuration.getOci() == null) {
@@ -363,7 +350,7 @@ public class VMPropertyConfiguration {
 
                return configuration.getOci().getOciOptions();
        }
-
+       @Deprecated // TODO private
        public List<VMOption> getAdvancedOptionList() {
                if (configuration == null
                                || configuration.getAdvancedOption() == null) {
@@ -385,7 +372,7 @@ public class VMPropertyConfiguration {
 
                return optionList;
        }
-
+       @Deprecated // TODO private
        public OptionType getAdvancedOption(String optionName) {
                for (OptionType option : configuration.getAdvancedOption().getOption()) {
                        if (option.getName().equals(optionName)) {
@@ -395,6 +382,24 @@ public class VMPropertyConfiguration {
                return null;
        }
 
+       private boolean isDiskImageNone() {
+               return (configuration == null
+                               || configuration.getBaseInformation() == null
+                               || configuration.getBaseInformation().getDiskImage() == null);
+       }
+
+       private boolean isBaseDiskImageNone() {
+               return (isDiskImageNone()
+                               || configuration.getBaseInformation().getDiskImage().getBaseDiskImage() == null);
+       }
+
+       private boolean isDeviceTemplateNone() {
+               return (configuration == null
+                               || configuration.getBaseInformation() == null
+                               || configuration.getBaseInformation().getDeviceTemplate() == null);
+       }
+
+
        public void settingVMPropertyValue(VMPropertyValue property) {
                if (property == null) {
                        return;
index 9d7f7ee..c6ec42b 100644 (file)
@@ -46,6 +46,7 @@ import org.tizen.emulator.manager.resources.StringResources;
 import org.tizen.emulator.manager.template.renewal.VMItem;
 import org.tizen.emulator.manager.ui.renewal.item.ItemName;
 import org.tizen.emulator.manager.vms.VMProperty.Architecture;
+import org.tizen.emulator.manager.vms.VMProperty.FSImageType;
 import org.tizen.emulator.manager.vms.xml.OptionType;
 
 
@@ -197,6 +198,9 @@ public class VMPropertyValue implements Cloneable {
                settingSkin();
        }
 
+       public FSImageType getImageType() {
+               return baseImage.isStandard() ? FSImageType.standard : FSImageType.custom;
+       }
 
        public void resetBaseImage(BaseImage image) {
 //             if (image == null) {
index dc267b3..4dde037 100644 (file)
@@ -39,7 +39,7 @@ public class CPUSupportOption extends Option {
        public void getLaunchArgument(LaunchConfig config, VMProperty property)
                        throws VMLauncherException {
                String hwVirtualization = ""; //$NON-NLS-1$
-               if (property.getVMConfiguration().supportHWVirtualization()) {
+               if (property.getPropertyValue().isHWVirtualization) {
                        hwVirtualization = CheckVT.getVTEnablingCommand();
                } else {
                        // do nothing...
index fd556b0..ee33bc7 100644 (file)
@@ -70,7 +70,7 @@ public class DisplayModeOption extends Option {
 
                        String rendering = null;
                        if (!EmulatorManager.isMac()
-                                       && property.getVMConfiguration().supporGLAcceleration()) {
+                                       && property.getPropertyValue().isGLAcceleration) {
                                rendering = "onscreen"; //$NON-NLS-1$
 
                        } else {
index b733811..81bb2e4 100644 (file)
@@ -36,14 +36,14 @@ public class DisplayOption extends Option {
 
        @Override
        public void getLaunchArgument(LaunchConfig config, VMProperty property) {
-               String skinPath = property.getVMConfiguration().getSkinPath();
+               String skinPath = property.getPropertyValue().skinPath;
                if (skinPath != null && skinPath.isEmpty()) {
                        skinPath = null;
                }
 
-               int width = property.getVMConfiguration().getDisplayWidth();
-               int height = property.getVMConfiguration().getDisplayHeight();
-               int dpi = property.getVMConfiguration().getDisplayDPI();
+               int width = property.getPropertyValue().resolution.getWidth();
+               int height = property.getPropertyValue().resolution.getHeight();
+               int dpi = property.getPropertyValue().resolution.getDPI();
 
                if (skinPath != null) {
                        config.addVariableWithSpace(OPTION_KEY.VAR_SKIN_PATH, skinPath);
index db27341..c323762 100644 (file)
@@ -38,8 +38,8 @@ public class FileShareOption extends Option {
 
        @Override
        public void getLaunchArgument(LaunchConfig config, VMProperty property) {
-               String fileshare = property.getVMConfiguration().getFileSharingPath();
-               if (fileshare != null) {
+               String fileshare = property.getPropertyValue().fileSharePath;
+               if (fileshare != null && property.getPropertyValue().isFileShareSupport) {
                        config.addVariableWithSpace(OPTION_KEY.VAR_SHARING_PATH, fileshare);
                        config.addKernelOption("virtio-9p"); //$NON-NLS-1$
                        config.addQemuOption("-fsdev", "local,id=fsdef0,path=" //$NON-NLS-1$ //$NON-NLS-2$
@@ -53,8 +53,8 @@ public class FileShareOption extends Option {
        @Override
        public void checkArgument(VMProperty property) throws VMLauncherException {
                // Check File sharing
-               String fileshare = property.getVMConfiguration().getFileSharingPath();
-               if (fileshare != null) {
+               String fileshare = property.getPropertyValue().fileSharePath;
+               if (fileshare != null && property.getPropertyValue().isFileShareSupport) {
                        File f = new File(fileshare);
                        if (!f.exists()) {
                                throw new VMLauncherException(
index bc8ab3f..97d5717 100644 (file)
@@ -41,7 +41,7 @@ public class GLVersionOption extends Option {
                String glVersion = property.getPropertyValue().
                                getAdvancedOptionValue(ItemName.GL_VERSION);
 
-               if (property.getVMConfiguration().supporGLAcceleration()) {
+               if (property.getPropertyValue().isGLAcceleration) {
                        if (glVersion.equals(GLVersionViewItem.VER1_VER2)) {
                                config.appendQemuOptions("-device", "vigs", "gl_version=2"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
                                config.appendQemuOptions("-device", "yagl", "gl_version=2"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
index 28cf72c..d9c0fa0 100644 (file)
@@ -42,7 +42,7 @@ public class GPUSupportOption extends Option {
        @Override
        public void getLaunchArgument(LaunchConfig config, VMProperty property)
                        throws VMLauncherException {
-               if (property.getVMConfiguration().supporGLAcceleration()) {
+               if (property.getPropertyValue().isGLAcceleration) {
                        config.addVariable(OPTION_KEY.VAR_WSI, "vigs_wsi");
                        config.appendQemuOptions("-device", "vigs", "backend=gl,wsi=" + varForm(OPTION_KEY.VAR_WSI)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
                        config.appendQemuOptions("-device", "yagl", "wsi=" + varForm(OPTION_KEY.VAR_WSI)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
index bed41f2..4eda802 100644 (file)
@@ -64,7 +64,7 @@ public class ProcessorOption extends Option {
        }
 
        private int getCpuNum(VMProperty property) {
-               int cpuCount = property.getVMConfiguration().getCPUCount();
+               int cpuCount = property.getPropertyValue().cpu;
                if (cpuCount != 0) {
                        return cpuCount;
 
index 46e6e7e..da6e951 100644 (file)
@@ -34,7 +34,7 @@ public class RamSizeOption extends Option {
 
        @Override
        public void getLaunchArgument(LaunchConfig config, VMProperty property) {
-               int ramSize = property.getVMConfiguration().getRamSize();
+               int ramSize = property.getPropertyValue().ramSize;
                config.addVariable(OPTION_KEY.VAR_RAM, String.valueOf(ramSize));
                config.addQemuOption("-m", varForm(OPTION_KEY.VAR_RAM)); //$NON-NLS-1$
        }
index 4fdf37d..07c2ecc 100644 (file)
@@ -34,7 +34,7 @@ public class SuspendSupportOption extends Option {
 
        @Override
        public void getLaunchArgument(LaunchConfig config, VMProperty property) {
-               if (property.getVMConfiguration().supportSuspend()) {
+               if (property.getPropertyValue().isSupportSuspend) {
                        config.addQemuOption("-enable-suspend"); //$NON-NLS-1$
                }
        }
index 70072c6..ff11cc9 100644 (file)
@@ -34,7 +34,7 @@ public class TouchPointOption extends Option {
 
        @Override
        public void getLaunchArgument(LaunchConfig config, VMProperty property) {
-               int touchPoint = property.getVMConfiguration().getMaxTouchPoint();
+               int touchPoint = property.getPropertyValue().maxTouchCount;
                if (touchPoint > 0) {
                        config.addVariable(OPTION_KEY.VAR_MAX_POINT,
                                        String.valueOf(touchPoint));