[Tilte] merged develop -> relese
authorHyunjong,Pakr <phjwithyou.park@samsung.com>
Fri, 28 Dec 2012 02:36:41 +0000 (11:36 +0900)
committerHyunjong,Pakr <phjwithyou.park@samsung.com>
Fri, 28 Dec 2012 02:36:41 +0000 (11:36 +0900)
[Desc.] -
[Issue] -

org.tizen.dynamicanalysis.ide.eplugin/src/org/tizen/dynamicanalysis/ide/eplugin/Activator.java
org.tizen.dynamicanalysis.ide.eplugin/src/org/tizen/dynamicanalysis/ide/eplugin/DALog.java
org.tizen.dynamicanalysis.ide.eplugin/src/org/tizen/dynamicanalysis/ide/eplugin/communication/DAServerManager.java
org.tizen.dynamicanalysis.ide.eplugin/src/org/tizen/dynamicanalysis/ide/eplugin/communication/OpenEditManager.java
org.tizen.dynamicanalysis.ide.eplugin/src/org/tizen/dynamicanalysis/ide/eplugin/communication/ServerStartup.java
org.tizen.dynamicanalysis.ide.eplugin/src/org/tizen/dynamicanalysis/ide/eplugin/launch/DynamicOptionValueHandler.java
org.tizen.dynamicanalysis.ide.eplugin/src/org/tizen/dynamicanalysis/ide/eplugin/launch/TizenNativeApplicationProfileDelegate.java

index c5069bd..f85aaa5 100644 (file)
@@ -31,7 +31,7 @@ import org.osgi.framework.BundleContext;
 import org.tizen.dynamicanalysis.ide.eplugin.communication.ServerStartup;
 
 public class Activator implements BundleActivator {
-       public static final String PLUGIN_ID = "org.tizen.dynamicanalyzer";
+       public static final String PLUGIN_ID = "org.tizen.dynamicanalyzer";//$NON-NLS-1$
 
        private static BundleContext context;
 
index 294fc3d..63a7bc1 100755 (executable)
@@ -28,7 +28,9 @@ package org.tizen.dynamicanalysis.ide.eplugin;
 
 import java.io.DataOutputStream;
 import java.io.File;
+import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
+import java.io.IOException;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.Locale;
@@ -50,87 +52,106 @@ public class DALog {
 
 
        private static void init() {
-               try {
-                       if (LOG_TO_FILE) {
-                               StringBuffer logPath = new StringBuffer();
-                               logPath.append(InstallPathConfig.getUserDataPath())
-                                               .append(File.separatorChar).append("dynamic-analyzer")
-                                               .append(File.separatorChar).append("logs");
-
-                               File logs = new File(logPath.toString());
-                               if (!logs.exists()) {
-                                       logs.mkdir();
-                               }
-
-                               SimpleDateFormat format = new SimpleDateFormat(
-                                               "yyyy_MM_dd_HH-mm-ss", //$NON-NLS-1$
-                                               Locale.KOREA);
-                               Date date = new Date();
-                               String logFileName = "da_ide_log_" + format.format(date);
-
-                               logPath.append(File.separatorChar).append(logFileName);
-
-                               file = new File(logPath.toString());
-                               file.getParentFile().mkdirs();
+
+               if (LOG_TO_FILE) {
+                       StringBuffer logPath = new StringBuffer();
+                       logPath.append(InstallPathConfig.getUserDataPath())
+                                       .append(File.separatorChar).append("dynamic-analyzer")//$NON-NLS-1$
+                                       .append(File.separatorChar).append("logs");//$NON-NLS-1$
+
+                       File logs = new File(logPath.toString());
+                       if (!logs.exists()) {
+                               logs.mkdir();
+                       }
+
+                       SimpleDateFormat format = new SimpleDateFormat(
+                                       "yyyy_MM_dd_HH-mm-ss", //$NON-NLS-1$
+                                       Locale.KOREA);
+                       Date date = new Date();
+                       String logFileName = "da_ide_log_" + format.format(date);//$NON-NLS-1$
+
+                       logPath.append(File.separatorChar).append(logFileName);
+
+                       file = new File(logPath.toString());
+                       file.getParentFile().mkdirs();
+                       try {
                                fos = new FileOutputStream(file);
-                               dos = new DataOutputStream(fos);
+                       } catch (FileNotFoundException e) {
+                               e.printStackTrace();
                        }
-               } catch (Exception e) {
-                       e.printStackTrace();
+                       dos = new DataOutputStream(fos);
                }
        }
 
-       public static void printLog( final String logMsg ) {
-               try {
-                       if (LOG_TO_FILE) {
-                               if (setInit == false) {
-                                       setInit = true;
-                                       init();
-                               }
-                               dos.writeBytes( logMsg );
-                               dos.writeChars("\n");
+       public static void printLog(final String logMsg) {
+
+               if (LOG_TO_FILE) {
+                       if (setInit == false) {
+                               setInit = true;
+                               init();
+                       }
+                       try {
+                               dos.writeBytes(logMsg);
+                       } catch (IOException e) {
+                               e.printStackTrace();
+                       }
+                       try {
+                               dos.writeChars("\n");//$NON-NLS-1$
+                       } catch (IOException e) {
+                               e.printStackTrace();
+                       }
+                       try {
                                dos.flush();
-                       } else {
-                               System.out.println(logMsg);
+                       } catch (IOException e) {
+                               e.printStackTrace();
                        }
-               } catch (Exception e) {
-                       e.printStackTrace();
+               } else {
+                       System.out.println(logMsg);
                }
+
        }
 
-       public static void printLog( Exception errMsg ) {
-               try {
-                       if (LOG_TO_FILE) {
-                               if (setInit == false) {
-                                       setInit = true;
-                                       init();
-                               }
-                               dos.writeBytes( printStackTraceToString(errMsg) );
-                               dos.writeChars("\n");
+       public static void printLog(Exception errMsg) {
+
+               if (LOG_TO_FILE) {
+                       if (setInit == false) {
+                               setInit = true;
+                               init();
+                       }
+                       try {
+                               dos.writeBytes(printStackTraceToString(errMsg));
+                       } catch (IOException e) {
+                               e.printStackTrace();
+                       }
+                       try {
+                               dos.writeChars("\n");//$NON-NLS-1$
+                       } catch (IOException e) {
+                               e.printStackTrace();
+                       }
+                       try {
                                dos.flush();
-                       } else {
-                               errMsg.printStackTrace();
+                       } catch (IOException e) {
+                               e.printStackTrace();
                        }
-               } catch (Exception e) {
-                       e.printStackTrace();
+               } else {
+                       errMsg.printStackTrace();
                }
+
        }
 
-       private static String printStackTraceToString( Throwable e ) {
+       private static String printStackTraceToString(Throwable e) {
                StringBuilder sb = new StringBuilder();
-               try {
-                       sb.append(e.toString());
-                       sb.append("\n");
-                       StackTraceElement element[] = e.getStackTrace();
-                       for (int idx = 0; idx < element.length; idx++) {
-                               sb.append("\tat ");
-                               sb.append(element[idx].toString());
-                               sb.append("\n");
-                       }
-               } catch (Exception ex) {
-                       return e.toString();
+               String returnString = null;
+               sb.append(e.toString());
+               sb.append("\n");//$NON-NLS-1$
+               StackTraceElement element[] = e.getStackTrace();
+               for (int idx = 0; idx < element.length; idx++) {
+                       sb.append("\tat ");//$NON-NLS-1$
+                       sb.append(element[idx].toString());
+                       sb.append("\n");//$NON-NLS-1$
                }
-               return sb.toString();
+               returnString = sb.toString();
+               return returnString;
        }
        
     public static void dlgErrorMessage( final String title, final String message ) {
index f924620..e4c9dc5 100644 (file)
@@ -117,11 +117,11 @@ public class DAServerManager extends Thread {
                                                while (true) {
                                                        closeClientSokcet();
                                                        try {
-                                                               DALog.printLog("Waiting DA"); //$NON-NLS-1$
+                                                               DALog.printLog("Waiting DA");
                                                                clientSocket = serverSocket.accept();
-                                                               DALog.printLog("Conneced DA"); //$NON-NLS-1$
+                                                               DALog.printLog("Conneced DA");
                                                        } catch (IOException e) {
-                                                               e.printStackTrace();
+                                                               DALog.printLog("DAServerManager - run - IOException");
                                                                break;
                                                        }
 
@@ -137,7 +137,7 @@ public class DAServerManager extends Thread {
                                        }
                                        Thread.sleep(50);
                                } catch (InterruptedException e) {
-                                       DALog.printLog("InterruptedException"); //$NON-NLS-1$
+                                       DALog.printLog("DAServerManager - run - InterruptedException");
                                        break;
                                }
                        }
@@ -178,7 +178,7 @@ public class DAServerManager extends Thread {
                                }
                        }
                } catch (IOException e) {
-                       DALog.printLog(e);
+                       DALog.printLog("DAServerManager - waitingDataReceive - IOException");
                }
        }
 
@@ -235,10 +235,10 @@ public class DAServerManager extends Thread {
 
                } catch (FileNotFoundException e) {
                        bSuccess = false;
-                       DALog.printLog(e);
+                       DALog.printLog("DAServerManager - savePortFile - FileNotFoundException");
                } catch (IOException e) {
                        bSuccess = false;
-                       DALog.printLog(e);
+                       DALog.printLog("DAServerManager - savePortFile - IOException");
                }
                return bSuccess;
        }
@@ -247,20 +247,25 @@ public class DAServerManager extends Thread {
        private boolean setActiveDAPlugin() {
                File file = null;
                FileChannel fchannel = null;
+
+               StringBuffer savePortPath = new StringBuffer();
+               savePortPath.append(InstallPathConfig.getUserDataPath())
+                               .append(File.separatorChar).append(DANAIC_ANALYZER)
+                               .append(File.separatorChar).append(SAVE)
+                               .append(File.separatorChar).append(ACTIVE_DA_PLUGIN);
+               file = new File(savePortPath.toString());
                try {
-                       StringBuffer savePortPath = new StringBuffer();
-                       savePortPath.append(InstallPathConfig.getUserDataPath())
-                                       .append(File.separatorChar).append(DANAIC_ANALYZER)
-                                       .append(File.separatorChar).append(SAVE)
-                                       .append(File.separatorChar).append(ACTIVE_DA_PLUGIN);
-;
-                       file = new File(savePortPath.toString());
                        fchannel = new RandomAccessFile(file, "rw").getChannel();//$NON-NLS-1$
+               } catch (FileNotFoundException e) {
+                       DALog.printLog("DAServerManager - setActiveDAPlugin - FileNotFoundException");
+               }
+               try {
                        fchannel.tryLock();
-                       return true;
-               } catch (Exception e) {
-                       return true;
+               } catch (IOException e) {
+                       DALog.printLog("DAServerManager - setActiveDAPlugin - IOException");
                }
+
+               return true;
        }
 
        // Send Message DA Status
@@ -273,7 +278,7 @@ public class DAServerManager extends Thread {
                try {
                        sendData(command.toString());
                } catch (IOException e) {
-                       DALog.printLog(e);
+                       DALog.printLog("DAServerManager - sendDAStatusMessage - IOException");
                        DALog.dlgErrorMessage(Labels.MESSAGE_ERROR, Labels.MESSAGE_FAIL_TO_LAUNCH_PROJECT);
                }
        }
@@ -289,7 +294,7 @@ public class DAServerManager extends Thread {
                try {
                        DAServerManager.sendData(command.toString());
                } catch (IOException e) {
-                       DALog.printLog(e);
+                       DALog.printLog("DAServerManager - runTraceApplication - IOException");
                        DALog.dlgErrorMessage(Labels.MESSAGE_ERROR, Labels.MESSAGE_FAIL_TO_LAUNCH_PROJECT);
                }
        }
@@ -353,7 +358,7 @@ public class DAServerManager extends Thread {
                        try {
                                serverSocket.close();
                        } catch (IOException e) {
-                               e.printStackTrace();
+                               DALog.printLog("DAServerManager - closeServerSokcet - IOException");
                        }
                        serverSocket = null;
                }
@@ -364,7 +369,7 @@ public class DAServerManager extends Thread {
                        try {
                                writer.close();
                        } catch (IOException e) {
-                               e.printStackTrace();
+                               DALog.printLog("DAServerManager - closeClientSokcet1 - IOException");
                        }
                        writer = null;
                }
@@ -372,7 +377,7 @@ public class DAServerManager extends Thread {
                        try {
                                clientSocket.close();
                        } catch (IOException e) {
-                               e.printStackTrace();
+                               DALog.printLog("DAServerManager - closeClientSokcet2 - IOException");
                        }
                        clientSocket = null;
                }
index 0b910e7..8da55e5 100644 (file)
@@ -38,6 +38,7 @@ import org.eclipse.jface.text.BadLocationException;
 import org.eclipse.jface.text.IDocument;
 import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.ide.IDE;
 import org.eclipse.ui.texteditor.IDocumentProvider;
@@ -91,29 +92,29 @@ public class OpenEditManager implements Runnable
            }
        }
 
-       private IEditorPart openEditor(final IFile ifile) 
-       {               
-               //editor open
-           IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
-           try {
-               IDE.openEditor(page, ifile);
-           } catch ( Exception e ) {
-               DALog.printLog(e);
-           }
-           
-           return page.getActiveEditor();      
+       private IEditorPart openEditor(final IFile ifile) {
+               // editor open
+               IWorkbenchPage page = PlatformUI.getWorkbench()
+                               .getActiveWorkbenchWindow().getActivePage();
+               try {
+                       IDE.openEditor(page, ifile);
+               } catch (PartInitException e) {
+                       DALog.printLog("OpenEditManager - openEditor - PartInitException");
+               }
+
+               return page.getActiveEditor();
        }
        
-       private IEditorPart openEditor(final IFileStore ifilestr)
-       {
-           IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
-           try {
-               IDE.openEditorOnFileStore(page, ifilestr);
-           } catch ( Exception e ) {
-               DALog.printLog(e);
-           }
-           
-           return page.getActiveEditor();      
+       private IEditorPart openEditor(final IFileStore ifilestr) {
+               IWorkbenchPage page = PlatformUI.getWorkbench()
+                               .getActiveWorkbenchWindow().getActivePage();
+               try {
+                       IDE.openEditorOnFileStore(page, ifilestr);
+               } catch (PartInitException e) {
+                       DALog.printLog("OpenEditManager - openEditor - PartInitException");
+               }
+
+               return page.getActiveEditor();
        }
        
        private ITextEditor getEditor()
@@ -140,12 +141,12 @@ public class OpenEditManager implements Runnable
                        fm.start();
                }
                catch (IOException e)
-               {                                                                               
-                       DALog.printLog(e);
+               {                                               
+                       DALog.printLog("OpenEditManager - run - IOException");
                }
                catch (BadLocationException e)
                {               
-                       DALog.printLog(e);                      
+                       DALog.printLog("OpenEditManager - run - BadLocationException");
                }
        }
        
index 48b60fe..b82e407 100644 (file)
@@ -27,24 +27,19 @@ package org.tizen.dynamicanalysis.ide.eplugin.communication;
 
 
 import org.eclipse.ui.IStartup;
-import org.tizen.dynamicanalysis.ide.eplugin.DALog;
 
 public class ServerStartup implements IStartup {
 
        private static DAServerManager server;
-       
+
        @Override
        public void earlyStartup() {
                // TODO Auto-generated method stub
                server = DAServerManager.getInstance();
-               try{
-                       Thread thread = server;
-                       thread.start();                 
-               } catch(Exception e){                   
-                       DALog.printLog( e );
-               }
+               Thread thread = server;
+               thread.start();
        }
-       
+
        public static void stopServeThread() {
                server.interrupt();
        }
index c6b6134..e5cf7ff 100644 (file)
@@ -38,16 +38,17 @@ public class DynamicOptionValueHandler implements IManagedOptionValueHandler {
        @Override
        public boolean handleValue(IBuildObject configuration,
                        IHoldsOptions holder, IOption option, String extraArgument,
-                       int event) {    
-               
+                       int event) {
+
                IConfiguration config = null;
 
                // handle just APPLY
-               if (event != IManagedOptionValueHandler.EVENT_OPEN &&
-                               event != IManagedOptionValueHandler.EVENT_APPLY)
+               if (event != IManagedOptionValueHandler.EVENT_OPEN
+                               && event != IManagedOptionValueHandler.EVENT_APPLY) {
                        return false;
+               }
 
-               if (configuration instanceof FolderInfo) {                      
+               if (configuration instanceof FolderInfo) {
                        return false;
                } else {
                        config = (IConfiguration) configuration;
@@ -60,13 +61,15 @@ public class DynamicOptionValueHandler implements IManagedOptionValueHandler {
                } else if (configuration.getName().contains("Emulator")) {//$NON-NLS-1$
                        libPath = libPath + "/x86\"";//$NON-NLS-1$
                }
-               
+
                String includePath = "\"${SDK_INSTALL_PATH}/library\"";//$NON-NLS-1$
-               CommonConfigurationManager.appendIncludePathToCompiler(config, includePath);
+               CommonConfigurationManager.appendIncludePathToCompiler(config,
+                               includePath);
                CommonConfigurationManager.appendLibraryToLinker(config, linklib);
                CommonConfigurationManager.appendLinkPathsToLinker(config, libPath);
-               CommonConfigurationManager.appendPreprocessorSymbolToCompiler(config, customchartSymbol);
-               
+               CommonConfigurationManager.appendPreprocessorSymbolToCompiler(config,
+                               customchartSymbol);
+
                return false;
        }
 
index 53f4693..cbfa484 100644 (file)
@@ -27,8 +27,10 @@ package org.tizen.dynamicanalysis.ide.eplugin.launch;
 
 import java.io.File;
 import java.io.FileInputStream;
+import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
 import java.io.FilenameFilter;
+import java.io.IOException;
 import java.lang.reflect.InvocationTargetException;
 import java.nio.channels.FileChannel;
 import java.util.ArrayList;
@@ -136,37 +138,40 @@ public class TizenNativeApplicationProfileDelegate implements ILaunchConfigurati
                TizenNativeApplicationProfileDelegate.project = project;
                IConfiguration config = ManagedBuildManager.getBuildInfo(project).getDefaultConfiguration();
                IProjectLaunchCommand manifest = ProjectUtil.getProjectManifest(project);
-               String launchArchitecture = manifest.getArchitecture(config);
-               List<IDevice> connectedDeviceList = Arrays.asList(SmartDevelopmentBridge.getBridge().getDevices());
-               List<IDevice> matchedDeviceList = new ArrayList<IDevice>();
-               if(LaunchUtils.isX86(launchArchitecture)){
-                       for(IDevice device : connectedDeviceList) {
-                               if(device.getArch().equals(Arch.X86)) {
-                                       matchedDeviceList.add(device);
-                               }
-                       }
-               } else {
-                       for(IDevice device : connectedDeviceList) {
-                               if(device.getArch().equals(Arch.ARM)) {
-                                       matchedDeviceList.add(device);
-                               }
-                       }
-               }
-               
+        String launchArchitecture = manifest.getArchitecture(config);
+        List<IDevice> connectedDeviceList = Arrays.asList(SmartDevelopmentBridge.getBridge().getDevices());
+        List<IDevice> matchedDeviceList = new ArrayList<IDevice>();
+        if(LaunchUtils.isX86(launchArchitecture)) {
+               for(IDevice device : connectedDeviceList){
+                       if(device.getArch().equals(Arch.X86)) {
+                               matchedDeviceList.add(device);
+                       }
+               }
+        }
+        else {
+               for(IDevice device : connectedDeviceList){
+                       if(device.getArch().equals(Arch.ARM)) {
+                               matchedDeviceList.add(device);
+                       }
+               }
+        }
+        
                if(matchedDeviceList.size() > 1) {
                        Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
-                       TizenLaunchDeviceSelectionDialog devicediDialog = new TizenLaunchDeviceSelectionDialog(shell, matchedDeviceList);
-                       if(devicediDialog.open() == Window.OK) {
-                               currentDevice = devicediDialog.getSelectedDevice();
-                       } else {
-                               currentDevice = null;
-                       }
-               } else if(matchedDeviceList.size() == 1) {
+               TizenLaunchDeviceSelectionDialog deviceDialog = new TizenLaunchDeviceSelectionDialog(shell, matchedDeviceList);
+               if(deviceDialog.open() == Window.OK)
+               {
+                   currentDevice = deviceDialog.getSelectedDevice();
+               }
+               else
+               {
+                   currentDevice = null;
+               }
+               } else if(matchedDeviceList.size() == 1){
                        currentDevice = matchedDeviceList.get(0);
                } else {
                        currentDevice = null;
                }
-               
                if (currentDevice == null) {
                        DALog.dlgErrorMessage(Labels.MESSAGE_ERROR, TizenLaunchMessages.CANNOT_CONNECT_TO_DEVICE);
                } else {
@@ -179,7 +184,7 @@ public class TizenNativeApplicationProfileDelegate implements ILaunchConfigurati
                                        try {
                                                Thread.sleep(10);
                                        } catch (InterruptedException e) {
-                                               DALog.printLog(e);
+                                               DALog.printLog("TizenNativeApplicationProfileDelegate - profileManager - InterruptedException");
                                        }
                                        bWaitReceiveDataCount--;
                                }
@@ -224,17 +229,20 @@ public class TizenNativeApplicationProfileDelegate implements ILaunchConfigurati
                                DALog.dlgErrorMessage(Labels.MESSAGE_ERROR, Labels.MESSAGE_FAIL_TO_LAUNCH_PROJECT);
                        }
                }
-
        }
 
        private static boolean copyDAProbeFile() {
-               CommonProjectDependentBuilder builder = ProjectTypeManager.getProjectBuilderInstance(project);
+               CommonProjectDependentBuilder builder = ProjectTypeManager
+                               .getProjectBuilderInstance(project);
                strProjectDAProvePath = new StringBuffer();
-               strProjectDAProvePath.append(builder.getProjectPath()).append(File.separatorChar)
+               strProjectDAProvePath.append(builder.getProjectPath())
+                               .append(File.separatorChar)
                                .append("lib").append(File.separatorChar).append(LIBDAPROBE_SO); //$NON-NLS-1$
 
                strSDKDAProbePath = new StringBuffer();
-               strSDKDAProbePath.append(InstallPathConfig.getSDKPath()).append(File.separatorChar)
+               strSDKDAProbePath
+                               .append(InstallPathConfig.getSDKPath())
+                               .append(File.separatorChar)
                                .append("library").append(File.separatorChar).append("da").append(File.separatorChar);//$NON-NLS-1$ $NON-NLS-2$
 
                if (currentDevice.getArch().equals(Arch.X86)) {
@@ -244,10 +252,10 @@ public class TizenNativeApplicationProfileDelegate implements ILaunchConfigurati
                }
                strSDKDAProbePath.append(LIBDAPROBE_SO);//$NON-NLS-1$
 
+               File inFile = new File(strSDKDAProbePath.toString());
+               FileInputStream inputStream;
                try {
-                       File inFile = new File(strSDKDAProbePath.toString());
-                       FileInputStream inputStream = new FileInputStream(inFile);
-
+                       inputStream = new FileInputStream(inFile);
                        File outFile = new File(strProjectDAProvePath.toString());
                        FileOutputStream outputStream = new FileOutputStream(outFile);
 
@@ -255,6 +263,7 @@ public class TizenNativeApplicationProfileDelegate implements ILaunchConfigurati
                        FileChannel fcout = outputStream.getChannel();
 
                        long size = fcin.size();
+
                        fcin.transferTo(0, size, fcout);
 
                        fcout.close();
@@ -263,22 +272,19 @@ public class TizenNativeApplicationProfileDelegate implements ILaunchConfigurati
                        outputStream.close();
                        inputStream.close();
                        return true;
-
-               } catch (Exception e) {
-                       DALog.printLog(e);
-                       return false;
+               } catch (FileNotFoundException e) {
+                       DALog.printLog("TizenNativeApplicationProfileDelegate - copyDAProbeFile - FileNotFoundException");
+               } catch (IOException e) {
+                       DALog.printLog("TizenNativeApplicationProfileDelegate - copyDAProbeFile - IOException");
                }
+
+               return false;
        }
 
        private static boolean deleteDAProbeFile() {
-               try {
-                       File deleteFile = new File(strProjectDAProvePath.toString());
-                       deleteFile.delete();
-                       return true;
-               } catch (Exception e) {
-                       DALog.printLog(e);
-                       return false;
-               }
+               File deleteFile = new File(strProjectDAProvePath.toString());
+               deleteFile.delete();
+               return true;
        }
 
        private static void profileWithDABuild() {
@@ -291,191 +297,201 @@ public class TizenNativeApplicationProfileDelegate implements ILaunchConfigurati
                                IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
                                ProgressMonitorDialog dialog = new ProgressMonitorDialog(window.getShell());
 
-                               try {
-                                       dialog.run(true, true, new IRunnableWithProgress() {
-                                               @SuppressWarnings("deprecation")
-                                               @Override
-                                               public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
-                                                       try {
-                                                               monitor.beginTask(Labels.MESSAGE_PREPARING_PROFILE, 1);
-                                                               if (verifyDeviceReachability(currentDevice, project)) {
-                                                                       monitor.done();
-                                                                       DALog.dlgErrorMessage(Labels.MESSAGE_ERROR, Labels.MESSAGE_FAIL_TO_BUILD_PROJECT);
-                                                                       bSuccessBuild = false;
-                                                                       return;
-                                                               }
-
-                                                               IProjectLaunchCommand manifest = null;
-
-                                                               //
-                                                               // package build
-                                                               //
-                                                               final String configName;
-                                                               IStatus status = null;
-                                                               if (currentDevice.getArch().equals(Arch.X86)) {
-                                                                       configName = CONFIG_NAME_EMULATOR;
-                                                               } else {
-                                                                       configName = CONFIG_NAME_DEVICE;
-                                                               }
-                                                               prevBuildConfiguration = ManagedBuildManager.getBuildInfo(project).getConfigurationName();
-                                                               ManagedBuildManager.getBuildInfo(project).setDefaultConfiguration(configName);
-                                                               Display.getDefault().asyncExec(new Runnable() {
-                                                                       @Override
-                                                                       public void run() {
-                                                                               ConfigurationActionManager.notifyConfigurationSelectionChangedListener(configName);
+                                       try {
+                                               dialog.run(true, true, new IRunnableWithProgress() {
+                                                       @SuppressWarnings("deprecation")
+                                                       @Override
+                                                       public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+                                                               try {
+                                                                       monitor.beginTask(Labels.MESSAGE_PREPARING_PROFILE, 1);
+                                                                       if (verifyDeviceReachability(currentDevice, project)) {
+                                                                               monitor.done();
+                                                                               DALog.dlgErrorMessage(Labels.MESSAGE_ERROR, Labels.MESSAGE_FAIL_TO_BUILD_PROJECT);
+                                                                               bSuccessBuild = false;
+                                                                               return;
                                                                        }
-                                                               });
-
-                                                               CommonProjectDependentPackager packager = ProjectTypeManager.getProjectPackagerInstance(project);
-                                                               // CheckCancelJob cancelJob = new
-                                                               // CheckCancelJob(monitor, project,
-                                                               // packager.getSbi(),
-                                                               // false);
 
-                                                               try {
-                                                                       project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, monitor);
-                                                                       monitor.beginTask(Labels.MESSAGE_PREPARING_PROFILE, 3);
-                                                                       monitor.subTask(Labels.MESSAGE_BUILDING_PACKAGE);
-
-                                                                       IMarker[] markers = project.findMarkers(ICModelMarker.C_MODEL_PROBLEM_MARKER, true, IResource.DEPTH_INFINITE);
-                                                                       for (int i = 0; i < markers.length; i++) {
-                                                                               IMarker marker = markers[i];
-                                                                               int priority = marker.getAttribute(IMarker.SEVERITY, -1);
-                                                                               if (priority == IMarker.SEVERITY_ERROR) {
-                                                                                       monitor.done();
-                                                                                       bSuccessBuild = false;
-                                                                                       DALog.dlgErrorMessage(Labels.MESSAGE_ERROR, Labels.MESSAGE_FAIL_TO_BUILD_PROJECT);
-                                                                                       return;
+                                                                       IProjectLaunchCommand manifest = null;
+
+                                                                       //
+                                                                       // package build
+                                                                       //
+                                                                       final String configName;
+                                                                       IStatus status = null;
+                                                                       if (currentDevice.getArch().equals(Arch.X86)) {
+                                                                               configName = CONFIG_NAME_EMULATOR;
+                                                                       } else {
+                                                                               configName = CONFIG_NAME_DEVICE;
+                                                                       }
+                                                                       prevBuildConfiguration = ManagedBuildManager.getBuildInfo(project).getConfigurationName();
+                                                                       ManagedBuildManager.getBuildInfo(project).setDefaultConfiguration(configName);
+                                                                       Display.getDefault().asyncExec(new Runnable() {
+                                                                               @Override
+                                                                               public void run() {
+                                                                                       ConfigurationActionManager.notifyConfigurationSelectionChangedListener(configName);
                                                                                }
+                                                                       });
+
+                                                                       CommonProjectDependentPackager packager = ProjectTypeManager.getProjectPackagerInstance(project);
+                                                                       // CheckCancelJob cancelJob = new
+                                                                       // CheckCancelJob(monitor, project,
+                                                                       // packager.getSbi(),
+                                                                       // false);
+
+                                                                       try {
+                                                                               project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, monitor);
+                                                                               monitor.beginTask(Labels.MESSAGE_PREPARING_PROFILE, 3);
+                                                                               monitor.subTask(Labels.MESSAGE_BUILDING_PACKAGE);
+
+                                                                               IMarker[] markers = project.findMarkers(ICModelMarker.C_MODEL_PROBLEM_MARKER, true, IResource.DEPTH_INFINITE);
+                                                                               for (int i = 0; i < markers.length; i++) {
+                                                                                       IMarker marker = markers[i];
+                                                                                       int priority = marker.getAttribute(IMarker.SEVERITY, -1);
+                                                                                       if (priority == IMarker.SEVERITY_ERROR) {
+                                                                                               monitor.done();
+                                                                                               bSuccessBuild = false;
+                                                                                               DALog.dlgErrorMessage(Labels.MESSAGE_ERROR, Labels.MESSAGE_FAIL_TO_BUILD_PROJECT);
+                                                                                               return;
+                                                                                       }
+                                                                               }
+                                                                               manifest = ProjectUtil.getProjectManifest(project);
+                                                                               manifest.doMultiAppPreProcess(packager, monitor);
+                                                                               // Thread checkCancelThread = new
+                                                                               // Thread(cancelJob);
+                                                                               // checkCancelThread.start();
+
+                                                                               IPreferenceStore store = SigningProfileUtil.getPreferenceStore();
+                                                                               packager.buildPackage(pkgType, store.getBoolean(SigningPreferencePage.testCertKey));
+
+                                                                               // cancelJob.setFinishFlag(true);
+                                                                       } catch (SBIException e) {
+                                                                               DALog.printLog("TizenNativeApplicationProfileDelegate - profileWithDABuild - SBIException");
+                                                                               status = new Status(Status.ERROR, Activator.PLUGIN_ID, CommonBuildMessages.FAIL_TO_BUILD_PACKAGE);
+                                                                               monitor.done();
+                                                                               DALog.dlgErrorMessage(Labels.MESSAGE_ERROR, Labels.MESSAGE_FAIL_TO_BUILD_PROJECT);
+                                                                               bSuccessBuild = false;
+                                                                       } catch (CoreException e) {
+                                                                               DALog.printLog("TizenNativeApplicationProfileDelegate - profileWithDABuild - CoreException");
+                                                                               status = new Status(Status.ERROR, Activator.PLUGIN_ID, e.getMessage());
+                                                                               monitor.done();
+                                                                               DALog.dlgErrorMessage(Labels.MESSAGE_ERROR, Labels.MESSAGE_FAIL_TO_BUILD_PROJECT);
+                                                                               bSuccessBuild = false;
                                                                        }
-                                                                       manifest = ProjectUtil.getProjectManifest(project);
-                                                                       manifest.doMultiAppPreProcess(packager, monitor);
-                                                                       // Thread checkCancelThread = new
-                                                                       // Thread(cancelJob);
-                                                                       // checkCancelThread.start();
-
-                                                                       IPreferenceStore store = SigningProfileUtil.getPreferenceStore();
-                                                                       packager.buildPackage(pkgType, store.getBoolean(SigningPreferencePage.testCertKey));
-
-                                                                       // cancelJob.setFinishFlag(true);
-                                                               } catch (SBIException e) {
-                                                                       DALog.printLog(e);
-                                                                       status = new Status(Status.ERROR, Activator.PLUGIN_ID, CommonBuildMessages.FAIL_TO_BUILD_PACKAGE);
-                                                                       // cancelJob.setFinishFlag(true);
-                                                                       monitor.done();
-                                                                       DALog.dlgErrorMessage(Labels.MESSAGE_ERROR, Labels.MESSAGE_FAIL_TO_BUILD_PROJECT);
-                                                                       bSuccessBuild = false;
-                                                                       return;
-                                                               } catch (CoreException e) {
-                                                                       DALog.printLog(e);
-                                                                       status = new Status(Status.ERROR, Activator.PLUGIN_ID, e.getMessage());
-                                                                       // cancelJob.setFinishFlag(true);
-                                                                       monitor.done();
-                                                                       DALog.dlgErrorMessage(Labels.MESSAGE_ERROR, Labels.MESSAGE_FAIL_TO_BUILD_PROJECT);
-                                                                       bSuccessBuild = false;
-                                                                       return;
-                                                               }
 
-                                                               if (packager.checkPackageFile(pkgType)) {
-                                                                       status = new Status(Status.OK, Activator.PLUGIN_ID, CommonBuildMessages.SUCCESS_TO_BUILD_PACKAGE);
-                                                               } else {
-                                                                       monitor.done();
-                                                                       status = new Status(Status.ERROR, Activator.PLUGIN_ID, CommonBuildMessages.FAIL_TO_BUILD_PACKAGE);
-                                                                       DALog.dlgErrorMessage(CommonBuildMessages.BUILD_RESULT, status.getMessage());
-                                                                       bSuccessBuild = false;
-                                                                       return;
-                                                               }
-                                                               //
-                                                               // app upload
-                                                               //
-                                                               File packageFile = null;
-                                                               try {
-                                                                       monitor.worked(2);
-                                                                       monitor.subTask(TizenLaunchMessages.TRANSFER_PACKAGE);
-
-                                                                       String packageDirectory = File.separatorChar + configName + File.separatorChar;
-                                                                       IPath packagePath = new Path(project.getLocation().toString() + packageDirectory);
-                                                                       packageFile = findPackageFile(packagePath.toFile(), "." + pkgType.toLowerCase(), project);//$NON-NLS-1$
-                                                                       if (packageFile == null) {
-                                                                               newCoreException(TizenLaunchMessages.CANNOT_TRANSFER_FILE, null);
+                                                                       if (bSuccessBuild == false){
+                                                                               return;
+                                                                       }
+                                                                       
+                                                                       if (packager.checkPackageFile(pkgType)) {
+                                                                               status = new Status(Status.OK, Activator.PLUGIN_ID, CommonBuildMessages.SUCCESS_TO_BUILD_PACKAGE);
+                                                                       } else {
+                                                                               monitor.done();
+                                                                               status = new Status(Status.ERROR, Activator.PLUGIN_ID, CommonBuildMessages.FAIL_TO_BUILD_PACKAGE);
+                                                                               DALog.dlgErrorMessage(CommonBuildMessages.BUILD_RESULT, status.getMessage());
+                                                                               bSuccessBuild = false;
+                                                                               return;
                                                                        }
+                                                                       
+                                                                       //
+                                                                       // app upload
+                                                                       //
+                                                                       File packageFile = null;
+                                                                       try {
+                                                                               monitor.worked(2);
+                                                                               monitor.subTask(TizenLaunchMessages.TRANSFER_PACKAGE);
+
+                                                                               String packageDirectory = File.separatorChar + configName + File.separatorChar;
+                                                                               IPath packagePath = new Path(project.getLocation().toString() + packageDirectory);
+                                                                               packageFile = findPackageFile(packagePath.toFile(), "." + pkgType.toLowerCase(), project);//$NON-NLS-1$
+                                                                               if (packageFile == null) {
+                                                                                       newCoreException(TizenLaunchMessages.CANNOT_TRANSFER_FILE, null);
+                                                                               }
 
-                                                                       String destDirectoryPath = TizenPlatformConstants.TEMPORARY_PKG_PATH;
+                                                                               String destDirectoryPath = TizenPlatformConstants.TEMPORARY_PKG_PATH;
 
-                                                                       String srcFilePath = packageFile.getAbsoluteFile().getCanonicalPath();
-                                                                       String destFilePath = destDirectoryPath + packageFile.getAbsoluteFile().getName();
+                                                                               String srcFilePath = packageFile.getAbsoluteFile().getCanonicalPath();
+                                                                               String destFilePath = destDirectoryPath + packageFile.getAbsoluteFile().getName();
 
-                                                                       SyncResult syncSuccess = currentDevice.getSyncService().pushFile(srcFilePath, destFilePath,
-                                                                                       SyncService.getNullProgressMonitor());
+                                                                               SyncResult syncSuccess = currentDevice.getSyncService().pushFile(srcFilePath, destFilePath,
+                                                                                               SyncService.getNullProgressMonitor());
 
-                                                                       if (syncSuccess.getCode() != SyncService.RESULT_OK) {
-                                                                               newCoreException(TizenLaunchMessages.CANNOT_TRANSFER_FILE, null);
+                                                                               if (syncSuccess.getCode() != SyncService.RESULT_OK) {
+                                                                                       newCoreException(TizenLaunchMessages.CANNOT_TRANSFER_FILE, null);
+                                                                               }
+                                                                       } catch (CoreException e) {
+                                                                               DALog.printLog("TizenNativeApplicationProfileDelegate - profileWithDABuild - CoreException");
+                                                                               monitor.done();
+                                                                               DALog.dlgErrorMessage(Labels.MESSAGE_ERROR, TizenLaunchMessages.CANNOT_TRANSFER_FILE);
+                                                                               bSuccessBuild = false;
+                                                                       } catch (IOException e) {
+                                                                               DALog.printLog("TizenNativeApplicationProfileDelegate - profileWithDABuild - IOException");
+                                                                               monitor.done();
+                                                                               DALog.dlgErrorMessage(Labels.MESSAGE_ERROR, TizenLaunchMessages.CANNOT_TRANSFER_FILE);
+                                                                               bSuccessBuild = false;
+                                                                       }
+                                                                       if (bSuccessBuild == false){
+                                                                               return;
                                                                        }
-                                                               } catch (CoreException e) {
-                                                                       monitor.done();
-                                                                       DALog.dlgErrorMessage(Labels.MESSAGE_ERROR, TizenLaunchMessages.CANNOT_TRANSFER_FILE);
-                                                                       bSuccessBuild = false;
-                                                                       return;
-                                                               } catch (Exception e) {
-                                                                       monitor.done();
-                                                                       DALog.dlgErrorMessage(Labels.MESSAGE_ERROR, TizenLaunchMessages.CANNOT_TRANSFER_FILE);
-                                                                       bSuccessBuild = false;
-                                                                       return;
-                                                               }
 
-                                                               //
-                                                               // app install
-                                                               //
-                                                               try {
-                                                                       monitor.worked(1);
-                                                                       monitor.subTask(TizenLaunchMessages.INSTALL_PACKAGE);
-
-                                                                       // check old application
-                                                                       String packageName = manifest.getPackageName();
-                                                                       String listCmd = manifest.getListCommand();
-                                                                       String listCmdRet = manifest.getListCommandResult();
-                                                                       TizenLaunchCommand launcher = new TizenLaunchCommand(currentDevice);
-                                                                       launcher.run(listCmd);
-
-                                                                       String endLine = launcher.getEndLine();
-                                                                       if (endLine != null && endLine.contains(listCmdRet)) {
-                                                                               // remove old application
-                                                                               String removeCmd = manifest.getRemoveCommand(packageName);
-
-                                                                               try {
-                                                                                       launcher.run(removeCmd);
-                                                                               } catch (TizenNativeException e) {
-                                                                                       DALog.dlgErrorMessage(Labels.MESSAGE_ERROR, TizenLaunchMessages.CANNOT_INSTALL);
-                                                                                       bSuccessBuild = false;
+                                                                       //
+                                                                       // app install
+                                                                       //
+                                                                       try {
+                                                                               monitor.worked(1);
+                                                                               monitor.subTask(TizenLaunchMessages.INSTALL_PACKAGE);
+
+                                                                               // check old application
+                                                                               String packageName = manifest.getPackageName();
+                                                                               String listCmd = manifest.getListCommand();
+                                                                               String listCmdRet = manifest.getListCommandResult();
+                                                                               TizenLaunchCommand launcher = new TizenLaunchCommand(currentDevice);
+                                                                               launcher.run(listCmd);
+
+                                                                               String endLine = launcher.getEndLine();
+                                                                               if (endLine != null && endLine.contains(listCmdRet)) {
+                                                                                       // remove old application
+                                                                                       String removeCmd = manifest.getRemoveCommand(packageName);
+
+                                                                                       try {
+                                                                                               launcher.run(removeCmd);
+                                                                                       } catch (TizenNativeException e) {
+                                                                                               DALog.dlgErrorMessage(Labels.MESSAGE_ERROR, TizenLaunchMessages.CANNOT_INSTALL);
+                                                                                               bSuccessBuild = false;
+                                                                                       }
                                                                                }
-                                                                       }
 
-                                                                       String installCmd = manifest.getInstallCommand(packageFile, pkgType.toLowerCase());
-                                                                       launcher.run(installCmd);
-                                                               } catch (CoreException e) {
-                                                                       monitor.done();
-                                                                       DALog.dlgErrorMessage(Labels.MESSAGE_ERROR, TizenLaunchMessages.CANNOT_INSTALL);
-                                                                       bSuccessBuild = false;
-                                                                       return;
-                                                               } catch (Exception e) {
+                                                                               String installCmd = manifest.getInstallCommand(packageFile, pkgType.toLowerCase());
+                                                                               launcher.run(installCmd);
+                                                                       } catch (CoreException e) {
+                                                                               DALog.printLog("TizenNativeApplicationProfileDelegate - profileWithDABuild - app install -CoreException");
+                                                                               monitor.done();
+                                                                               DALog.dlgErrorMessage(Labels.MESSAGE_ERROR, TizenLaunchMessages.CANNOT_INSTALL);
+                                                                               bSuccessBuild = false;
+                                                                       } catch (Exception e) {
+                                                                               DALog.printLog("TizenNativeApplicationProfileDelegate - profileWithDABuild - app install -CoreException");
+                                                                               monitor.done();
+                                                                               DALog.dlgErrorMessage(Labels.MESSAGE_ERROR, TizenLaunchMessages.CANNOT_INSTALL);
+                                                                               bSuccessBuild = false;
+                                                                       }
+                                                                       if (bSuccessBuild == false){
+                                                                               return;
+                                                                       }
+                                                               } finally {
                                                                        monitor.done();
-                                                                       DALog.dlgErrorMessage(Labels.MESSAGE_ERROR, TizenLaunchMessages.CANNOT_INSTALL);
-                                                                       bSuccessBuild = false;
-                                                                       return;
                                                                }
-
-                                                               monitor.done();
-
-                                                       } finally {
-
                                                        }
-                                               }
-                                       });
-                               } catch (Exception e) {
-                                       DALog.printLog(e);
-                                       DALog.dlgErrorMessage(Labels.MESSAGE_ERROR, Labels.MESSAGE_FAIL_TO_BUILD_PROJECT);
-                                       bSuccessBuild = false;
-                               }
+                                               });
+                                       } catch (InvocationTargetException e) {
+                                               DALog.printLog(e);
+                                               DALog.dlgErrorMessage(Labels.MESSAGE_ERROR, Labels.MESSAGE_FAIL_TO_BUILD_PROJECT);
+                                               bSuccessBuild = false;
+                                               DALog.printLog("TizenNativeApplicationProfileDelegate - profileWithDABuild - InvocationTargetException");
+                                       } catch (InterruptedException e) {
+                                               DALog.printLog(e);
+                                               DALog.dlgErrorMessage(Labels.MESSAGE_ERROR, Labels.MESSAGE_FAIL_TO_BUILD_PROJECT);
+                                               bSuccessBuild = false;
+                                               DALog.printLog("TizenNativeApplicationProfileDelegate - profileWithDABuild - InterruptedException");
+                                       }
                        }
                });
        }
@@ -566,19 +582,25 @@ public class TizenNativeApplicationProfileDelegate implements ILaunchConfigurati
 
                String[] fullCommand = new String[] { "cmd", "/c", command };//$NON-NLS-1$ //$NON-NLS-2$
 
-               int i = 0;
-               try {
-                       proc = runtime.exec(fullCommand);
-                       Thread.sleep(1000);
-               } catch (Exception e) {
-                       DALog.printLog(e);
-                       return false;
-               } finally {
-                       if (proc != null)
+               boolean bSuccuss = true;
+
+                       try {
+                               proc = runtime.exec(fullCommand);
+                               Thread.sleep(1000);
+                       } catch (IOException e) {
+                               bSuccuss = false;
+                               DALog.printLog("TizenNativeApplicationProfileDelegate - executeWindowsCommand - IOException");
+                       }catch (InterruptedException e) {
+                               bSuccuss = false;
+                               DALog.printLog("TizenNativeApplicationProfileDelegate - executeWindowsCommand - InterruptedException");
+                       }finally {
+                       if (proc != null){
                                proc.destroy();
+                       }
                }
+               
 
-               return i == 0;
+               return bSuccuss;
        }
 
        private static boolean verifyDeviceReachability(IDevice currentDevice, IProject project) {