[Common] : Enable Profile with Dynamic Analyzer for EFL Platform project 69/21069/1
authorjungwook.ryu <jungwook.ryu@samsung.com>
Thu, 15 May 2014 03:24:33 +0000 (12:24 +0900)
committerjungwook.ryu <jungwook.ryu@samsung.com>
Thu, 15 May 2014 03:25:16 +0000 (12:25 +0900)
Change-Id: I202c3ba43040d8e93e0e975df2f800c5bc3be10c
Signed-off-by: jungwook.ryu <jungwook.ryu@samsung.com>
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/launch/ProjectType.java [new file with mode: 0644]
org.tizen.dynamicanalysis.ide.eplugin/src/org/tizen/dynamicanalysis/ide/eplugin/launch/RpmFileFilter.java [new file with mode: 0644]
org.tizen.dynamicanalysis.ide.eplugin/src/org/tizen/dynamicanalysis/ide/eplugin/launch/TizenNativeApplicationDADelegate.java
package/changelog
package/pkginfo.manifest

index cfee34b..3c1c627 100644 (file)
@@ -3,6 +3,7 @@
  *
  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
  *
+ * Jungwook Ryu <jungwook.ryu@samsung.com>
  * Jaewon Lim <jaewon81.lim@samsung.com>
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -37,10 +38,12 @@ import java.net.Socket;
 import java.net.UnknownHostException;
 import java.nio.channels.FileChannel;
 import java.nio.channels.FileLock;
+import java.util.List;
 
 import org.eclipse.ui.PlatformUI;
 import org.tizen.common.core.application.InstallPathConfig;
 import org.tizen.dynamicanalysis.ide.eplugin.DALog;
+import org.tizen.dynamicanalysis.ide.eplugin.launch.ProjectType;
 import org.tizen.dynamicanalysis.ide.eplugin.nl.Labels;
 
 public class DAServerManager extends Thread {
@@ -54,8 +57,11 @@ public class DAServerManager extends Thread {
        private boolean reservedTraceApplication = false;
 
        private String reservedDeviceName = ""; //$NON-NLS-1$
-       private String reservedApplicationID = ""; //$NON-NLS-1$
-       private String reservedApplicationName = ""; //$NON-NLS-1$
+       private ProjectType reservedProjectType; //$NON-NLS-1$
+       private String reservedBinaryOfTarget; //$NON-NLS-1$
+       private String reservedExecutablePath; //$NON-NLS-1$
+       private List<String> reservedLocalPackagePathList; //$NON-NLS-1$
+       
        private String LOCAL_HOST = "localhost"; //$NON-NLS-1$
 
        private final String IDE_DA_COMMUNICATION_TYPE_1 = "STATUS"; //$NON-NLS-1$
@@ -73,7 +79,7 @@ public class DAServerManager extends Thread {
        private final String CURRENT_ACTIVE_IDE_PORT = "current_active_ide_port"; //$NON-NLS-1$
 
        private static boolean recvDAReadyStatus = false;
-
+       
        public synchronized static DAServerManager getInstance() {
                if (instance == null) {
                        instance = new DAServerManager();
@@ -87,13 +93,15 @@ public class DAServerManager extends Thread {
        public Socket getClientSocket() {
                return ideClientSocket;
        }
-
-       public void reserveTraceApplication(final String deviceName,
-                       final String appID, final String appName) {
+       
+       public void reserveTraceApplication(String deviceName, ProjectType projectType, 
+                       String binaryOfTarget, String executablePath, List<String> localPackagePathList) {
                reservedTraceApplication = true;
                reservedDeviceName = deviceName;
-               reservedApplicationID = appID;
-               reservedApplicationName = appName;
+               reservedProjectType = projectType;
+               reservedBinaryOfTarget =  binaryOfTarget;
+               reservedExecutablePath = executablePath;
+               reservedLocalPackagePathList = localPackagePathList;
        }
 
        // main
@@ -204,8 +212,8 @@ public class DAServerManager extends Thread {
        private void checkReservedTraceApplication() {
                if (reservedTraceApplication == true) {
                        reservedTraceApplication = false;
-                       runTraceApplication(reservedDeviceName, reservedApplicationID,
-                                       reservedApplicationName);
+                       runTraceApplication(reservedDeviceName, reservedProjectType, reservedBinaryOfTarget, 
+                                       reservedExecutablePath, reservedLocalPackagePathList);
                }
        }
 
@@ -327,13 +335,35 @@ public class DAServerManager extends Thread {
        }
 
        // Send Message Trace Application
-       public void runTraceApplication(final String strDevice, final String appID,
-                       final String appName) {
+//     public void runTraceApplication(final String strDevice, final String appID,
+//                     final String appName) {
+//             StringBuffer command = new StringBuffer();
+//             command.append(IDE_DA_COMMUNICATION_TYPE_2)
+//                             .append(IDE_DA_COMMUNICATION_SEPARATOR).append(strDevice)
+//                             .append(IDE_DA_COMMUNICATION_SEPARATOR).append(appID)
+//                             .append(IDE_DA_COMMUNICATION_SEPARATOR).append(appName);
+//             try {
+//                     sendData(command.toString());
+//             } catch (IOException e) {
+//                     DALog.printLog("DAServerManager - runTraceApplication - IOException");
+//                     DALog.dlgErrorMessage(Labels.MESSAGE_ERROR,
+//                                     Labels.MESSAGE_FAIL_TO_LAUNCH_PROJECT);
+//             }
+//     }
+
+       public void runTraceApplication(String strDevice, ProjectType projectType, 
+                       String binaryOfTarget, String executablePath, List<String> localPackagePathList) {
                StringBuffer command = new StringBuffer();
                command.append(IDE_DA_COMMUNICATION_TYPE_2)
                                .append(IDE_DA_COMMUNICATION_SEPARATOR).append(strDevice)
-                               .append(IDE_DA_COMMUNICATION_SEPARATOR).append(appID)
-                               .append(IDE_DA_COMMUNICATION_SEPARATOR).append(appName);
+                               .append(IDE_DA_COMMUNICATION_SEPARATOR).append(projectType.ordinal())
+                               .append(IDE_DA_COMMUNICATION_SEPARATOR).append(binaryOfTarget)
+                               .append(IDE_DA_COMMUNICATION_SEPARATOR).append(executablePath);
+               if (localPackagePathList != null) {
+                       for (int i = 0; i < localPackagePathList.size(); i++) {
+                               command.append(IDE_DA_COMMUNICATION_SEPARATOR).append(localPackagePathList.get(i));
+                       }
+               }
                try {
                        sendData(command.toString());
                } catch (IOException e) {
@@ -342,7 +372,7 @@ public class DAServerManager extends Thread {
                                        Labels.MESSAGE_FAIL_TO_LAUNCH_PROJECT);
                }
        }
-
+       
        // Management Receive Message
        private void commandReceiveMessage(final String msg) {
                DALog.printLog("commandReceiveMessage : " + msg);//$NON-NLS-1$
diff --git a/org.tizen.dynamicanalysis.ide.eplugin/src/org/tizen/dynamicanalysis/ide/eplugin/launch/ProjectType.java b/org.tizen.dynamicanalysis.ide.eplugin/src/org/tizen/dynamicanalysis/ide/eplugin/launch/ProjectType.java
new file mode 100644 (file)
index 0000000..08b1304
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Dynamic Analyzer
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Jungwook Ryu <jungwook.ryu@samsung.com>
+ * Juyoung Kim <j0.kim@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.dynamicanalysis.ide.eplugin.launch;
+
+public enum ProjectType {
+               NONE,
+       OSP,            // 1
+       EFL,            // 2
+       WEBAPP, // 3
+       LIBRARY // 4
+}
diff --git a/org.tizen.dynamicanalysis.ide.eplugin/src/org/tizen/dynamicanalysis/ide/eplugin/launch/RpmFileFilter.java b/org.tizen.dynamicanalysis.ide.eplugin/src/org/tizen/dynamicanalysis/ide/eplugin/launch/RpmFileFilter.java
new file mode 100644 (file)
index 0000000..0284330
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * Dynamic Analyzer
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Jungwook Ryu <jungwook.ryu@samsung.com>
+ * Juyoung Kim <j0.kim@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.dynamicanalysis.ide.eplugin.launch;
+
+import java.io.File;
+import java.io.FilenameFilter;
+
+public class RpmFileFilter implements FilenameFilter{
+       
+       private static final String RPM_EXT = ".rpm";
+
+       @Override
+       public boolean accept(File dir, String name) {
+               boolean isAccept = false;
+               
+               if (name.toLowerCase().endsWith(RPM_EXT)) {
+                       isAccept = true;
+               } 
+
+               return isAccept;
+       }
+}
\ No newline at end of file
index f95b8bb..b6a44de 100644 (file)
@@ -3,6 +3,7 @@
  *
  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
  *
+ * Jungwook Ryu <jungwook.ryu@samsung.com>
  * Sanghyun Lee <sanghyunnim.lee@samsung.com>
  * Hyunjong Park <phjwithyou.park@samsung.com>
  * 
@@ -52,7 +53,6 @@ import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.SubProgressMonitor;
@@ -108,14 +108,11 @@ import org.tizen.nativecommon.launch.TizenLaunchMessages;
 import org.tizen.nativecommon.launch.ui.TizenLaunchDeviceSelectionDialog;
 import org.tizen.nativeplatform.build.PlatformConfigurationManager;
 import org.tizen.nativeplatform.launch.ILaunchConfigurationProcessor;
-import org.tizen.nativeplatform.launch.LaunchCommandCancelThread;
 import org.tizen.nativeplatform.launch.LaunchConfigurationProcessor;
 import org.tizen.nativeplatform.launch.PlatformLaunchMessages;
-import org.tizen.nativeplatform.pkg.commander.ICommandStatus;
-import org.tizen.nativeplatform.pkg.commander.IPkgCommander;
 import org.tizen.nativeplatform.pkg.commander.PkgCommandTarget;
 import org.tizen.nativeplatform.rootstrap.RootstrapManager;
-import org.tizen.nativeplatform.types.CmdTargetTypes;
+import org.tizen.nativeplatform.util.PlatformLaunchUtil;
 import org.tizen.nativeplatform.util.PlatformProjectUtil;
 import org.tizen.nativeplatform.views.model.PlatformRootstrap;
 import org.tizen.sdblib.Arch;
@@ -140,7 +137,7 @@ public class TizenNativeApplicationDADelegate extends
        protected IConfiguration selectedConfig;
        protected PkgCommandTarget target = null;
        protected TizenLaunchCommand tizenCommand = null;
-       
+
        private static class ExtFilter implements FilenameFilter {
                private String ext;
 
@@ -152,61 +149,89 @@ public class TizenNativeApplicationDADelegate extends
                        return name.endsWith(ext);
                }
        }
-    
+
        @Override
        public void launch(ILaunchConfiguration config, String mode,
                        ILaunch launch, IProgressMonitor monitor) throws CoreException {
-               
+
                IWorkspace workspace = ResourcesPlugin.getWorkspace();
                IWorkspaceRoot root = workspace.getRoot();
                project = root.getProject(config.getAttribute(
                                ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, "")); //$NON-NLS-1$
-               
+
+               String device = LaunchUtils.getCurrentDeployDevice().toString();
+               ProjectType projectType = ProjectType.NONE;
+               String binaryOfTarget = "";
+               String executablePath = "";
+               List<String> localPackagePathList = null;
+
                if (PlatformProjectUtil.isTizenPlatformProject(project)) {
-               isLaunchFailed = false;
-               shell = LaunchUIPlugin.getShell();
-               if (monitor == null) {
-                   monitor = new NullProgressMonitor();
-               }
-               try {
-                   int totalWorks = 4;
-                   monitor.beginTask("", totalWorks);
-                   monitor.subTask(TizenLaunchMessages.LAUNCH_APPLICATION);
-
-                   activateProgressView();
-                   verifyDeviceReachability(config, new SubProgressMonitor(monitor, 1));
-                   setRootstrap(config);
-                   verifyBuildConfiguration(config, mode, new SubProgressMonitor(monitor, 1));
-                   setPkgCommandTarget();
-                   tizenCommand = new TizenLaunchCommand(currentDevice, null);
-
-                   ILaunchConfigurationProcessor processor = getConfigurationProcessor(shell, config,
-                           project, mode, target, new SubProgressMonitor(monitor, 1));
-                   if (!processor.process()) {
-                       newCoreException(PlatformLaunchMessages.CANNOT_LAUNCH, null);
-                   }
-
-                   launchApplicationForRun(config, launch, new SubProgressMonitor(monitor, 1));            
-               } finally {
-                       if (!launch.isTerminated()) {
-                    launch.terminate();
-                       }
-                       ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
-                       launchManager.removeLaunch(launch);
-
-                       // Do not save failed configuration.
-                   if (isLaunchFailed) {
-                       config.delete();
-                       isLaunchFailed = false;
-                   }
-                   monitor.done();
-                   UserLogger.end(UserInteraction.CATE_PLATFORM_LAUNCH);
-               }
-               
-               if (bSuccessBuild && !isLaunchFailed && isDAReady()) {
-                       runDynamicAnalyzer(project, currentDevice);
+                       isLaunchFailed = false;
+                       shell = LaunchUIPlugin.getShell();
+                       if (monitor == null) {
+                               monitor = new NullProgressMonitor();
+                       }
+                       try {
+                               int totalWorks = 4;
+                               monitor.beginTask("", totalWorks);
+                               monitor.subTask(TizenLaunchMessages.LAUNCH_APPLICATION);
+
+                               activateProgressView();
+                               verifyDeviceReachability(config, new SubProgressMonitor(
+                                               monitor, 1));
+                               setRootstrap(config);
+                               verifyBuildConfiguration(config, mode, new SubProgressMonitor(
+                                               monitor, 1));
+                               setPkgCommandTarget();
+                               tizenCommand = new TizenLaunchCommand(currentDevice, null);
+
+                               ILaunchConfigurationProcessor processor = getConfigurationProcessor(
+                                               shell, config, project, mode, target,
+                                               new SubProgressMonitor(monitor, 1));
+                               if (!processor.process()) {
+                                       newCoreException(PlatformLaunchMessages.CANNOT_LAUNCH, null);
+                               }
+                               
+                               if (PlatformProjectUtil.isEFLApplication(project)) {
+                                       localPackagePathList = getRpmFiles(rootstrap);
+                                       projectType = ProjectType.EFL;
+                                       String envCmd = getEnvironments(config);
+                                       String execArg = getArguments(config);
+                                       executablePath = envCmd + execArg;
+                                       
+                                       binaryOfTarget = PlatformLaunchUtil.getAppId(project)[0];
+                                       // TODO : need to be changed
+                                       //binaryOfTarget = envCmd + execArg;            
+                               } else {
+                                       projectType = ProjectType.LIBRARY;
+                                       String envCmd = getEnvironments(config);
+                                       String execArg = getArguments(config);
+                                       executablePath = envCmd + execArg;
+                               }
+                       } catch (Exception e) {
+                               DALog.dlgErrorMessage(Labels.MESSAGE_ERROR, e.getMessage());
+                       } finally {
+                               if (!launch.isTerminated()) {
+                                       launch.terminate();
+                               }
+                               ILaunchManager launchManager = DebugPlugin.getDefault()
+                                               .getLaunchManager();
+                               launchManager.removeLaunch(launch);
+
+                               // Do not save failed configuration.
+                               if (isLaunchFailed) {
+                                       config.delete();
+                                       isLaunchFailed = false;
+                               }
+                               monitor.done();
+                               UserLogger.end(UserInteraction.CATE_PLATFORM_LAUNCH);
                        }
-               } else {        // Case : Native application
+
+                       if (bSuccessBuild && !isLaunchFailed && isDAReady()) {
+                               runDynamicAnalyzer(device, projectType, binaryOfTarget, executablePath, localPackagePathList);
+                       }
+               } else { // Case : Native application
+                       projectType = ProjectType.OSP;
                        verifyCProjectConfigurationSettings(config);
                        try {
                                verityUnitTestProject(project);
@@ -221,7 +246,10 @@ public class TizenNativeApplicationDADelegate extends
 
                                if (isDAReady()) {
                                        if (packaging_upload_install(project, currentDevice)) {
-                                               runDynamicAnalyzer(project, currentDevice);
+                                               IApplicationConfiguration adapter = (IApplicationConfiguration) project
+                                                               .getAdapter(IApplicationConfiguration.class);
+                                               binaryOfTarget = adapter.getAppId();
+                                               runDynamicAnalyzer(device, projectType, binaryOfTarget, executablePath, localPackagePathList);
                                        }
                                }
                        } catch (CoreException e) {
@@ -250,19 +278,19 @@ public class TizenNativeApplicationDADelegate extends
                                                .getActiveWorkbenchWindow();
                                ProgressMonitorDialog dialog = new ProgressMonitorDialog(window
                                                .getShell());
-                       
+
                                try {
                                        dialog.run(true, true, new IRunnableWithProgress() {
                                                @Override
                                                public void run(IProgressMonitor monitor) {
                                                        monitor.beginTask(Labels.MESSAGE_PREPARING_PROFILE,
                                                                        1);
-                                                       
+
                                                        IProjectLaunchCommand manifest = ProjectUtil
                                                                        .getProjectManifest(project);
                                                        CommonProjectDependentPackager packager = ProjectTypeManager
                                                                        .getProjectPackagerInstance(project);
-                                                       
+
                                                        RdsDeployer rdsDeployer = null;
                                                        try {
                                                                if (RdsPreferencePage.isRdsMode(project)) {
@@ -272,7 +300,8 @@ public class TizenNativeApplicationDADelegate extends
                                                                                        project,
                                                                                        currentDevice,
                                                                                        tizenCommand,
-                                                                                       TizenLaunchConsole.getTizenConsole(),
+                                                                                       TizenLaunchConsole
+                                                                                                       .getTizenConsole(),
                                                                                        CommonProjectDependentPackager.DEFAULT
                                                                                                        .toLowerCase(), monitor);
                                                                        rdsDeployer.setInterestList(TizenLaunchInfo
@@ -304,13 +333,14 @@ public class TizenNativeApplicationDADelegate extends
                                                                        try {
                                                                                rdsDeployer.close();
                                                                        } catch (IOException e) {
-                                                                               DALog.dlgErrorMessage("Failed to close RDSDeployer", 
+                                                                               DALog.dlgErrorMessage(
+                                                                                               "Failed to close RDSDeployer",
                                                                                                e.getMessage());
                                                                        }
                                                                }
                                                        }
-                                                       
-                                                       if(monitor.isCanceled()) {
+
+                                                       if (monitor.isCanceled()) {
                                                                bSuccessBuild = false;
                                                                monitor.done();
                                                        }
@@ -327,7 +357,7 @@ public class TizenNativeApplicationDADelegate extends
                                }
                        }
                });
-               
+
                return bSuccessBuild;
        }
 
@@ -509,10 +539,8 @@ public class TizenNativeApplicationDADelegate extends
                }
        }
 
-       private void runDynamicAnalyzer(IProject project, IDevice currentDevice) {
-               IApplicationConfiguration adapter = (IApplicationConfiguration) project
-                               .getAdapter(IApplicationConfiguration.class);
-
+       private void runDynamicAnalyzer(String device, ProjectType projectType, String binaryOfTarget,
+                       String executablePath, List<String> localPackagePathList) {
                if (DAServerManager.getInstance().getClientSocket() == null) {
                        StringBuffer command = new StringBuffer();
 
@@ -551,16 +579,30 @@ public class TizenNativeApplicationDADelegate extends
                                }
                        }
 
-                       DAServerManager.getInstance().reserveTraceApplication(currentDevice.toString(),
-                                       adapter.getAppId(),
-                                       adapter.getBinaryName().split(".exe")[0]);//$NON-NLS-1$
+                       DAServerManager.getInstance().reserveTraceApplication(device, projectType, binaryOfTarget, executablePath, localPackagePathList);
                } else {
-                       DAServerManager.getInstance().runTraceApplication(currentDevice.toString(),
-                                       adapter.getAppId(),
-                                       adapter.getBinaryName().split(".exe")[0]);//$NON-NLS-1$
+                       DAServerManager.getInstance().runTraceApplication(device, projectType, binaryOfTarget, executablePath, localPackagePathList);
                }
        }
-
+       
+    private List<String> getRpmFiles(PlatformRootstrap rootstrap) {
+        List<String> rpms = new ArrayList<String>();
+        String rootstrapPath = SmartBuildInterface.getInstance().getPlatformRootstrapPath(
+                rootstrap.getPath());
+        String arch = rootstrap.getArch();
+        IPath rpmPath = new Path(rootstrapPath).append("home").append("abuild").append("rpmbuild")
+                .append("RPMS").append(arch);
+        File rpmDir = rpmPath.toFile();
+        if (rpmDir.exists()) {
+            String[] files = rpmDir.list(new RpmFileFilter());
+            for (String file : files) {
+                IPath pkgPath = new Path(rpmDir.getPath()).append(file);
+                rpms.add(pkgPath.toOSString());
+            }
+        }
+        return rpms;
+    }
+       
        private void rollBackBuildConfigSetting(IProject project) {
                String prevBuildConfigName = TizenNativeApplicationDAShortcut
                                .getPrevBuildConfigName();
@@ -583,374 +625,367 @@ public class TizenNativeApplicationDADelegate extends
        protected String getPluginID() {
                return Activator.PLUGIN_ID;
        }
-       
-    protected void activateProgressView() {
-        Display.getDefault().syncExec(new Runnable() {
-            public void run() {
-                try {
-                    PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
-                            .showView("org.eclipse.ui.views.ProgressView");
-                } catch (PartInitException e) {
-                    e.printStackTrace();
-                }
-            }
-        });
-    }
-    
-    protected void verifyDeviceReachability(ILaunchConfiguration config, IProgressMonitor monitor)
-            throws CoreException {
-        try {
-            monitor.beginTask(TizenLaunchMessages.PREPARE_TO_LAUNCH, 1);
-            monitor.subTask(TizenLaunchMessages.PREPARE_TO_LAUNCH);
-
-            final ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy();
-            final IDevice[] devices = getDeploayableDevices(config);
-            IDevice configDevice = null;
-
-            // 1. Get device from configuration
-            configDevice = LaunchUtils.getDeviceFromLaunchConfiguration(config, devices);
-
-            // 2-1. Set device for launch configuration if there is no device
-            // matched with configuration or device is off-lined
-            if (configDevice == null) {
-                // 4. Get list of deployable devices for configuration
-                int device_count = devices.length;
-
-                if (device_count == 0) {
-                    // TODO: notify no deployable devices, open emulator
-                    // manager?
-                    currentDevice = null;
-                }
-                // Found device more than 0
-                else {
-                    if (device_count == 1) {
-                        currentDevice = devices[0];
-                    }
-                    // if devices.length > 1
-                    else {
-                        SWTUtil.syncExec(new Runnable() {
-                            @Override
-                            public void run() {
-                                Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
-                                        .getShell();
-                                TizenLaunchDeviceSelectionDialog deviceDialog = new TizenLaunchDeviceSelectionDialog(
-                                        shell, devices);
-                                currentDevice = (deviceDialog.open() == Window.OK) ? deviceDialog
-                                        .getSelectedDevice() : null;
-                            }
-                        });
-                    }
-                    if (currentDevice != null) {
-                        String device_id = LaunchUtils.getDeviceId(currentDevice);
-                        wc.setAttribute(TizenLaunchConfigurationConstants.ATTR_CONFIG_DEVICE_ID,
-                                device_id);
-                        wc.doSave();
-                    }
-                }
-            }
-            // 2-2. Launch with the device if there is device info in
-            // configuration
-            else {
-                currentDevice = configDevice;
-            }
-            if (currentDevice == null) {
-                LaunchUtils.newCoreException(TizenLaunchMessages.NO_TARGET, null);
-            }
-            if (!isOnline(currentDevice)) {
-                LaunchUtils.newCoreException(TizenLaunchMessages.NO_TARGET, null);
-            }
-        } finally {
-            monitor.done();
-        }
-    }
-    
-    private IDevice[] getDeploayableDevices(ILaunchConfiguration config) throws CoreException {
-        IDevice[] devices = SmartDevelopmentBridge.getBridge().getDevices();
-        List<IDevice> deployableDevices = new ArrayList<IDevice>();
-        Arch configArch = getBuildConfigurationArchitecture(config);
-
-        for (IDevice device : devices) {
-            if (device.getArch() == configArch) {
-                deployableDevices.add(device);
-            }
-        }
-        return deployableDevices.toArray(new IDevice[deployableDevices.size()]);
-    }
-    
-    protected Arch getBuildConfigurationArchitecture(ILaunchConfiguration config)
-            throws CoreException {
-        String buildTargetArchitecture = getBuildConfigName(config);
-        return getBuildConfigurationArchitecture(project, buildTargetArchitecture);
-    }
-    
-    protected String getBuildConfigName(ILaunchConfiguration config) throws CoreException {
-        String buildConfigName = config.getAttribute(
-                TizenLaunchConfigurationConstants.ATTR_PROJECT_BUILD_CONFIG_NAME, "");
-
-        if (buildConfigName.isEmpty()) {
-            IConfiguration configuration = ManagedBuildManager.getBuildInfo(project)
-                    .getDefaultConfiguration();
-            return configuration.getName();
-        } else {
-            return buildConfigName;
-        }
-    }
-    
-    protected Arch getBuildConfigurationArchitecture(IProject project,
-            String buildTargetArchitecture) throws CoreException {
-        IConfiguration configuration = getBuildConfiguration(buildTargetArchitecture, project);
-        String arch = PlatformConfigurationManager.getArchitecture(configuration);
-        if (LaunchUtils.isX86(arch)) {
-            return Arch.X86;
-        } else {
-            return Arch.ARM;
-        }
-    }
-    
-    protected IConfiguration getBuildConfiguration(String buildConfigName, IProject project)
-            throws CoreException {
-        IConfiguration configuration = null;
-        IConfiguration[] configurations = ManagedBuildManager.getBuildInfo(project)
-                .getManagedProject().getConfigurations();
-        for (IConfiguration c : configurations) {
-            if (c.getName().equals(buildConfigName)) {
-                configuration = c;
-                break;
-            }
-        }
-        if (configuration == null) {
-            newCoreException(
-                    TizenLaunchMessages.BUILD_CONFIGURATION_DOES_NOT_MATCH_WITH_CURRENT_DEVICE_TYPE,
-                    null);
-        }
 
-        return configuration;
-    }
-    
-    protected void setRootstrap(ILaunchConfiguration config) throws CoreException {
-        String buildConfigName = getBuildConfigName(config);
-        IConfiguration buildConfig = getBuildConfiguration(buildConfigName, project);
-        String targetID = PlatformConfigurationManager.getBuildTargetName(buildConfig);
-        String rootstrapId = SmartBuildInterface.getInstance().getRootstrapIDFromTargetID(targetID);
-        rootstrap = RootstrapManager.getRootstrap(rootstrapId);
-    }
+       protected void activateProgressView() {
+               Display.getDefault().syncExec(new Runnable() {
+                       public void run() {
+                               try {
+                                       PlatformUI.getWorkbench().getActiveWorkbenchWindow()
+                                                       .getActivePage()
+                                                       .showView("org.eclipse.ui.views.ProgressView");
+                               } catch (PartInitException e) {
+                                       e.printStackTrace();
+                               }
+                       }
+               });
+       }
 
-    protected void verifyBuildConfiguration(ILaunchConfiguration config, String mode,
-            IProgressMonitor monitor) throws CoreException {
-        monitor.beginTask("", 1);
-        monitor.subTask(TizenLaunchMessages.PREPARE_TO_LAUNCH);
+       protected void verifyDeviceReachability(ILaunchConfiguration config,
+                       IProgressMonitor monitor) throws CoreException {
+               try {
+                       monitor.beginTask(TizenLaunchMessages.PREPARE_TO_LAUNCH, 1);
+                       monitor.subTask(TizenLaunchMessages.PREPARE_TO_LAUNCH);
+
+                       final ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy();
+                       final IDevice[] devices = getDeploayableDevices(config);
+                       IDevice configDevice = null;
+
+                       // 1. Get device from configuration
+                       configDevice = LaunchUtils.getDeviceFromLaunchConfiguration(config,
+                                       devices);
+
+                       // 2-1. Set device for launch configuration if there is no device
+                       // matched with configuration or device is off-lined
+                       if (configDevice == null) {
+                               // 4. Get list of deployable devices for configuration
+                               int device_count = devices.length;
+
+                               if (device_count == 0) {
+                                       // TODO: notify no deployable devices, open emulator
+                                       // manager?
+                                       currentDevice = null;
+                               }
+                               // Found device more than 0
+                               else {
+                                       if (device_count == 1) {
+                                               currentDevice = devices[0];
+                                       }
+                                       // if devices.length > 1
+                                       else {
+                                               SWTUtil.syncExec(new Runnable() {
+                                                       @Override
+                                                       public void run() {
+                                                               Shell shell = PlatformUI.getWorkbench()
+                                                                               .getActiveWorkbenchWindow().getShell();
+                                                               TizenLaunchDeviceSelectionDialog deviceDialog = new TizenLaunchDeviceSelectionDialog(
+                                                                               shell, devices);
+                                                               currentDevice = (deviceDialog.open() == Window.OK) ? deviceDialog
+                                                                               .getSelectedDevice() : null;
+                                                       }
+                                               });
+                                       }
+                                       if (currentDevice != null) {
+                                               String device_id = LaunchUtils
+                                                               .getDeviceId(currentDevice);
+                                               wc.setAttribute(
+                                                               TizenLaunchConfigurationConstants.ATTR_CONFIG_DEVICE_ID,
+                                                               device_id);
+                                               wc.doSave();
+                                       }
+                               }
+                       }
+                       // 2-2. Launch with the device if there is device info in
+                       // configuration
+                       else {
+                               currentDevice = configDevice;
+                       }
+                       if (currentDevice == null) {
+                               LaunchUtils.newCoreException(TizenLaunchMessages.NO_TARGET,
+                                               null);
+                       }
+                       if (!isOnline(currentDevice)) {
+                               LaunchUtils.newCoreException(TizenLaunchMessages.NO_TARGET,
+                                               null);
+                       }
+               } finally {
+                       monitor.done();
+               }
+       }
 
-        // FIXME : Match by deviceType, not buildTargetArchitecture.
-        String buildConfigName = getBuildConfigName(config);
+       private IDevice[] getDeploayableDevices(ILaunchConfiguration config)
+                       throws CoreException {
+               IDevice[] devices = SmartDevelopmentBridge.getBridge().getDevices();
+               List<IDevice> deployableDevices = new ArrayList<IDevice>();
+               Arch configArch = getBuildConfigurationArchitecture(config);
 
-        IConfiguration configuration = getBuildConfiguration(buildConfigName, project);
-        String buildTargetArchitecture = CommonConfigurationManager.getArchitecture(configuration);
-        if (currentDevice.isEmulator() && currentDevice.getArch() == Arch.X86) {
-            if (!PlatformConfigurationManager.isEmulatorArch(buildTargetArchitecture)) {
-                resolveProblematicConfiguration(config, "i386");
-            }
-        } else {
-            if (!PlatformConfigurationManager.isDeviceArch(buildTargetArchitecture)) {
-                resolveProblematicConfiguration(config, "armel");
-            }
-        }
-        monitor.worked(1);
-        monitor.done();
-    }
-    
-    protected void resolveProblematicConfiguration(ILaunchConfiguration config, final String arch)
-            throws CoreException {
-        Display.getDefault().syncExec(new Runnable() {
-            public void run() {
-                selectedConfig = selectBuildConfiguration(project, arch);
-            }
-        });
+               for (IDevice device : devices) {
+                       if (device.getArch() == configArch) {
+                               deployableDevices.add(device);
+                       }
+               }
+               return deployableDevices.toArray(new IDevice[deployableDevices.size()]);
+       }
 
-        if (selectedConfig == null) {
-            newCoreException(
-                    TizenLaunchMessages.BUILD_CONFIGURATION_DOES_NOT_MATCH_WITH_CURRENT_DEVICE_TYPE,
-                    null);
-        }
+       protected Arch getBuildConfigurationArchitecture(ILaunchConfiguration config)
+                       throws CoreException {
+               String buildTargetArchitecture = getBuildConfigName(config);
+               return getBuildConfigurationArchitecture(project,
+                               buildTargetArchitecture);
+       }
 
-        ICProjectDescription projDes = CDTPropertyManager.getProjectDescription(project);
-        ICConfigurationDescription cDesc = projDes.getConfigurationByName(selectedConfig.getName());
-        ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy();
-        wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_BUILD_CONFIG_ID, cDesc
-                .getConfiguration().getId());
-        wc.doSave();
-    }
-    
-    protected IConfiguration selectBuildConfiguration(IProject project, String arch) {
-        Shell shell = LaunchUIPlugin.getShell();
-
-        ILabelProvider topprovider = new LabelProvider() {
-            public String getText(Object element) {
-                IConfiguration buildConfig = (IConfiguration) element;
-                return buildConfig.getName();
-            }
-        };
+       protected String getBuildConfigName(ILaunchConfiguration config)
+                       throws CoreException {
+               String buildConfigName = config
+                               .getAttribute(
+                                               TizenLaunchConfigurationConstants.ATTR_PROJECT_BUILD_CONFIG_NAME,
+                                               "");
+
+               if (buildConfigName.isEmpty()) {
+                       IConfiguration configuration = ManagedBuildManager.getBuildInfo(
+                                       project).getDefaultConfiguration();
+                       return configuration.getName();
+               } else {
+                       return buildConfigName;
+               }
+       }
 
-        ILabelProvider downprovider = new LabelProvider() {
-            public String getText(Object element) {
-                IConfiguration buildConfig = (IConfiguration) element;
-                return buildConfig.getName();
-            }
-        };
-
-        TwoPaneElementSelector dlg = new TwoPaneElementSelector(shell, topprovider, downprovider);
-        dlg.setTitle("Select a new build configuration"); //$NON-NLS-1$
-        dlg.setMessage("Build configuration doesn't match with current active device.\nSelect a new build configuration to launch"); //$NON-NLS-1$
-
-        IConfiguration[] configurations = ManagedBuildManager.getBuildInfo(project)
-                .getManagedProject().getConfigurations();
-        List<IConfiguration> adaptableConfigs = new ArrayList<IConfiguration>(0);
-        for (IConfiguration c : configurations) {
-            String buildTargetArchitecture = CommonConfigurationManager.getArchitecture(c);
-            if (buildTargetArchitecture.equals(arch)) {
-                adaptableConfigs.add(c);
-            }
-        }
+       protected Arch getBuildConfigurationArchitecture(IProject project,
+                       String buildTargetArchitecture) throws CoreException {
+               IConfiguration configuration = getBuildConfiguration(
+                               buildTargetArchitecture, project);
+               String arch = PlatformConfigurationManager
+                               .getArchitecture(configuration);
+               if (LaunchUtils.isX86(arch)) {
+                       return Arch.X86;
+               } else {
+                       return Arch.ARM;
+               }
+       }
 
-        dlg.setElements(adaptableConfigs.toArray());
+       protected IConfiguration getBuildConfiguration(String buildConfigName,
+                       IProject project) throws CoreException {
+               IConfiguration configuration = null;
+               IConfiguration[] configurations = ManagedBuildManager
+                               .getBuildInfo(project).getManagedProject().getConfigurations();
+               for (IConfiguration c : configurations) {
+                       if (c.getName().equals(buildConfigName)) {
+                               configuration = c;
+                               break;
+                       }
+               }
+               if (configuration == null) {
+                       newCoreException(
+                                       TizenLaunchMessages.BUILD_CONFIGURATION_DOES_NOT_MATCH_WITH_CURRENT_DEVICE_TYPE,
+                                       null);
+               }
 
-        if (dlg.open() == Window.OK) {
-            IConfiguration selectedConfig = (IConfiguration) dlg.getFirstResult();
-            return selectedConfig;
-        }
+               return configuration;
+       }
 
-        return null;
-    }
-    
-    protected void setPkgCommandTarget() {
-        target = new PkgCommandTarget(PlatformProjectUtil.getPkgType(), currentDevice, rootstrap);
-    }
-    
-    protected ILaunchConfigurationProcessor getConfigurationProcessor(Shell shell,
-            ILaunchConfiguration launchConfig, IProject project, String mode,
-            PkgCommandTarget target, IProgressMonitor monitor) {
-        return new LaunchConfigurationProcessor(shell, launchConfig, project, mode, target, monitor);
-    }
-    
-    protected void setDebugConfigAttributes(ILaunchConfiguration config) throws CoreException {
-        ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy();
-        wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE,
-                ICDTLaunchConfigurationConstants.DEBUGGER_MODE_RUN);
-        wc.doSave();
-    }
+       protected void setRootstrap(ILaunchConfiguration config)
+                       throws CoreException {
+               String buildConfigName = getBuildConfigName(config);
+               IConfiguration buildConfig = getBuildConfiguration(buildConfigName,
+                               project);
+               String targetID = PlatformConfigurationManager
+                               .getBuildTargetName(buildConfig);
+               String rootstrapId = SmartBuildInterface.getInstance()
+                               .getRootstrapIDFromTargetID(targetID);
+               rootstrap = RootstrapManager.getRootstrap(rootstrapId);
+       }
 
-    protected void verifyPlatformProjectSettings(ILaunchConfiguration config) throws CoreException {
-        String appPath = config
-                .getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, "");
-        IPath hostPath = getHostPath(appPath, config);
-        if (hostPath != null) {
-            if (hostPath.toFile().exists()) {
-                return;
-            } else {
-                newCoreException(PlatformLaunchMessages.CANNOT_FIND_EXECUTABLE_IN_A_HOST_ROOTSTRAP,
-                        null);
-            }
-        } else {
-            newCoreException(PlatformLaunchMessages.CANNOT_FIND_EXECUTABLE_IN_A_HOST_ROOTSTRAP,
-                    null);
-        }
-    }
-    
-    protected IPath getHostPath(String exePath, ILaunchConfiguration config) throws CoreException {
-        IPath path = target.getRootstrap().getPath();
-        if (target.getRootstrapCommander() == null) {
-            return new Path(exePath);
-        }
-        String canonicalPath = target.getRootstrapCommander().canonicalizePath(exePath);
-        String rootstrapPath = SmartBuildInterface.getInstance().getPlatformRootstrapPath(path);
-        if (rootstrapPath != null && !rootstrapPath.isEmpty()) {
-            if (canonicalPath != null && !canonicalPath.isEmpty()) {
-                rootstrapPath = rootstrapPath.concat(canonicalPath);
-            } else {
-                rootstrapPath = rootstrapPath.concat(exePath);
-            }
-        }
-        return new Path(rootstrapPath);
-    }
-    
-    protected IBinaryObject getBinaryObject(ILaunchConfiguration config) throws CoreException {
-        String appPath = config
-                .getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, "");
-        IPath hostPath = getHostPath(appPath, config);
-        ICProject cproject = CDebugUtils.verifyCProject(config);
-        IBinaryObject binaryObject = verifyBinary(cproject, hostPath);
-        return binaryObject;
-    }
+       protected void verifyBuildConfiguration(ILaunchConfiguration config,
+                       String mode, IProgressMonitor monitor) throws CoreException {
+               monitor.beginTask("", 1);
+               monitor.subTask(TizenLaunchMessages.PREPARE_TO_LAUNCH);
+
+               // FIXME : Match by deviceType, not buildTargetArchitecture.
+               String buildConfigName = getBuildConfigName(config);
+
+               IConfiguration configuration = getBuildConfiguration(buildConfigName,
+                               project);
+               String buildTargetArchitecture = CommonConfigurationManager
+                               .getArchitecture(configuration);
+               if (currentDevice.isEmulator() && currentDevice.getArch() == Arch.X86) {
+                       if (!PlatformConfigurationManager
+                                       .isEmulatorArch(buildTargetArchitecture)) {
+                               resolveProblematicConfiguration(config, "i386");
+                       }
+               } else {
+                       if (!PlatformConfigurationManager
+                                       .isDeviceArch(buildTargetArchitecture)) {
+                               resolveProblematicConfiguration(config, "armel");
+                       }
+               }
+               monitor.worked(1);
+               monitor.done();
+       }
 
-    protected void launchApplicationForRun(final ILaunchConfiguration config, ILaunch launch,
-            final IProgressMonitor monitor) throws CoreException {
-        final IPkgCommander commander = target.getCommander(CmdTargetTypes.DEVICE);
-        final LaunchCommandCancelThread cancelThread = new LaunchCommandCancelThread(commander, monitor);
-        
-        bSuccessBuild = true;
+       protected void resolveProblematicConfiguration(ILaunchConfiguration config,
+                       final String arch) throws CoreException {
                Display.getDefault().syncExec(new Runnable() {
-                       @Override
                        public void run() {
-                       IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
-                       ProgressMonitorDialog dialog = new ProgressMonitorDialog(window.getShell());
-                       
-                       try {
-                                       dialog.run(true, true, new IRunnableWithProgress() {
-                                               @Override
-                                               public void run(IProgressMonitor dialog_monitor) {
-                                                       try {
-                                                               dialog_monitor.beginTask(Labels.MESSAGE_PREPARING_PROFILE, 1);
-                                                               dialog_monitor.subTask(TizenLaunchMessages.LAUNCH_APPLICATION);
-                                                   monitor.beginTask("", 1);
-                                                   monitor.subTask(TizenLaunchMessages.LAUNCH_APPLICATION);
-                                                   cancelThread.start();
-                                                   String envCmd = getEnvironments(config);
-                                                   String execArg = getArguments(config);
-                                                   ICommandStatus status = commander.executeBinary(envCmd + execArg);
-                                               } catch (Exception e) {
-                                                        bSuccessBuild = false;
-                                               } finally {
-                                                        dialog_monitor.done();
-                                                   monitor.worked(1);
-                                                   monitor.done();
-                                                   cancelThread.setTerminated();
-                                                   if (cancelThread.isAlive()) {
-                                                       cancelThread.interrupt();
-                                                   }
-                                               }
-                                               }
-                                       });
-                       } catch (InvocationTargetException e) {
-                                       DALog.dlgErrorMessage(Labels.MESSAGE_ERROR,
-                                                       Labels.MESSAGE_FAIL_TO_BUILD_PROJECT);
-                                       bSuccessBuild = false;
-                       } catch (InterruptedException e) {
-                                       DALog.dlgErrorMessage(Labels.MESSAGE_ERROR,
-                                                       Labels.MESSAGE_FAIL_TO_BUILD_PROJECT);
-                                       bSuccessBuild = false;
-                       }
-                       }}
-               );
-    }
+                               selectedConfig = selectBuildConfiguration(project, arch);
+                       }
+               });
 
-    protected String getEnvironments(ILaunchConfiguration config) throws Exception {
-        String envs = "";
-        String[] envArray = getEnvironment(config);
-        for (String env : envArray) {
-            envs += TizenPlatformConstants.ENVIRONMENT_SETTING_CMD + env + " && ";
-        }
-        return envs;
-    }
+               if (selectedConfig == null) {
+                       newCoreException(
+                                       TizenLaunchMessages.BUILD_CONFIGURATION_DOES_NOT_MATCH_WITH_CURRENT_DEVICE_TYPE,
+                                       null);
+               }
 
-    protected String getArguments(ILaunchConfiguration config) throws CoreException {
-        String appPath = config
-                .getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, "");
-        String arguments = org.eclipse.cdt.launch.LaunchUtils.getProgramArguments(config);
-        String executableWithArguments = "";
-        if (arguments != null && !arguments.equals("")) {
-            executableWithArguments = appPath + " " + arguments;
-        } else {
-            executableWithArguments = appPath;
-        }
-        return executableWithArguments;
-    }
+               ICProjectDescription projDes = CDTPropertyManager
+                               .getProjectDescription(project);
+               ICConfigurationDescription cDesc = projDes
+                               .getConfigurationByName(selectedConfig.getName());
+               ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy();
+               wc.setAttribute(
+                               ICDTLaunchConfigurationConstants.ATTR_PROJECT_BUILD_CONFIG_ID,
+                               cDesc.getConfiguration().getId());
+               wc.doSave();
+       }
+
+       protected IConfiguration selectBuildConfiguration(IProject project,
+                       String arch) {
+               Shell shell = LaunchUIPlugin.getShell();
+
+               ILabelProvider topprovider = new LabelProvider() {
+                       public String getText(Object element) {
+                               IConfiguration buildConfig = (IConfiguration) element;
+                               return buildConfig.getName();
+                       }
+               };
+
+               ILabelProvider downprovider = new LabelProvider() {
+                       public String getText(Object element) {
+                               IConfiguration buildConfig = (IConfiguration) element;
+                               return buildConfig.getName();
+                       }
+               };
+
+               TwoPaneElementSelector dlg = new TwoPaneElementSelector(shell,
+                               topprovider, downprovider);
+               dlg.setTitle("Select a new build configuration"); //$NON-NLS-1$
+               dlg.setMessage("Build configuration doesn't match with current active device.\nSelect a new build configuration to launch"); //$NON-NLS-1$
+
+               IConfiguration[] configurations = ManagedBuildManager
+                               .getBuildInfo(project).getManagedProject().getConfigurations();
+               List<IConfiguration> adaptableConfigs = new ArrayList<IConfiguration>(0);
+               for (IConfiguration c : configurations) {
+                       String buildTargetArchitecture = CommonConfigurationManager
+                                       .getArchitecture(c);
+                       if (buildTargetArchitecture.equals(arch)) {
+                               adaptableConfigs.add(c);
+                       }
+               }
+
+               dlg.setElements(adaptableConfigs.toArray());
+
+               if (dlg.open() == Window.OK) {
+                       IConfiguration selectedConfig = (IConfiguration) dlg
+                                       .getFirstResult();
+                       return selectedConfig;
+               }
+
+               return null;
+       }
+
+       protected void setPkgCommandTarget() {
+               target = new PkgCommandTarget(PlatformProjectUtil.getPkgType(),
+                               currentDevice, rootstrap);
+       }
+
+       protected ILaunchConfigurationProcessor getConfigurationProcessor(
+                       Shell shell, ILaunchConfiguration launchConfig, IProject project,
+                       String mode, PkgCommandTarget target, IProgressMonitor monitor) {
+               return new LaunchConfigurationProcessor(shell, launchConfig, project,
+                               mode, target, monitor);
+       }
+
+       protected void setDebugConfigAttributes(ILaunchConfiguration config)
+                       throws CoreException {
+               ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy();
+               wc.setAttribute(
+                               ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE,
+                               ICDTLaunchConfigurationConstants.DEBUGGER_MODE_RUN);
+               wc.doSave();
+       }
+
+       protected void verifyPlatformProjectSettings(ILaunchConfiguration config)
+                       throws CoreException {
+               String appPath = config.getAttribute(
+                               ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, "");
+               IPath hostPath = getHostPath(appPath, config);
+               if (hostPath != null) {
+                       if (hostPath.toFile().exists()) {
+                               return;
+                       } else {
+                               newCoreException(
+                                               PlatformLaunchMessages.CANNOT_FIND_EXECUTABLE_IN_A_HOST_ROOTSTRAP,
+                                               null);
+                       }
+               } else {
+                       newCoreException(
+                                       PlatformLaunchMessages.CANNOT_FIND_EXECUTABLE_IN_A_HOST_ROOTSTRAP,
+                                       null);
+               }
+       }
+
+       protected IPath getHostPath(String exePath, ILaunchConfiguration config)
+                       throws CoreException {
+               IPath path = target.getRootstrap().getPath();
+               if (target.getRootstrapCommander() == null) {
+                       return new Path(exePath);
+               }
+               String canonicalPath = target.getRootstrapCommander().canonicalizePath(
+                               exePath);
+               String rootstrapPath = SmartBuildInterface.getInstance()
+                               .getPlatformRootstrapPath(path);
+               if (rootstrapPath != null && !rootstrapPath.isEmpty()) {
+                       if (canonicalPath != null && !canonicalPath.isEmpty()) {
+                               rootstrapPath = rootstrapPath.concat(canonicalPath);
+                       } else {
+                               rootstrapPath = rootstrapPath.concat(exePath);
+                       }
+               }
+               return new Path(rootstrapPath);
+       }
+
+       protected IBinaryObject getBinaryObject(ILaunchConfiguration config)
+                       throws CoreException {
+               String appPath = config.getAttribute(
+                               ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, "");
+               IPath hostPath = getHostPath(appPath, config);
+               ICProject cproject = CDebugUtils.verifyCProject(config);
+               cproject.getBinaryContainer().getPath();
+               IBinaryObject binaryObject = verifyBinary(cproject, hostPath);
+               return binaryObject;
+       }
+
+       protected String getEnvironments(ILaunchConfiguration config)
+                       throws Exception {
+               String envs = "";
+               String[] envArray = getEnvironment(config);
+               for (String env : envArray) {
+                       envs += TizenPlatformConstants.ENVIRONMENT_SETTING_CMD + env
+                                       + " && ";
+               }
+               return envs;
+       }
+
+       protected String getArguments(ILaunchConfiguration config)
+                       throws CoreException {
+               String appPath = config.getAttribute(
+                               ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, "");
+               String arguments = org.eclipse.cdt.launch.LaunchUtils
+                               .getProgramArguments(config);
+               String executableWithArguments = "";
+               if (arguments != null && !arguments.equals("")) {
+                       executableWithArguments = appPath + " " + arguments;
+               } else {
+                       executableWithArguments = appPath;
+               }
+               return executableWithArguments;
+       }
 }
index b51dc39..c4b1217 100644 (file)
@@ -1,3 +1,6 @@
+* 2.2.5
+- Enable Profile with Dynamic Analyzer for EFL Platform project
+== jungwook.ryu <jungwook.ryu@samsung.com> 2014-05-15
 * 2.2.4
 - Enable to build Platform project and launch Dynamic Analyzer tool in IDE (using Profile As..)
 == jungwook.ryu <jungwook.ryu@samsung.com> 2014-05-09
index 0aec34a..ae01614 100644 (file)
@@ -1,4 +1,4 @@
-Version:2.2.4
+Version:2.2.5
 Source:dynamic-analysis-ide-eplugin
 Maintainer:Juyoung Kim <j0.kim@samsung.com>, Sanghyun Lee <sanghyunnim.lee@samsung.com>, Jungwook Ryu <jungwook.ryu@samsung.com>