Fixed mis-spells 59/11359/1
authorkh5325.kim <kh5325.kim@samsung.com>
Fri, 25 Oct 2013 02:11:17 +0000 (11:11 +0900)
committerkh5325.kim <kh5325.kim@samsung.com>
Fri, 25 Oct 2013 02:11:17 +0000 (11:11 +0900)
Change-Id: I13edc0ef6a959ad6cca57f8c2bd0b1940ad4a8c3
Signed-off-by: kh5325.kim <kh5325.kim@samsung.com>
org.tizen.cli/src/org/tizen/cli/exec/TargetDeviceSelector.java

index 285b9e0..794528a 100644 (file)
@@ -78,7 +78,7 @@ TargetDeviceSelector
 
     protected void printDeviceList( IDevice[] devices ) {
         prompter.notify( "-----------------------------" );
-        prompter.notify( "Currnet connected target list" );
+        prompter.notify( "Current connected target list" );
         prompter.notify( "-----------------------------" );
         for( int i = 0; i < devices.length; i++ ) {
             String msg = MessageFormat.format( "{0}) {1}( {2} )", (i+1), devices[i].toString(), devices[i].getDeviceName() );
@@ -179,7 +179,7 @@ TargetDeviceSelector
                 );
 
                 if( cancel.equals( op ) ) {
-                    prompter.notify( "Process is canceled, please selected device." );
+                    prompter.notify( "Process is canceled, please select a device." );
                 } else {
                     String answer = ((GenericOption)op).getAnswer();
                     if ( !StringUtil.isEmpty( answer ) ) {
@@ -190,22 +190,21 @@ TargetDeviceSelector
                             if ( 0 < index && index <= devices.length )
                             {
                                 selectDevice = ArrayUtil.get( devices, index-1 );
-                                String msg = MessageFormat.format( "Select Device is: {0}( {1} )" , selectDevice.toString(), selectDevice.getDeviceName() );
+                                String msg = null;
+                                if ( selectDevice != null )
+                                    msg = MessageFormat.format( "Selected device is: {0}( {1} )", selectDevice.toString(), selectDevice.getDeviceName() );
+                                else
+                                    msg = MessageFormat.format( "Selected device is: {0}", selectDevice );
                                 prompter.notify( msg );
+                            } else {
+                                prompter.notify( "Process is canceled, please select correct device." );
                             }
-                            else
-                            {
-                                prompter.notify( "Process is canceled, please selected correct device." );
-                            }
-                        }
-                        catch (NumberFormatException e)
+                        } catch (NumberFormatException e)
                         {
-                            prompter.notify( "Process is canceled, please selected correct device. Input is not integer." );
+                            prompter.notify( "Process is canceled, please select correct device. Input is not integer." );
                         }
-                    }
-                    else
-                    {
-                        prompter.notify( "Process is canceled, please selected correct device." );
+                    } else {
+                        prompter.notify( "Process is canceled, please select correct device." );
                     }
                 }
             }
@@ -214,4 +213,3 @@ TargetDeviceSelector
         return selectDevice;
     }
 }
-