From d539b7e5ec15606499d7d0b51e424fcde1db6100 Mon Sep 17 00:00:00 2001 From: "kh5325.kim" Date: Fri, 25 Oct 2013 11:11:17 +0900 Subject: [PATCH] Fixed mis-spells Change-Id: I13edc0ef6a959ad6cca57f8c2bd0b1940ad4a8c3 Signed-off-by: kh5325.kim --- .../org/tizen/cli/exec/TargetDeviceSelector.java | 28 ++++++++++------------ 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/org.tizen.cli/src/org/tizen/cli/exec/TargetDeviceSelector.java b/org.tizen.cli/src/org/tizen/cli/exec/TargetDeviceSelector.java index 285b9e0..794528a 100644 --- a/org.tizen.cli/src/org/tizen/cli/exec/TargetDeviceSelector.java +++ b/org.tizen.cli/src/org/tizen/cli/exec/TargetDeviceSelector.java @@ -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; } } - -- 2.7.4