[Title] emulator-manager : read vesion from "the emulator/etc/version" file
authorjihye kim <jihye1128.kim@samsung.com>
Thu, 21 Feb 2013 07:56:31 +0000 (16:56 +0900)
committerjihye kim <jihye1128.kim@samsung.com>
Fri, 22 Feb 2013 01:32:46 +0000 (10:32 +0900)
[Desc.] read version from "the emulator/etc/version" file
[Issue] N/A

Conflicts:

package/changelog
package/pkginfo.manifest

14 files changed:
build.xml
package/changelog
package/pkginfo.manifest
src/org/tizen/emulator/manager/EmulatorManager.java
src/org/tizen/emulator/manager/console/CommandLineParser.java
src/org/tizen/emulator/manager/image/BaseImage.java
src/org/tizen/emulator/manager/tool/About.java
src/org/tizen/emulator/manager/tool/CheckSDCard.java
src/org/tizen/emulator/manager/tool/CheckVirtualization.java
src/org/tizen/emulator/manager/tool/FilePath.java
src/org/tizen/emulator/manager/tool/StringResource.java
src/org/tizen/emulator/manager/ui/AboutDialog.java
src/org/tizen/emulator/manager/ui/detail/VMPropertyView.java
src/org/tizen/emulator/manager/vms/VMsWorker.java

index 64f61ec..50ab5c1 100644 (file)
--- a/build.xml
+++ b/build.xml
                <tstamp>
                        <format property="build_time" pattern="yyyyMMdd-HHmm" timezone="GMT+9" locale="en" />
                </tstamp>
+               <!--
         <exec executable="cat" outputproperty="version">
             <arg value="VERSION" />
         </exec>
+        -->
                <exec executable="git" outputproperty="build_git_commit" failifexecutionfails="false">
                        <arg value="rev-parse" />
                        <arg value="--short" />
                        <arg value="HEAD" />
                </exec>
                <propertyfile file="about.properties" comment="Auto-generated properties - DO NOT EDIT">
+                       <!--
                        <entry key="version" value="${version}" />
+                       -->
                        <entry key="build_time" value="${build_time}" />
                        <entry key="build_git_commit" value="${build_git_commit}" />
                </propertyfile>
index 70242dd..965ada0 100644 (file)
@@ -1,3 +1,11 @@
+* 1.3.80
+- reading version from file (emulator/etc/version)
+== jihye kim <jihye1128.kim@samsung.com> 2013-02-21
+* 1.3.79
+- update version
+== jihye kim <jihye1128.kim@samsung.com> 2013-02-15
+
 * 1.3.78
 - modify install script
 == jihye kim <jihye1128.kim@samsung.com> 2013-02-12
index e413598..d0b180c 100644 (file)
@@ -1,5 +1,5 @@
 Source: emulator-manager
-Version: 1.3.78
+Version: 1.3.80
 Maintainer: Yeong-Kyoon Lee<yeongkyoon.lee@samsung.com>
 
 Package: emulator-manager
index ce7f781..527a66a 100755 (executable)
@@ -46,6 +46,7 @@ import org.tizen.emulator.manager.tool.CheckSDCard;
 import org.tizen.emulator.manager.tool.CheckVirtualization;
 import org.tizen.emulator.manager.tool.FilePath;
 import org.tizen.emulator.manager.tool.SelectWorkspace;
+import org.tizen.emulator.manager.tool.StringResource;
 import org.tizen.emulator.manager.ui.MainDialog;
 import org.tizen.emulator.manager.ui.MessageDialog;
 import org.tizen.emulator.manager.vms.EmulatorVMs;
@@ -176,13 +177,14 @@ public class EmulatorManager {
 
                MessageDialog msg = new MessageDialog(new Shell(Display.getCurrent()));
                if (isArgsError == true) {
-                       msg.openWarningDialog("Used workspace option parameter is not proper. Aborting...\n" +
-                                       "\nSee right examples below.\n" +
-                                       "[--workspace {workspace path},save=true]\n" +
-                                       "[-w {workspace path},save=true]\n" +
-                                       "[--workspace {workspace path},save=false]\n" +
-                                       "[-w {workspace path},save=false]\n" +
-                                       "\nThe workspace path must be absolute."
+                       msg.openWarningDialog("Used workspace option parameter is not proper. Aborting..."
+                                       + StringResource.NEW_LINE + StringResource.NEW_LINE
+                                       + "See right examples below." + StringResource.NEW_LINE
+                                       + "[--workspace {workspace path},save=true]" + StringResource.NEW_LINE
+                                       + "[-w {workspace path},save=true]" + StringResource.NEW_LINE
+                                       + "[--workspace {workspace path},save=false]" + StringResource.NEW_LINE
+                                       + "[-w {workspace path},save=false]" + StringResource.NEW_LINE + StringResource.NEW_LINE
+                                       + "The workspace path must be absolute."
                                        );
                        exitEmulatorManager(-1);
                }
@@ -209,12 +211,15 @@ public class EmulatorManager {
                        try {
                                FileLock lock = randomAccessFile.getChannel().tryLock();
                                if (lock == null) {
-                                       EMLogger.getLogger().log(Level.WARNING, "Can not launch Emulator Manager.\n" +
-                                                                                        "Another one with the same user name is running now.\n");
+                                       EMLogger.getLogger().log(Level.WARNING, "Can not launch Emulator Manager."
+                                                                       + StringResource.NEW_LINE
+                                                                       + "Another one with the same user name is running now."
+                                                                       + StringResource.NEW_LINE);
                                        exitEmulatorManager(-1);
                                }
                        } catch (IOException e) {
-                               EMLogger.getLogger().log(Level.WARNING, "Can not launch Emulator Manager.\n" +e.getMessage() + "\n");
+                               EMLogger.getLogger().log(Level.WARNING, "Can not launch Emulator Manager."
+                                               + StringResource.NEW_LINE +e.getMessage() + StringResource.NEW_LINE);
                                exitEmulatorManager(-1);
                        }
 
@@ -230,12 +235,12 @@ public class EmulatorManager {
                        try {
                                FileLock lock = randomAccessFile.getChannel().tryLock();
                                if (lock == null) {
-                                       msg.openInfoDialog("Can not launch Emulator Manager.\n" +
+                                       msg.openInfoDialog("Can not launch Emulator Manager." + StringResource.NEW_LINE +
                                                                           "Another one with the same user name is running now.");
                                        exitEmulatorManager(0);
                                }
                        } catch (IOException e) {
-                               msg.openInfoDialog("Can not launch Emulator Manager.\n" +e.getMessage());
+                               msg.openInfoDialog("Can not launch Emulator Manager." + StringResource.NEW_LINE + e.getMessage());
                                exitEmulatorManager(-1);
                        }
 
@@ -259,7 +264,7 @@ public class EmulatorManager {
                if (isConsoleMode) {
                        instance.startConsoleProcessor();
                } else {
-                       EMLogger.getLogger().log(Level.INFO, "Start Emulator Manager!!\n");
+                       EMLogger.getLogger().log(Level.INFO, "Start Emulator Manager!!" + StringResource.NEW_LINE);
 
                        instance.preare();
                        instance.DrawUI();
index 295aa39..f5db1d2 100644 (file)
@@ -33,6 +33,7 @@ import java.util.logging.Level;
 
 import org.tizen.emulator.manager.EmulatorManager;
 import org.tizen.emulator.manager.logging.EMLogger;
+import org.tizen.emulator.manager.tool.StringResource;
 
 public class CommandLineParser {
        private ActionList actionList = null;
@@ -183,13 +184,13 @@ public class CommandLineParser {
                        System.out.println("Error: " + String.format(errorFormat, args));
                }
 
-               System.out.println("\n" + "Usage:\n"+"   emulator-manager [global options] "
+               System.out.println(StringResource.NEW_LINE + "Usage:" + StringResource.NEW_LINE +"   emulator-manager [global options] "
                                + (action == null ? "action" : action.getAction())
                                + " [action options]");
                actionList.printGlobaloptions();
 
                if (action == null ) {
-                       System.out.println("\nValid actions: ");
+                       System.out.println(StringResource.NEW_LINE + "Valid actions: ");
                        actionList.printActions();
                } else {
                        actionList.printAction(action);
index 36ecce3..fcad6bd 100644 (file)
@@ -108,15 +108,15 @@ public class BaseImage {
        void setID(int id) {
                this.id = Integer.toString(id);
                //
-               information = getName() + "\n" +
-                               "       ID              : " + getID() + "\n" +
-                               "       Platform        : " + getPlatformName() + "\n" +
-                               "       Type            : " + getType() + "\n" +
-                               "       Version         : " + getVersion() + "\n" +
-                               "       Release Version : " + getRelease() + "\n" +
-                               "       Target CPU      : " + getCpu().toUpperCase() + "\n" +
-                               "       Product Domain  : " + getDomain() + "\n" +
-                               "       Base Disk Image Path : " + getPath() + "\n";
+               information = getName() + StringResource.NEW_LINE +
+                               "       ID              : " + getID() + StringResource.NEW_LINE +
+                               "       Platform        : " + getPlatformName() + StringResource.NEW_LINE +
+                               "       Type            : " + getType() + StringResource.NEW_LINE +
+                               "       Version         : " + getVersion() + StringResource.NEW_LINE +
+                               "       Release Version : " + getRelease() + StringResource.NEW_LINE +
+                               "       Target CPU      : " + getCpu().toUpperCase() + StringResource.NEW_LINE +
+                               "       Product Domain  : " + getDomain() + StringResource.NEW_LINE +
+                               "       Base Disk Image Path : " + getPath() + StringResource.NEW_LINE;
                //
        }
 
index 9770c00..2c7936a 100644 (file)
 
 package org.tizen.emulator.manager.tool;
 
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.Properties;
@@ -67,25 +71,56 @@ public class About {
 
                InputStream in = this.getClass().getClassLoader().getResourceAsStream(StringResource.ABOUT_PROP_FILENAME );
                Properties properties = new Properties();
-               String ver = "";
+               String ver = null;
                if(in != null) {
                        try {
                                properties.load(in);
+                               //ver  = properties.getProperty(StringResource.PROP_KEY_VERSION);
+                               time = properties.getProperty(StringResource.PROP_KEY_BUILD_TIME);
+                               gitVersion = properties.getProperty(StringResource.PROP_KEY_GIT_VERSION);
                        } catch (IOException e1) {
-                               EMLogger.getLogger().log(Level.SEVERE, e1.getMessage() + "\n");
+                               EMLogger.getLogger().log(Level.SEVERE, e1.getMessage());
+                       } finally {
+                               try {
+                                       in.close();
+                               } catch (IOException e) {
+                                       // TODO Auto-generated catch block
+                                       EMLogger.getLogger().log(Level.SEVERE, e.getMessage());
+                               }
                        }
-                       
-                       ver  = properties.getProperty(StringResource.PROP_KEY_VERSION);
-                       time = properties.getProperty(StringResource.PROP_KEY_BUILD_TIME);
-                       gitVersion = properties.getProperty(StringResource.PROP_KEY_GIT_VERSION);
                }
 
-               if(ver == null || ver.isEmpty()) {
+               // getting version
+               BufferedReader about = null;
+               try {
+                       about = new BufferedReader(new FileReader(new File(FilePath.getInstance().getEtcPath()
+                                       + File.separator + "version")));
+                       if (about != null) {
+                               ver = about.readLine();
+                       }
+               } catch (FileNotFoundException e) {
+                       // TODO Auto-generated catch block
+                       EMLogger.getLogger().log(Level.SEVERE, e.getMessage());
+               } catch (IOException e) {
+                       // TODO Auto-generated catch block
+                       EMLogger.getLogger().log(Level.SEVERE, e.getMessage());
+               } finally {
+                       if (about != null) {
+                               try {
+                                       about.close();
+                               } catch (IOException e) {
+                                       // TODO Auto-generated catch block
+                                       EMLogger.getLogger().log(Level.SEVERE, e.getMessage());
+                               }
+                       }
+               }
+
+               if(ver == null) {
                        //BaseImage image = Platforms.getInstance().getImageList().get(0);
                        //about_version = image.getRelease();
                        //version = image.getVersion();
-                       about_version = "Not identified";
-                       version = "Standard";
+                       about_version = "undefined";
+                       version = "standard";
                } else {
                        if (ver.indexOf('(') == -1) {
                                about_version = version = ver;
@@ -97,15 +132,15 @@ public class About {
                        }
                }
                if(time.isEmpty() || time.contains(StringResource.PROP_KEY_BUILD_TIME)) {
-                       time = "Not identified";
+                       time = "undefined";
                }
 
                if(gitVersion.isEmpty() || gitVersion.contains(StringResource.PROP_KEY_GIT_VERSION)) {
-                       gitVersion = "Not identified";
+                       gitVersion = "undefined";
                }
 
                if(workspace.isEmpty()) {
-                       workspace  = "Not identified";
+                       workspace  = "undefined";
                }
 
                contents = String.format("%-12s : %s\n%-12s : %s\n%-12s : %s\n%-12s : %s",
index cddebe1..1175a1f 100644 (file)
@@ -59,7 +59,8 @@ public class CheckSDCard {
                                        + File.separator + StringResource.SWAP_IMAGE);
                        if (!src.exists()) {
                                EMLogger.getLogger().log(Level.WARNING,
-                               "Failed to create swap image.!\nFile does not exist :" + src.getPath()+ "\n");
+                               "Failed to create swap image.!" + StringResource.NEW_LINE 
+                               + "File does not exist :" + src.getPath());
                                return;
                        }
 
@@ -67,7 +68,7 @@ public class CheckSDCard {
                                dest.createNewFile();
                        } catch (IOException e1) {
                                EMLogger.getLogger().log(Level.WARNING,
-                               "Failed to create swap image!\n" + e1.getMessage() + "\n");
+                               "Failed to create swap image!" + StringResource.NEW_LINE + e1.getMessage());
                                return;
                        }
 
@@ -83,10 +84,12 @@ public class CheckSDCard {
                                long size = fcin.size();
                                fcin.transferTo(0, size, fcout);
                        } catch (FileNotFoundException e) {
-                               EMLogger.getLogger().log(Level.WARNING, "Failed to create SD card image!\n" + e.getMessage() + "\n");
+                               EMLogger.getLogger().log(Level.WARNING, "Failed to create SD card image!"
+                                               + StringResource.NEW_LINE + e.getMessage());
                                dest.delete();
                        } catch (IOException e) {
-                               EMLogger.getLogger().log(Level.WARNING, "Failed to create SD card image!\n" + e.getMessage() + "\n");
+                               EMLogger.getLogger().log(Level.WARNING, "Failed to create SD card image!"
+                                               + StringResource.NEW_LINE + e.getMessage());
                                dest.delete();
                        }finally {
                                try {
@@ -103,7 +106,7 @@ public class CheckSDCard {
                                                inputStream.close();
                                        }
                                } catch (IOException e) {
-                                       EMLogger.getLogger().log(Level.WARNING, e.getMessage() + "\n");
+                                       EMLogger.getLogger().log(Level.WARNING, e.getMessage());
                                }
                        }
                }
@@ -128,7 +131,7 @@ public class CheckSDCard {
                                                + File.separator +s);
                                if (!src.exists()) {
                                        EMLogger.getLogger().log(Level.WARNING,
-                                       "Failed to create SD card image.!\nFile does not exist :" + src.getPath()+ "\n");
+                                       "Failed to create SD card image.!" + StringResource.NEW_LINE +"File does not exist :" + src.getPath());
                                        continue;
                                }
                                
@@ -136,7 +139,7 @@ public class CheckSDCard {
                                        dest.createNewFile();
                                } catch (IOException e1) {
                                        EMLogger.getLogger().log(Level.WARNING,
-                                       "Failed to create SD card image!\n" + e1.getMessage() + "\n");
+                                       "Failed to create SD card image!" + StringResource.NEW_LINE + e1.getMessage());
                                        continue;
                                }
 
@@ -152,11 +155,13 @@ public class CheckSDCard {
                                        long size = fcin.size();
                                        fcin.transferTo(0, size, fcout);
                                } catch (FileNotFoundException e) {
-                                       EMLogger.getLogger().log(Level.WARNING, "Failed to create SD card image!\n" + e.getMessage() + "\n");
+                                       EMLogger.getLogger().log(Level.WARNING, "Failed to create SD card image!" 
+                                  + StringResource.NEW_LINE + e.getMessage());
                                        dest.delete();
                                        continue;
                                } catch (IOException e) {
-                                       EMLogger.getLogger().log(Level.WARNING, "Failed to create SD card image!\n" + e.getMessage() + "\n");
+                                       EMLogger.getLogger().log(Level.WARNING, "Failed to create SD card image!" 
+                                       + StringResource.NEW_LINE + e.getMessage());
                                        dest.delete();
                                        continue;
                                }finally {
@@ -174,7 +179,7 @@ public class CheckSDCard {
                                                        inputStream.close();
                                                }
                                        } catch (IOException e) {
-                                               EMLogger.getLogger().log(Level.WARNING, e.getMessage() + "\n");
+                                               EMLogger.getLogger().log(Level.WARNING, e.getMessage());
                                        }
                                }
                        }
index 9121950..8c4610e 100644 (file)
@@ -90,7 +90,7 @@ public class CheckVirtualization {
                        work.join();
                } catch (InterruptedException e) {
                        // TODO Auto-generated catch block
-                       EMLogger.getLogger().log(Level.INFO, "Exception" + e.getMessage() + "\n");
+                       EMLogger.getLogger().log(Level.INFO, "Exception" + e.getMessage());
                }
                /*
                while(work.isAlive()) {
@@ -119,13 +119,13 @@ public class CheckVirtualization {
                                        process = pb.start();
                                        process.waitFor();
                                        exitValue = process.exitValue();
-                                       EMLogger.getLogger().log(Level.INFO, "Check-hax.exe's exit value : " + exitValue + "\n");
+                                       EMLogger.getLogger().log(Level.INFO, "Check-hax.exe's exit value : " + exitValue);
                                } catch (IOException e) {
-                                       EMLogger.getLogger().log(Level.INFO, "IOException" + e.getMessage() + "\n");
+                                       EMLogger.getLogger().log(Level.INFO, "IOException" + e.getMessage());
                                }  catch (InterruptedException e) {
-                                       EMLogger.getLogger().log(Level.INFO, "InterruptedException" + e.getMessage() + "\n");
+                                       EMLogger.getLogger().log(Level.INFO, "InterruptedException" + e.getMessage());
                                }  catch (Exception e) {
-                                       EMLogger.getLogger().log(Level.INFO, "Exception" + e.getMessage() + "\n");
+                                       EMLogger.getLogger().log(Level.INFO, "Exception" + e.getMessage());
                                }
 
                                if(exitValue == 0) {
index 8ac02d7..cc39315 100644 (file)
@@ -46,18 +46,28 @@ public class FilePath {
        private final static String platform_suffix  = File.separator + "platforms";
        private final static String images_suffix    = File.separator + "emulator-images";
        private final static String resource_suffix  = File.separator + "emulator-resources";
-       private final static String template_suffix  = File.separator + "model-templates";
+       private final static String model_template_suffix  = File.separator + "model-templates";
        private final static String skin_suffix = File.separator + "skins";
        private final static String default_suffix   = File.separator + "default";
        private final static String addons_suffix    = File.separator + "add-ons";
 //     private final static String x86_extension = ".x86";
 //     private final static String arm_extension = ".arm";
 
+       final static String etc_suffix = File.separator + "etc";
        private final static String bios_suffix = File.separator + "bios";
        private final static String kernel_suffix = File.separator +"kernel";
        private final static String swap_suffix = File.separator + "swap";
        private final static String data_suffix = File.separator +"data";
 
+       private final static String sdkpath_suffix = File.separator + "tizensdkpath";
+       private final static String sdkdata_suffix = File.separator + "tizen-sdk-data";
+       private final static String win_sdb_exec = File.separator + "sdb.exe";
+       private final static String sdb_exec = File.separator + "sdb";
+
+       private final static String storages_suffix = File.separator + "storages";
+       private final static String sdcard_suffix = File.separator + "sdcard";
+       private final static String template_suffix = File.separator + "templates";
+
        private static String currentPath;
        private static String sdkPath = null;
        private static String platformsPath;
@@ -67,6 +77,7 @@ public class FilePath {
 
        // Emulator
        private static String binPath;
+       private static String etcPath;
        private static String dataPath;
        private static String skinPath;
        private static String templatePath;
@@ -131,11 +142,12 @@ public class FilePath {
                                        }
                                }
                        }
+
                        if (tizenSDKDataPath != null && !tizenSDKDataPath.equals("")) {
-                               f = new File(tizenSDKDataPath + File.separator + "tizensdkpath");
+                               f = new File(tizenSDKDataPath + sdkpath_suffix);
                        } else {
                                String home = System.getProperty("user.home");
-                               f = new File(home + File.separator + "tizen-sdk-data" + File.separator + "tizensdkpath");
+                               f = new File(home + sdkdata_suffix + sdkpath_suffix);
                        }
 
                        if (f.exists()) {
@@ -188,31 +200,32 @@ public class FilePath {
                addonsSkinPath = resource_suffix + skin_suffix + addons_suffix;
                defaultImagePath = images_suffix + default_suffix;
                addonsImagePath = images_suffix + addons_suffix;
-               defaultTemplatePath = resource_suffix + template_suffix + default_suffix;
+               defaultTemplatePath = resource_suffix + model_template_suffix + default_suffix;
 
                // SDB path
                {
                        String sdb_suffix;
                        if (System.getProperty("os.name").toLowerCase().indexOf("windows") > -1) {
-                               sdb_suffix = File.separator + "sdb.exe";
+                               sdb_suffix = win_sdb_exec;
                        } else {
-                               sdb_suffix = File.separator + "sdb";
+                               sdb_suffix = sdb_exec;
                        }
                        sdbPath = toolsPath + sdb_suffix;
                }
 
                binPath = currentPath;
 
+               etcPath = emulatorPath +  etc_suffix;
                dataPath = emulatorPath + data_suffix;
 
                kernelPath = dataPath + kernel_suffix;
                biosPath = dataPath + bios_suffix;
 
-               sdcardPath = emulatorPath + File.separator + "storages" + File.separator + "sdcard";
-               baseSwapPath = emulatorPath + File.separator + "storages" + swap_suffix;
+               sdcardPath = emulatorPath + storages_suffix + sdcard_suffix;
+               baseSwapPath = emulatorPath + storages_suffix + swap_suffix;
 
                skinPath = emulatorPath + skin_suffix;
-               templatePath = emulatorPath + File.separator + "templates";
+               templatePath = emulatorPath + template_suffix;
 
                workspacePath = EmulatorVMs.getInstance().getVMsBaseDirectory();
                vmsPath = EmulatorVMs.getInstance().getVMsConfigDirectory();
@@ -373,4 +386,8 @@ public class FilePath {
        public String getDataSkinPath() {
                return dataSkinPath;
        }
+
+       public String getEtcPath() {
+               return etcPath;
+       }
 }
index b444a9b..3e01480 100644 (file)
@@ -107,4 +107,6 @@ public class StringResource {
        public static final String SWAP_IMAGE = "swap.img";
 
        public static final String PROPERTY_XML_NAME = "vm_config.xml";
+
+       public static final String NEW_LINE = System.getProperty("line.separator");
 }
index 6cb267e..7cfa730 100644 (file)
@@ -24,11 +24,11 @@ public class AboutDialog {
        private static int height = 290; // 180 + 110
        static {
                About.initAboutContents();
-               textContents = "\n" +
+               textContents = StringResource.NEW_LINE +
                                 "Tizen SDK" +
-                                "\n\n" +
+                                StringResource.NEW_LINE + StringResource.NEW_LINE +
                                 "Version : " + About.getInstance().getAboutVersion() +
-                                "\n" +
+                                StringResource.NEW_LINE +
                                 "Build id : " + About.getInstance().getBuildTime();
 
        }
index 173450a..d366088 100644 (file)
@@ -35,9 +35,6 @@ import java.util.ArrayList;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.TableEditor;
 import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
 import org.eclipse.swt.widgets.Table;
 import org.eclipse.swt.widgets.TableItem;
 import org.tizen.emulator.manager.image.BaseImage;
index c34205f..5e35564 100644 (file)
@@ -62,8 +62,9 @@ public class VMsWorker {
 
        public void launchVM() throws VMsWorkerException {
                if(isRunningNow()) {
-                       throw new VMsWorkerException("Can not execute this VM.\n" +
-                                       "The same name is running now.");
+                       throw new VMsWorkerException("Can not execute this VM."
+                                       + StringResource.NEW_LINE
+                                       + "The same name is running now.");
                }
                launcher.launch(property);
        }
@@ -76,7 +77,9 @@ public class VMsWorker {
 
        public void modifyVM(VMPropertyValue oldVM, VMPropertyValue newVM) throws VMsWorkerException {
                if(EmulatorManager.isConsoleMode() && property.getWorker().isRunningNow()) {
-                       throw new VMsWorkerException("Not allowed to modify active VMs\n" + "[" + property.getName() + "] is running now...");
+                       throw new VMsWorkerException("Not allowed to modify active VMs"
+                                       + StringResource.NEW_LINE
+                                       + "[" + property.getName() + "] is running now...");
                }
                Modifier.modify(property, oldVM, newVM);
        }
@@ -118,7 +121,7 @@ public class VMsWorker {
                worker = new WorkerThread(proc);
                worker.start();
                if (EmulatorManager.isConsoleMode()) {
-                       System.out.println("Wait....while creating base image.\n"
+                       System.out.println("Wait....while creating base image." + StringResource.NEW_LINE
                                                                + "This task can take about 30 ~ 60 seconds");
                        synchronized(worker) {
                                try {
@@ -127,7 +130,8 @@ public class VMsWorker {
                                        e.printStackTrace();
                                }
                                if (worker.isError()) {
-                                       throw new VMsWorkerException("Failed to create new base image becauese of failed qemu-img processing!\n"
+                                       throw new VMsWorkerException("Failed to create new base image becauese of failed qemu-img processing!"
+                                                       + StringResource.NEW_LINE
                                                        + "You can get more information in log file ("
                                                        + FilePath.getInstance().getTizenVmsPath() +  File.separator + "emulator-manager)");
                                }
@@ -140,7 +144,8 @@ public class VMsWorker {
                                        e.printStackTrace();
                                }
                                if (worker.isError()) {
-                                       throw new VMsWorkerException("Failed to create new base image becauese of failed qemu-img processing!\n"
+                                       throw new VMsWorkerException("Failed to create new base image becauese of failed qemu-img processing!"
+                                                       + StringResource.NEW_LINE
                                                        + "You can get more information in log file ("
                                                        + FilePath.getInstance().getTizenVmsPath() +  File.separator + "emulator-manager)");
                                }
@@ -209,14 +214,16 @@ public class VMsWorker {
                String targetPath = property.getConfiguration().getBaseInformation().getDiskImage().getCurrentDiskImage().getValue();
                
                if (basePath == null || basePath.isEmpty() || targetPath == null || targetPath.isEmpty()) {
-                       throw new VMsWorkerException("Fail to reset Emulator\nEmulator Name : " + property.getName());
+                       throw new VMsWorkerException("Fail to reset Emulator" + StringResource.NEW_LINE +
+                                       "Emulator Name : " + property.getName());
                }
 
                try {
                        Creator.createInitialVMImage(basePath, targetPath);
                } catch (VMsCreatorException e) {
-                       throw new VMsWorkerException("Fail to reset Emulator\nEmulator Name : " + property.getName()
-                                       +"\n" + e.getMessage());
+                       throw new VMsWorkerException("Fail to reset Emulator" + StringResource.NEW_LINE 
+                                       + "Emulator Name : " + property.getName()
+                                       + StringResource.NEW_LINE + e.getMessage());
                }
 
                if (property.getConfiguration().getBaseInformation().getDiskImage().getSwapDiskImage() != null) {
@@ -226,15 +233,16 @@ public class VMsWorker {
                                return;
                        }
                        if (swapTargetPath == null || swapTargetPath.isEmpty()) {
-                               throw new VMsWorkerException("Fail to reset Emulator beacause swap path is empty." +
-                                                                                        "\nEmulator Name : " + property.getName());
+                               throw new VMsWorkerException("Fail to reset Emulator beacause swap path is empty." + StringResource.NEW_LINE +
+                                                                                        "Emulator Name : " + property.getName());
                        }
 
                        try {
                        Creator.createSwapImage(swapBasePath, swapTargetPath);
                        } catch (VMsCreatorException e) {
-                                       throw new VMsWorkerException("Fail to reset Emulator\nEmulator Name : " + property.getName()
-                                                       +"\n" + e.getMessage());
+                                       throw new VMsWorkerException("Fail to reset Emulator" + StringResource.NEW_LINE
+                                                       + "Emulator Name : " + property.getName()
+                                                       + StringResource.NEW_LINE + e.getMessage());
                        }
                }
        }
@@ -341,8 +349,9 @@ public class VMsWorker {
                        logger.log(Level.SEVERE, err.getMessage());
                        if (!EmulatorManager.isConsoleMode()) {
                                MessageDialog msg = new MessageDialog(new Shell(Display.getCurrent()));
-                               msg.openWarningDialog("Error occured while checking if the same VM .\n" +
-                                               err.getMessage());
+                               msg.openWarningDialog("Error occured while checking if the same VM ."
+                               + StringResource.NEW_LINE
+                               + err.getMessage());
                        }
 
                        return false;