[Title] Fixed cli command - print
authorgyeongseok.seo <gyeongseok.seo@samsung.com>
Tue, 17 Jul 2012 08:30:54 +0000 (17:30 +0900)
committergyeongseok.seo <gyeongseok.seo@samsung.com>
Tue, 17 Jul 2012 08:30:54 +0000 (17:30 +0900)
[Type] Enhancement
[Module] cli
[Priority] Minor
[Jira#]
[Redmine#] 5831
[Problem]
[Cause]
[Solution]
[TestCase]

Change-Id: I814ce50bbe82da4eceb1103485e7d8d3308c7437

org.tizen.cli/src/org/tizen/cli/exec/install/Main.java
org.tizen.cli/src/org/tizen/cli/exec/query/Main.java
org.tizen.cli/src/org/tizen/cli/exec/uninstall/Main.java

index 081ff2e..cd61a38 100644 (file)
@@ -176,9 +176,11 @@ extends WRTLauncher
             logger.trace( "same widget's pre-install check and kill process" );
             CheckInstallCommand check_install_cmd = new CheckInstallCommand( widgetId );
             check_install_cmd.setDevice( getDevice() );
+            check_install_cmd.setPrintOption( false );
             exec.execute( check_install_cmd );
             if ( check_install_cmd.isInstalled() ) {
                 KillCommand kill_cmd = new KillCommand( widgetId );
+                kill_cmd.setPrintOption( false );
                 kill_cmd.setDevice( getDevice() );
                 exec.execute( kill_cmd );
             }
index 9bdd8ff..4c8af77 100644 (file)
@@ -28,7 +28,6 @@ package org.tizen.cli.exec.query;
 import org.apache.commons.cli.CommandLine;
 
 import org.tizen.cli.exec.WRTLauncher;
-import org.tizen.common.core.command.Prompter;
 import org.tizen.web.launch.cli.command.QueryCommand;
 
 /**
@@ -72,8 +71,6 @@ extends WRTLauncher
     {
         super.execute( cmdLine );
 
-        final Prompter prompter = getPrompter();
-
         // device not connect then exit
         if ( getDevice() == null ) {
             endSDB();
@@ -84,7 +81,6 @@ extends WRTLauncher
         QueryCommand command = new QueryCommand();
         command.setDevice( getDevice() );
         getExecutor().execute( command );
-        prompter.notify( command.getResult() );
 
         endSDB();
     }
index 2d6c412..5f2bb40 100644 (file)
@@ -101,7 +101,7 @@ extends WRTLauncher
 
         // device not connect then exit
         if ( getDevice() == null ) {
-            prompter.notify( "Process is stoped, please select connect device" );
+            endSDB();
             return ;
         }
 
@@ -110,21 +110,28 @@ extends WRTLauncher
 
         // install check
         CheckInstallCommand install_check_command = new CheckInstallCommand( widgetID );
+        install_check_command.setDevice( getDevice() );
+        install_check_command.setPrintOption( false );
         exec.execute( install_check_command );
         if ( !install_check_command.isInstalled() ) {
             prompter.notify(
-                    MessageFormat.format( "Process is stoped, [{0}] widget is not installed", widgetID )
+                    MessageFormat.format( "Uninstall failed, [{0}] widget is not installed", widgetID )
                     );
+            endSDB();
             return ;
         }
 
         // kill
         KillCommand kill_command = new KillCommand( widgetID );
+        kill_command.setDevice( getDevice() );
         exec.execute( kill_command );
 
         // uninstall
         UninstallCommand uninstall_command = new UninstallCommand( widgetID );
+        uninstall_command.setDevice( getDevice() );
         exec.execute( uninstall_command );
+
+        endSDB();
     }
 
     /* (non-Javadoc)