CLI: modify option to -d from -p
authorjihye424.kim <jihye424.kim@samsung.com>
Fri, 25 Mar 2016 08:06:39 +0000 (17:06 +0900)
committerJiHye Kim <jihye424.kim@samsung.com>
Fri, 25 Mar 2016 08:36:32 +0000 (17:36 +0900)
- change to directory from path
-- -p means platform in CLI
- modify create and modify usage
-- to -t from -d

Change-Id: I83781b073cacd96724a60dbcc6ea272aa64bf6a8
Signed-off-by: jihye424.kim <jihye424.kim@samsung.com>
resource/strings/climessages.properties
src/org/tizen/emulator/manager/console/CommandList.java
src/org/tizen/emulator/manager/console/processor/ConsoleProcessor.java
supplement/em-cli.bat

index 6671e9b..a5d65d3 100644 (file)
@@ -11,13 +11,13 @@ Create.Usage.2=create -n my_vm
 Create.Usage.3=Create a VM by using a platform
 Create.Usage.4=create -n my_vm -p mobile-2.4
 Create.Usage.5=Create a VM by using a platform and a device template
-Create.Usage.6=create -n my_vm -p mobile-2.4 -d HD-Mobile
+Create.Usage.6=create -n my_vm -p mobile-2.4 -t HD-Mobile
 Create.Usage.7=Create a VM by using a custom image
 Create.Usage.8=create -n my_vm -c path
 Create.Usage.9=Create a VM by using a custom image
 Create.Usage.10=create -n my_vm -c path -p mobile-2.4
 Create.Usage.11=Create a VM by using a custom image
-Create.Usage.12=create -n my_vm -c path -p mobile-2.4 -d HD-Mobile
+Create.Usage.12=create -n my_vm -c path -p mobile-2.4 -t HD-Mobile
 
 Create.Desc.Name=Specify the VM's name
 Create.Desc.Platform=Specify a %s for base disk image. You can find available platforms by using 'list-platform' command.
@@ -36,7 +36,7 @@ Create.Desc.RAMSize=Set the size of the memory in MiB
 Modify.ShortDescription=Modify configurations of a virtual machine
 Modify.Description=Modify configurations of a VM(Virtual Machine)
 Modify.Usage.1=Modify a device template of a VM
-Modify.Usage.2=modify -n my_vm -d WVGA-Mobile
+Modify.Usage.2=modify -n my_vm -t WVGA-Mobile
 Modify.Usage.3=Modify shared directory of a VM
 Modify.Usage.4=modify -n my_vm -f /home/user/test
 Modify.Desc.Name=Specify the VM's name
index 5a71ff2..71ead0a 100644 (file)
@@ -407,14 +407,14 @@ class CreateBaseImage extends Command {
                                case 'n' :
                                        name = c.getCurrentValue();
                                        break;
-                               case 'p' :
+                               case 'd' :
                                        path = c.getCurrentValue();
                                        break;
                                case 'c' :
                                        useCompress = true;
                                }
                        } else {
-                               if (c.getShortName().equals("p")) { //$NON-NLS-1$
+                               if (c.getShortName().equals("d")) { //$NON-NLS-1$
                                        path = c.getDefaultValue();
                                }
                        }
index 75f9fc8..584e5dd 100644 (file)
@@ -109,7 +109,8 @@ public class ConsoleProcessor {
                Queue<VMProperty> properties = getProperties();
 
                for (VMProperty prop : properties) {
-                       if (platform != null) {
+                       if (platform != null
+                                       && prop.getPropertyValue().getPlatform() != null) {
                                if (!prop.getPropertyValue().getPlatform().equals(platform)) {
                                        continue;
                                }
@@ -331,7 +332,7 @@ public class ConsoleProcessor {
                // Check path
                File f = new File(path);
                if (!f.exists()) {
-                       OutputUtil.printError(Messages.getString("Export.Error.NotExistPath.1")
+                       OutputUtil.printError(Messages.getString("Export.Error.NotExistPath")
                                        , "Path: " + path); //$NON-NLS-1$
                        return false;
                }
index 2f5ce81..7c1b5ad 100644 (file)
@@ -25,6 +25,8 @@ for /F "usebackq tokens=1,2* delims=: " %%V in (`mode con`) do (
     )
 )
 
+:done
+
 IF EXIST "%current_path%" (
        java -jar "%current_path%" %*
 ) ELSE (