[Title] message of RDS move from nativecommon.
authorGun Kim <gune.kim@samsung.com>
Thu, 15 Nov 2012 07:43:04 +0000 (16:43 +0900)
committerGun Kim <gune.kim@samsung.com>
Thu, 15 Nov 2012 07:43:04 +0000 (16:43 +0900)
[Type]
[Module]
[Priority]
[Jira#]
[Redmine#]
[Problem]
[Cause]
[Solution]
[TestCase]

Change-Id: I4abaad3a64950ddb109b96f8d30b7939edd35318

org.tizen.common/src/org/tizen/common/rds/RdsDeployer.java
org.tizen.common/src/org/tizen/common/rds/RdsMessages.java
org.tizen.common/src/org/tizen/common/rds/RdsMessages.properties

index 2ad3d07..6fa4f81 100644 (file)
@@ -122,14 +122,14 @@ public abstract class RdsDeployer {
             }
             if ( DeltaResourceInfo.TYPE_MODIFY.equals(node.getType()) ) {
                 try {
-                    command = NLS.bind(RdsMessages.RDS_PUSH_LOG, node.getFullPath(), strRemotePath);
+                    command = RdsDeployer.makeRdsLog(NLS.bind(RdsMessages.RDS_PUSH_LOG, node.getFullPath(), strRemotePath));
                     SyncResult result = device.getSyncService().pushFile(node.getFullPath(), strRemotePath, SyncService.getNullProgressMonitor());
                     if ( result.getCode() == SyncService.RESULT_NO_LOCAL_FILE || result.getCode() == SyncService.RESULT_LOCAL_IS_DIRECTORY) {
                         throw new IOException(command);
                     }
                     printInfo( command );
                 } catch (IOException e) {
-                    newCoreException(RdsMessages.RDS_PUSH_ERROR, e);
+                    newCoreException(RdsDeployer.makeRdsLog(RdsMessages.RDS_PUSH_ERROR), e);
                 }
             }
             else if ( DeltaResourceInfo.TYPE_DELETE.equals(node.getType()) ) {
@@ -137,7 +137,7 @@ public abstract class RdsDeployer {
                     command = "rm -rf " + addQuotes(strRemotePath) + TizenPlatformConstants.CMD_SUFFIX;
                     tizenCommand.runCommand(command, true, null);
                 } catch (Exception e) {
-                    newCoreException(RdsMessages.RDS_DELETE_ERROR, e);
+                    newCoreException(RdsDeployer.makeRdsLog(RdsMessages.RDS_DELETE_ERROR), e);
                 }
             }
         }
@@ -157,7 +157,7 @@ public abstract class RdsDeployer {
         try {
             tizenCommand.runCommand(installCommand, true, null);
         } catch (Exception e) {
-            newCoreException(RdsMessages.CANNOT_INSTALL, e);
+            newCoreException(RdsDeployer.makeRdsLog(RdsMessages.CANNOT_INSTALL), e);
         }
     }
     
@@ -178,7 +178,7 @@ public abstract class RdsDeployer {
         try {
             device.getSyncService().pushFile(strResInfoFile, strRemotePath, SyncService.getNullProgressMonitor());
         } catch (IOException e) {
-            Logger.error(RdsMessages.RDS_RES_INFO_PUSH_ERROR, e);
+            Logger.error(RdsDeployer.makeRdsLog(RdsMessages.RDS_RES_INFO_PUSH_ERROR), e);
         }
     }
     
@@ -186,6 +186,10 @@ public abstract class RdsDeployer {
         return "\"" + orig + "\"";
     }
     
+    public static String makeRdsLog( String log ) {
+        return RdsMessages.RDS_MODE_PREFIX + " " + log;
+    }
+    
     /**
      * Creates a new exception.
      *
index e6d5bf4..ce9b562 100644 (file)
@@ -38,5 +38,6 @@ public class RdsMessages {
     public static String RDS_DELETE_ERROR;
     public static String CANNOT_INSTALL;
     public static String RDS_RES_INFO_PUSH_ERROR;
+    public static String RDS_MODE_PREFIX;
 
 }
index d6d1a4e..05475ef 100644 (file)
@@ -1,5 +1,6 @@
-RDS_PUSH_LOG=[RDS] Pushing file "{0}" to "{1}" in target.
-RDS_PUSH_ERROR=[RDS] Failed to push file(s).
-RDS_DELETE_ERROR=[RDS] Failed to delete file in target.
+RDS_PUSH_LOG=Pushing file "{0}" to "{1}" in target.
+RDS_PUSH_ERROR=Failed to push file(s).
+RDS_DELETE_ERROR=Failed to delete file in target.
 CANNOT_INSTALL = Cannot install application.
-RDS_RES_INFO_PUSH_ERROR=[RDS] Failed to upload resource information for RDS.
\ No newline at end of file
+RDS_RES_INFO_PUSH_ERROR=Failed to upload resource information for RDS.
+RDS_MODE_PREFIX=[RDS]
\ No newline at end of file