From 8c4739dfac1cf3fe9eb96f8d7d47185f0e28af6e Mon Sep 17 00:00:00 2001 From: Gun Kim Date: Thu, 15 Nov 2012 16:43:04 +0900 Subject: [PATCH] [Title] message of RDS move from nativecommon. [Type] [Module] [Priority] [Jira#] [Redmine#] [Problem] [Cause] [Solution] [TestCase] Change-Id: I4abaad3a64950ddb109b96f8d30b7939edd35318 --- org.tizen.common/src/org/tizen/common/rds/RdsDeployer.java | 14 +++++++++----- org.tizen.common/src/org/tizen/common/rds/RdsMessages.java | 1 + .../src/org/tizen/common/rds/RdsMessages.properties | 9 +++++---- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/org.tizen.common/src/org/tizen/common/rds/RdsDeployer.java b/org.tizen.common/src/org/tizen/common/rds/RdsDeployer.java index 2ad3d07..6fa4f81 100644 --- a/org.tizen.common/src/org/tizen/common/rds/RdsDeployer.java +++ b/org.tizen.common/src/org/tizen/common/rds/RdsDeployer.java @@ -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. * diff --git a/org.tizen.common/src/org/tizen/common/rds/RdsMessages.java b/org.tizen.common/src/org/tizen/common/rds/RdsMessages.java index e6d5bf4..ce9b562 100644 --- a/org.tizen.common/src/org/tizen/common/rds/RdsMessages.java +++ b/org.tizen.common/src/org/tizen/common/rds/RdsMessages.java @@ -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; } diff --git a/org.tizen.common/src/org/tizen/common/rds/RdsMessages.properties b/org.tizen.common/src/org/tizen/common/rds/RdsMessages.properties index d6d1a4e..05475ef 100644 --- a/org.tizen.common/src/org/tizen/common/rds/RdsMessages.properties +++ b/org.tizen.common/src/org/tizen/common/rds/RdsMessages.properties @@ -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 -- 2.7.4