diff options
author | jungwook.ryu <jungwook.ryu@samsung.com> | 2015-01-16 14:21:29 +0900 |
---|---|---|
committer | jungwook.ryu <jungwook.ryu@samsung.com> | 2015-01-16 14:21:38 +0900 |
commit | c7bb6ad556bd51f3613613143b6cb0608f08c7a5 (patch) | |
tree | 3b4076f5530a41bfd9100a7d03e7c2d7c0ea62d8 | |
parent | 5c4a4a6b7518bf64e8649cdd904070d0c61fcff3 (diff) | |
parent | c327f8fb1bbbc40e095f94ed8d4ff8b98ed16b8e (diff) | |
download | dynamic-analysis-ide-eplugin-c7bb6ad556bd51f3613613143b6cb0608f08c7a5.tar.gz dynamic-analysis-ide-eplugin-c7bb6ad556bd51f3613613143b6cb0608f08c7a5.tar.bz2 dynamic-analysis-ide-eplugin-c7bb6ad556bd51f3613613143b6cb0608f08c7a5.zip |
Merge branch 'mw' into tizen
Conflicts:
org.tizen.dynamicanalysis.ide.native.eplugin/src/org/tizen/dynamicanalysis/ide/eplugin/communication/DAServerManager.java
Change-Id: Ia1539f7c74d75bdef84a7714c37b8e545a84c662
Signed-off-by: jungwook.ryu <jungwook.ryu@samsung.com>
6 files changed, 200 insertions, 676 deletions
diff --git a/org.tizen.dynamicanalysis.ide.eplugin/src/org/tizen/dynamicanalysis/ide/eplugin/communication/DAServerManager.java b/org.tizen.dynamicanalysis.ide.eplugin/src/org/tizen/dynamicanalysis/ide/eplugin/communication/DAServerManager.java index f65990b..d8fbb33 100644 --- a/org.tizen.dynamicanalysis.ide.eplugin/src/org/tizen/dynamicanalysis/ide/eplugin/communication/DAServerManager.java +++ b/org.tizen.dynamicanalysis.ide.eplugin/src/org/tizen/dynamicanalysis/ide/eplugin/communication/DAServerManager.java @@ -34,7 +34,6 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStreamWriter; import java.io.RandomAccessFile; -import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.Proxy; import java.net.Socket; @@ -65,6 +64,8 @@ public class DAServerManager extends Thread { private String reservedExecutablePath; //$NON-NLS-1$ private List<String> reservedLocalPackagePathList; //$NON-NLS-1$ + private String LOCAL_HOST = "127.0.0.1"; + private final String IDE_DA_COMMUNICATION_TYPE_1 = "STATUS"; //$NON-NLS-1$ private final String IDE_DA_COMMUNICATION_TYPE_2 = "RUN"; //$NON-NLS-1$ private final String IDE_DA_COMMUNICATION_TYPE_3 = "SOURCE"; //$NON-NLS-1$ @@ -294,8 +295,8 @@ public class DAServerManager extends Thread { private boolean setServerSocket() { try { - ideClientSocket = new Socket(Proxy.NO_PROXY); /* handle environment in Proxy network */ - InetSocketAddress socketAddress = new InetSocketAddress(InetAddress.getLocalHost(), serverPort); + ideClientSocket = new Socket(Proxy.NO_PROXY); /* handle environment in Proxy network */ + InetSocketAddress socketAddress = new InetSocketAddress(LOCAL_HOST, serverPort); ideClientSocket.connect(socketAddress); } catch (UnknownHostException e) { DALog.printLog(e); diff --git a/org.tizen.dynamicanalysis.ide.eplugin/src/org/tizen/dynamicanalysis/ide/eplugin/launch/TizenNativeApplicationDADelegate.java b/org.tizen.dynamicanalysis.ide.eplugin/src/org/tizen/dynamicanalysis/ide/eplugin/launch/TizenNativeApplicationDADelegate.java index 28f19bb..9abd6fd 100644 --- a/org.tizen.dynamicanalysis.ide.eplugin/src/org/tizen/dynamicanalysis/ide/eplugin/launch/TizenNativeApplicationDADelegate.java +++ b/org.tizen.dynamicanalysis.ide.eplugin/src/org/tizen/dynamicanalysis/ide/eplugin/launch/TizenNativeApplicationDADelegate.java @@ -27,33 +27,30 @@ package org.tizen.dynamicanalysis.ide.eplugin.launch; +import static org.tizen.common.launch.LaunchesListener.LAUNCH_ATTR_KEY_IS_LAUNCHING; +import static org.tizen.common.launch.LaunchesListener.LAUNCH_ATTR_VALUE_LAUNCHING_ALREADY; import static org.tizen.sdblib.util.DeviceUtil.isOnline; import java.io.File; import java.io.FilenameFilter; import java.io.IOException; -import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; import java.util.List; -import org.eclipse.cdt.core.IBinaryParser.IBinaryObject; -import org.eclipse.cdt.core.model.ICProject; import org.eclipse.cdt.core.settings.model.ICConfigurationDescription; import org.eclipse.cdt.core.settings.model.ICProjectDescription; -import org.eclipse.cdt.debug.core.CDebugUtils; import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants; import org.eclipse.cdt.launch.internal.ui.LaunchUIPlugin; import org.eclipse.cdt.managedbuilder.core.IConfiguration; import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager; import org.eclipse.cdt.ui.newui.CDTPropertyManager; import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IWorkspace; -import org.eclipse.core.resources.IWorkspaceRoot; -import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; 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; @@ -62,49 +59,38 @@ import org.eclipse.debug.core.ILaunch; import org.eclipse.debug.core.ILaunchConfiguration; import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; import org.eclipse.debug.core.ILaunchManager; -import org.eclipse.jface.dialogs.ProgressMonitorDialog; -import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.LabelProvider; import org.eclipse.jface.window.Window; +import org.eclipse.osgi.util.NLS; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.IWorkbenchWindow; import org.eclipse.ui.PartInitException; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.dialogs.TwoPaneElementSelector; import org.tizen.common.IApplicationConfiguration; import org.tizen.common.TizenPlatformConstants; import org.tizen.common.core.application.InstallPathConfig; -import org.tizen.common.rds.RdsDeployer; +import org.tizen.common.launch.LaunchMessages; import org.tizen.common.rds.ui.preference.RdsPreferencePage; import org.tizen.common.util.HostUtil; import org.tizen.common.util.OSChecker; import org.tizen.common.util.SWTUtil; +import org.tizen.common.util.log.LoggerConstants; import org.tizen.common.util.log.UserInteraction; import org.tizen.common.util.log.UserLogger; import org.tizen.dynamicanalysis.ide.eplugin.Activator; import org.tizen.dynamicanalysis.ide.eplugin.DALog; import org.tizen.dynamicanalysis.ide.eplugin.communication.DAServerManager; import org.tizen.dynamicanalysis.ide.eplugin.nl.Labels; -import org.tizen.nativecommon.IXMLStore; import org.tizen.nativecommon.ProjectUtil; -import org.tizen.nativecommon.build.CommonBuildConstants; -import org.tizen.nativecommon.build.CommonBuildMessages; import org.tizen.nativecommon.build.CommonConfigurationManager; import org.tizen.nativecommon.build.CommonProjectDependentPackager; -import org.tizen.nativecommon.build.PlatformChangingManager; -import org.tizen.nativecommon.build.ProjectTypeManager; import org.tizen.nativecommon.build.SmartBuildInterface; -import org.tizen.nativecommon.build.exception.SBIException; -import org.tizen.nativecommon.launch.AbstractTizenCLaunchDelegate; -import org.tizen.nativecommon.launch.IProjectLaunchCommand; import org.tizen.nativecommon.launch.LaunchUtils; -import org.tizen.nativecommon.launch.NativeRdsDeployer; import org.tizen.nativecommon.launch.TizenLaunchCommand; import org.tizen.nativecommon.launch.TizenLaunchConfigurationConstants; -import org.tizen.nativecommon.launch.TizenLaunchConsole; -import org.tizen.nativecommon.launch.TizenLaunchInfo; +import org.tizen.nativecommon.launch.TizenLaunchDelegate; import org.tizen.nativecommon.launch.TizenLaunchMessages; import org.tizen.nativecommon.launch.ui.TizenLaunchDeviceSelectionDialog; import org.tizen.nativeplatform.build.PlatformConfigurationManager; @@ -122,15 +108,11 @@ import org.tizen.nativeplatform.views.model.PlatformRootstrap; import org.tizen.sdblib.Arch; import org.tizen.sdblib.IDevice; import org.tizen.sdblib.SmartDevelopmentBridge; -import org.tizen.sdblib.service.SyncResult; -public class TizenNativeApplicationDADelegate extends - AbstractTizenCLaunchDelegate { +public class TizenNativeApplicationDADelegate extends TizenLaunchDelegate { private final static String TOOLS = "tools";// $NON_NLS-1$ private final static String DYNAMIC_ANALYZER = "dynamic-analyzer";// $NON_NLS-1$ - private final static String PKG_TYPE = CommonProjectDependentPackager.DEFAULT; private final static String PLATFORM_PKG_TYPE = CommonProjectDependentPackager.RPM; - private boolean bSuccessBuild = true; IProject project; /* * for platform project @@ -142,7 +124,7 @@ public class TizenNativeApplicationDADelegate extends protected PkgCommandTarget target = null; protected TizenLaunchCommand tizenCommand = null; protected IPackageUtil pkgUtil = PkgUtilFactory.getPkgUtil(PlatformProjectUtil.getPkgType()); - + private static class ExtFilter implements FilenameFilter { private String ext; @@ -154,22 +136,14 @@ public class TizenNativeApplicationDADelegate extends return name.endsWith(ext); } } - - @Override + public void launch(ILaunchConfiguration config, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException { - DALog.printLog("Launch delegate"); - 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; - + UserLogger.start(UserInteraction.CATE_NATIVE_LAUNCH); + if (monitor == null) + monitor = new NullProgressMonitor(); + final IProject project = ProjectUtil.getProject(config); + /* * This "if()" sentence is start point about Platform Project process. * All source code in this "if()" dependent on another plugin project source code(nativeplatform-eplugin). @@ -183,6 +157,11 @@ public class TizenNativeApplicationDADelegate extends if (monitor == null) { monitor = new NullProgressMonitor(); } + String device = LaunchUtils.getCurrentDeployDevice().toString(); + ProjectType projectType = ProjectType.NONE; + String binaryOfTarget = ""; + String executablePath = ""; + List<String> localPackagePathList = null; try { int totalWorks = 4; monitor.beginTask("", totalWorks); @@ -209,7 +188,6 @@ public class TizenNativeApplicationDADelegate extends isLaunchFailed = true; newCoreException(PlatformLaunchMessages.CANNOT_LAUNCH, null); } - /* * Make protocol message with DA(Dynamic Analyzer) Tool. */ @@ -252,42 +230,92 @@ public class TizenNativeApplicationDADelegate extends UserLogger.end(UserInteraction.CATE_PLATFORM_LAUNCH); } - if (bSuccessBuild && !isLaunchFailed && isDAReady()) { + if (!isLaunchFailed && isDAReady()) { runDynamicAnalyzer(device, projectType, binaryOfTarget, executablePath, localPackagePathList); } } else { // Case : Native application - projectType = ProjectType.OSP; - verifyCProjectConfigurationSettings(config); try { - verityUnitTestProject(project); - verifyIMEProject(project); - LaunchUtils.verifyExecutableProject(project); - IDevice currentDevice = LaunchUtils.getCurrentDeployDevice(); - if (currentDevice == null) { - throw new CoreException(new Status(Status.ERROR, - Activator.PLUGIN_ID, Status.INFO, - TizenLaunchMessages.CANNOT_CONNECT_TO_DEVICE, null)); + monitor.beginTask(TizenLaunchMessages.LAUNCH_APPLICATION, 20); + monitor.subTask(TizenLaunchMessages.LAUNCH_APPLICATION); + + if (LAUNCH_ATTR_VALUE_LAUNCHING_ALREADY.equals(launch + .getAttribute(LAUNCH_ATTR_KEY_IS_LAUNCHING))) { + throw new CoreException(new Status(IStatus.ERROR, + Activator.PLUGIN_ID, NLS.bind( + LaunchMessages.LAUNCHED_ALREADY, + project.getName()))); } - if (isDAReady()) { - if (packaging_upload_install(project, currentDevice)) { + LaunchUtils.verifyExecutableProject(project); + verifyCProjectConfigurationSettings(config); + + // FIXME : verifyDeviceReachability method is needed to change + // method signature such as IDevice getDevice() so on. + verifyDeviceReachability(config, new SubProgressMonitor(monitor, 8)); + verifyBuildConfiguration(config, mode, new SubProgressMonitor( + monitor, 1)); + + // Console should be set after verifying device reachability. + setConsole(config); + if (LaunchUtils.isVerboseMode(config)) { + tizenCommand = new TizenLaunchCommand(currentDevice, + launchConsole); + } else { + tizenCommand = new TizenLaunchCommand(currentDevice, null); + } + launchConsole.show(); + org.tizen.common.util.log.FileAppender fileAppender = (org.tizen.common.util.log.FileAppender) org.apache.log4j.Logger + .getRootLogger().getAppender( + LoggerConstants.NAME_FILE_APPENDER); + String logPath = (fileAppender != null) ? fileAppender.getLogPath() + : ""; + launchConsole.println(NLS + .bind(LaunchMessages.LAUNCH_START, logPath)); + + Long startLaunchTime = (long) 0; + Long endLaunchTime = (long) 0; + try { + monitor.beginTask(TizenLaunchMessages.LAUNCH_APPLICATION, 10); + monitor.subTask(TizenLaunchMessages.LAUNCH_APPLICATION); + startLaunchTime = System.currentTimeMillis(); + deployApplication(config, new SubProgressMonitor(monitor, 9)); + verifyLaunchableProject(config, ILaunchManager.RUN_MODE); + + String device = LaunchUtils.getCurrentDeployDevice().toString(); + ProjectType projectType = ProjectType.OSP; + String binaryOfTarget = ""; + String executablePath = ""; + List<String> localPackagePathList = null; + if (isDAReady()) { IApplicationConfiguration adapter = (IApplicationConfiguration) project .getAdapter(IApplicationConfiguration.class); binaryOfTarget = adapter.getAppId(); - runDynamicAnalyzer(device, projectType, binaryOfTarget, executablePath, localPackagePathList); + runDynamicAnalyzer(device, projectType, binaryOfTarget, + executablePath, localPackagePathList); } + } finally { + endLaunchTime = System.currentTimeMillis(); + launchConsole.println(LaunchMessages.getElapsedTimeMessage( + startLaunchTime, endLaunchTime)); + monitor.done(); } - } catch (CoreException e) { - DALog.dlgErrorMessage(Labels.MESSAGE_ERROR, e.getMessage()); + } catch (OperationCanceledException e) { + return; } finally { - rollBackBuildConfigSetting(project); - if (!launch.isTerminated()) { - launch.terminate(); + if (mode.equals(ILaunchManager.DEBUG_MODE)) { + processPostDebug(config); + } else { + if (!launch.isTerminated()) + launch.terminate(); + } ILaunchManager launchManager = DebugPlugin.getDefault() .getLaunchManager(); launchManager.removeLaunch(launch); - } + firePostLaunched(project, RdsPreferencePage.isRdsMode(project)); + monitor.done(); + UserLogger.end(UserInteraction.CATE_NATIVE_LAUNCH); + } } } @@ -298,238 +326,6 @@ public class TizenNativeApplicationDADelegate extends return true; } - private boolean packaging_upload_install(final IProject project, - final IDevice currentDevice) { - bSuccessBuild = true; - - 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 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)) { - TizenLaunchCommand tizenCommand = new TizenLaunchCommand( - currentDevice); - rdsDeployer = new NativeRdsDeployer( - project, - currentDevice, - tizenCommand, - TizenLaunchConsole - .getTizenConsole(), - CommonProjectDependentPackager.DEFAULT - .toLowerCase(), monitor); - rdsDeployer.setInterestList(TizenLaunchInfo - .makeInterestList(project)); - rdsDeployer.setIgnoreList(TizenLaunchInfo - .makeIgnoreList(project)); - if (!rdsDeployer.deploy()) { - if (packager == null) { - bSuccessBuild = false; - return; - } - buildPackage(monitor, project, - manifest, packager); - normalDeploy(monitor, project, - currentDevice, manifest, - packager); - } - rdsDeployer.pushResInfoFile(); - } else { - if (packager == null) { - bSuccessBuild = false; - return; - } - buildPackage(monitor, project, manifest, - packager); - normalDeploy(monitor, project, - currentDevice, manifest, packager); - } - LaunchUtils.touchExecutableFile(project); - } catch (CoreException e) { - DALog.dlgErrorMessage(Labels.MESSAGE_ERROR, - e.getMessage()); - bSuccessBuild = false; - monitor.done(); - } finally { - if (rdsDeployer != null) { - try { - rdsDeployer.close(); - } catch (IOException e) { - DALog.dlgErrorMessage( - "Failed to close RDSDeployer", - e.getMessage()); - } - } - } - - if (monitor.isCanceled()) { - bSuccessBuild = false; - monitor.done(); - } - } - }); - } 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; - } - } - }); - - return bSuccessBuild; - } - - private void buildPackage(IProgressMonitor monitor, IProject project, - IProjectLaunchCommand manifest, - CommonProjectDependentPackager packager) throws CoreException { - try { - monitor.beginTask(Labels.MESSAGE_PREPARING_PROFILE, 3); - monitor.subTask(Labels.MESSAGE_BUILDING_PACKAGE); - - manifest.doMultiAppPreProcess(packager, monitor); - - packager.buildPackage(PKG_TYPE, - TizenPlatformConstants.SIGNING_DEFAULT, true); - } catch (SBIException e) { - newCoreException(Labels.MESSAGE_FAIL_TO_BUILD_PROJECT, null); - } - } - - private void normalDeploy(IProgressMonitor monitor, IProject project, - IDevice currentDevice, IProjectLaunchCommand manifest, - CommonProjectDependentPackager packager) throws CoreException { - if (!packager.checkPackageFile(PKG_TYPE)) { - DALog.dlgErrorMessage(CommonBuildMessages.BUILD_RESULT, - CommonBuildMessages.FAIL_TO_BUILD_PACKAGE); - bSuccessBuild = false; - monitor.done(); - return; - } - - File packageFile = null; - String packageDirectory = File.separatorChar - + ManagedBuildManager.getBuildInfo(project) - .getConfigurationName() + File.separatorChar; - IPath packagePath = new Path(project.getLocation().toString() - + packageDirectory); - packageFile = findPackageFile(packagePath.toFile(), - "." + PKG_TYPE.toLowerCase(), project);//$NON-NLS-1$ - - if (packageFile == null) { - newCoreException(CommonBuildMessages.FAIL_TO_BUILD_PACKAGE, null); - } - - try { - uploadApp(monitor, project, currentDevice, packageFile); - installApp(monitor, manifest, currentDevice, packageFile); - } catch (Exception e) { - newCoreException(e.getMessage(), null); - } finally { - monitor.done(); - } - } - - private void uploadApp(IProgressMonitor monitor, IProject project, - IDevice currentDevice, File packageFile) throws CoreException { - try { - monitor.worked(2); - monitor.subTask(TizenLaunchMessages.TRANSFER_PACKAGE); - - String destDirectoryPath = TizenPlatformConstants - .getAppTmpDirectory(currentDevice); - - String srcFilePath = packageFile.getAbsoluteFile() - .getCanonicalPath(); - - SyncResult syncSuccess = currentDevice.getSyncService().push( - srcFilePath, currentDevice.getFileEntry(destDirectoryPath)); // Fixxed - - if (!syncSuccess.isOk()) { - newCoreException(TizenLaunchMessages.CANNOT_TRANSFER_FILE, null); - } - } catch (IOException e) { - newCoreException(TizenLaunchMessages.CANNOT_TRANSFER_FILE, null); - } - } - - @SuppressWarnings("deprecation") - private void installApp(IProgressMonitor monitor, - IProjectLaunchCommand manifest, IDevice currentDevice, - File packageFile) throws CoreException, Exception { - monitor.worked(1); - monitor.subTask(TizenLaunchMessages.INSTALL_PACKAGE); - - 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)) { - String removeCmd = manifest.getRemoveCommand(packageName); - - launcher.run(removeCmd); - } - - String installCmd = manifest.getInstallCommand(packageFile, - PKG_TYPE.toLowerCase(), currentDevice); - launcher.run(installCmd); - } - - private File findPackageFile(final File searchPath, final String ext, - IProject project) { - File[] packageFiles = searchPath.listFiles(new ExtFilter(ext)); - - if (packageFiles == null || packageFiles.length == 0) { - return null; - } - - IProjectLaunchCommand manifest = ProjectUtil - .getProjectManifest(project); - String packageName = manifest.getPackageName(); - if (packageName == null) { - return null; - } - - for (File file : packageFiles) { - String fileName = file.getName(); - if (fileName.contains(packageName)) { - return file; - } - } - - return null; - } - - private void newCoreException(final String message, Throwable exception) - throws CoreException { - Status status = new Status(Status.ERROR, Activator.PLUGIN_ID, message, - exception); - throw new CoreException(status); - } - private boolean executeWindowsCommand(final String command) { if (command == null) { return false; @@ -560,24 +356,6 @@ public class TizenNativeApplicationDADelegate extends return bSuccuss; } - private void verityUnitTestProject(IProject project) throws CoreException { - String[] natures = project.getDescription().getNatureIds(); - for (String nature : natures) { - if (nature.equals(CommonBuildConstants.UNIT_TEST_NATURE_ID)) { - newCoreException(Labels.MESSAGE_NOT_SUPPORT_UNIT_TEST_PROJECT, - null); - } - } - } - - private void verifyIMEProject(IProject project) throws CoreException { - @SuppressWarnings("deprecation") - IXMLStore store = ProjectUtil.getXmlStore(project); - if (store.isImeCategory()) { - newCoreException(Labels.MESSAGE_NOT_SUPPORT_IME_PROJECT, null); - } - } - private void runDynamicAnalyzer(String device, ProjectType projectType, String binaryOfTarget, String executablePath, List<String> localPackagePathList) { if (DAServerManager.getInstance().getClientSocket() == null) { @@ -638,15 +416,6 @@ public class TizenNativeApplicationDADelegate extends return rpms; } - private void rollBackBuildConfigSetting(IProject project) { - String prevBuildConfigName = TizenNativeApplicationDAShortcut - .getPrevBuildConfigName(); - if (prevBuildConfigName != null) { - ManagedBuildManager.getBuildInfo(project).setDefaultConfiguration( - prevBuildConfigName); - } - } - @Override protected String getPluginID() { return Activator.PLUGIN_ID; @@ -978,17 +747,6 @@ public class TizenNativeApplicationDADelegate extends 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 = ""; diff --git a/org.tizen.dynamicanalysis.ide.native.eplugin/src/org/tizen/dynamicanalysis/ide/eplugin/communication/DAServerManager.java b/org.tizen.dynamicanalysis.ide.native.eplugin/src/org/tizen/dynamicanalysis/ide/eplugin/communication/DAServerManager.java index 1700760..d8fbb33 100644 --- a/org.tizen.dynamicanalysis.ide.native.eplugin/src/org/tizen/dynamicanalysis/ide/eplugin/communication/DAServerManager.java +++ b/org.tizen.dynamicanalysis.ide.native.eplugin/src/org/tizen/dynamicanalysis/ide/eplugin/communication/DAServerManager.java @@ -34,7 +34,6 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStreamWriter; import java.io.RandomAccessFile; -import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.Proxy; import java.net.Socket; @@ -65,6 +64,8 @@ public class DAServerManager extends Thread { private String reservedExecutablePath; //$NON-NLS-1$ private List<String> reservedLocalPackagePathList; //$NON-NLS-1$ + private String LOCAL_HOST = "127.0.0.1"; + private final String IDE_DA_COMMUNICATION_TYPE_1 = "STATUS"; //$NON-NLS-1$ private final String IDE_DA_COMMUNICATION_TYPE_2 = "RUN"; //$NON-NLS-1$ private final String IDE_DA_COMMUNICATION_TYPE_3 = "SOURCE"; //$NON-NLS-1$ @@ -295,7 +296,7 @@ public class DAServerManager extends Thread { private boolean setServerSocket() { try { ideClientSocket = new Socket(Proxy.NO_PROXY); /* handle environment in Proxy network */ - InetSocketAddress socketAddress = new InetSocketAddress(InetAddress.getLoopbackAddress(), serverPort); + InetSocketAddress socketAddress = new InetSocketAddress(LOCAL_HOST, serverPort); ideClientSocket.connect(socketAddress); } catch (UnknownHostException e) { DALog.printLog(e); diff --git a/org.tizen.dynamicanalysis.ide.native.eplugin/src/org/tizen/dynamicanalysis/ide/eplugin/launch/TizenNativeApplicationDADelegate.java b/org.tizen.dynamicanalysis.ide.native.eplugin/src/org/tizen/dynamicanalysis/ide/eplugin/launch/TizenNativeApplicationDADelegate.java index 4c92e57..d03879f 100644 --- a/org.tizen.dynamicanalysis.ide.native.eplugin/src/org/tizen/dynamicanalysis/ide/eplugin/launch/TizenNativeApplicationDADelegate.java +++ b/org.tizen.dynamicanalysis.ide.native.eplugin/src/org/tizen/dynamicanalysis/ide/eplugin/launch/TizenNativeApplicationDADelegate.java @@ -27,129 +27,141 @@ package org.tizen.dynamicanalysis.ide.eplugin.launch; +import static org.tizen.common.launch.LaunchesListener.LAUNCH_ATTR_KEY_IS_LAUNCHING; +import static org.tizen.common.launch.LaunchesListener.LAUNCH_ATTR_VALUE_LAUNCHING_ALREADY; + import java.io.File; -import java.io.FilenameFilter; import java.io.IOException; -import java.lang.reflect.InvocationTargetException; import java.util.List; import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants; import org.eclipse.cdt.managedbuilder.core.IConfiguration; import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager; import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IWorkspace; -import org.eclipse.core.resources.IWorkspaceRoot; -import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.Path; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.core.runtime.OperationCanceledException; import org.eclipse.core.runtime.Status; +import org.eclipse.core.runtime.SubProgressMonitor; import org.eclipse.debug.core.DebugPlugin; import org.eclipse.debug.core.ILaunch; import org.eclipse.debug.core.ILaunchConfiguration; import org.eclipse.debug.core.ILaunchManager; -import org.eclipse.jface.dialogs.ProgressMonitorDialog; -import org.eclipse.jface.operation.IRunnableWithProgress; -import org.eclipse.swt.widgets.Display; -import org.eclipse.ui.IWorkbenchWindow; -import org.eclipse.ui.PlatformUI; +import org.eclipse.osgi.util.NLS; import org.tizen.common.IApplicationConfiguration; -import org.tizen.common.TizenPlatformConstants; import org.tizen.common.core.application.InstallPathConfig; -import org.tizen.common.rds.RdsDeployer; +import org.tizen.common.launch.LaunchMessages; import org.tizen.common.rds.ui.preference.RdsPreferencePage; import org.tizen.common.util.HostUtil; import org.tizen.common.util.OSChecker; +import org.tizen.common.util.log.LoggerConstants; +import org.tizen.common.util.log.UserInteraction; +import org.tizen.common.util.log.UserLogger; import org.tizen.dynamicanalysis.ide.eplugin.Activator; import org.tizen.dynamicanalysis.ide.eplugin.DALog; import org.tizen.dynamicanalysis.ide.eplugin.communication.DAServerManager; import org.tizen.dynamicanalysis.ide.eplugin.nl.Labels; -import org.tizen.nativecommon.IXMLStore; import org.tizen.nativecommon.ProjectUtil; -import org.tizen.nativecommon.build.CommonBuildConstants; -import org.tizen.nativecommon.build.CommonBuildMessages; -import org.tizen.nativecommon.build.CommonProjectDependentPackager; -import org.tizen.nativecommon.build.ProjectTypeManager; -import org.tizen.nativecommon.build.exception.SBIException; -import org.tizen.nativecommon.launch.AbstractTizenCLaunchDelegate; -import org.tizen.nativecommon.launch.IProjectLaunchCommand; import org.tizen.nativecommon.launch.LaunchUtils; -import org.tizen.nativecommon.launch.NativeRdsDeployer; import org.tizen.nativecommon.launch.TizenLaunchCommand; import org.tizen.nativecommon.launch.TizenLaunchConfigurationConstants; -import org.tizen.nativecommon.launch.TizenLaunchConsole; -import org.tizen.nativecommon.launch.TizenLaunchInfo; +import org.tizen.nativecommon.launch.TizenLaunchDelegate; import org.tizen.nativecommon.launch.TizenLaunchMessages; -import org.tizen.sdblib.IDevice; -import org.tizen.sdblib.service.SyncResult; -public class TizenNativeApplicationDADelegate extends - AbstractTizenCLaunchDelegate { +public class TizenNativeApplicationDADelegate extends TizenLaunchDelegate { private final static String TOOLS = "tools";// $NON_NLS-1$ private final static String DYNAMIC_ANALYZER = "dynamic-analyzer";// $NON_NLS-1$ - private final static String PKG_TYPE = CommonProjectDependentPackager.DEFAULT; - private boolean bSuccessBuild = true; IProject project; - private static class ExtFilter implements FilenameFilter { - private String ext; - - public ExtFilter(String ext) { - this.ext = ext; - } - - public boolean accept(File dir, String name) { - return name.endsWith(ext); - } - } - - @Override public void launch(ILaunchConfiguration config, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException { - DALog.printLog("Launch delegate"); - 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; - - projectType = ProjectType.OSP; - verifyCProjectConfigurationSettings(config); + UserLogger.start(UserInteraction.CATE_NATIVE_LAUNCH); + if (monitor == null) + monitor = new NullProgressMonitor(); + final IProject project = ProjectUtil.getProject(config); try { - verityUnitTestProject(project); - verifyIMEProject(project); - LaunchUtils.verifyExecutableProject(project); - IDevice currentDevice = LaunchUtils.getCurrentDeployDevice(); - if (currentDevice == null) { - throw new CoreException(new Status(Status.ERROR, - Activator.PLUGIN_ID, Status.INFO, - TizenLaunchMessages.CANNOT_CONNECT_TO_DEVICE, null)); + monitor.beginTask(TizenLaunchMessages.LAUNCH_APPLICATION, 20); + monitor.subTask(TizenLaunchMessages.LAUNCH_APPLICATION); + + if (LAUNCH_ATTR_VALUE_LAUNCHING_ALREADY.equals(launch + .getAttribute(LAUNCH_ATTR_KEY_IS_LAUNCHING))) { + throw new CoreException(new Status(IStatus.ERROR, + Activator.PLUGIN_ID, NLS.bind( + LaunchMessages.LAUNCHED_ALREADY, + project.getName()))); } - if (isDAReady()) { - if (packaging_upload_install(project, currentDevice)) { + LaunchUtils.verifyExecutableProject(project); + verifyCProjectConfigurationSettings(config); + + // FIXME : verifyDeviceReachability method is needed to change + // method signature such as IDevice getDevice() so on. + verifyDeviceReachability(config, new SubProgressMonitor(monitor, 8)); + verifyBuildConfiguration(config, mode, new SubProgressMonitor( + monitor, 1)); + + // Console should be set after verifying device reachability. + setConsole(config); + if (LaunchUtils.isVerboseMode(config)) { + tizenCommand = new TizenLaunchCommand(currentDevice, + launchConsole); + } else { + tizenCommand = new TizenLaunchCommand(currentDevice, null); + } + launchConsole.show(); + org.tizen.common.util.log.FileAppender fileAppender = (org.tizen.common.util.log.FileAppender) org.apache.log4j.Logger + .getRootLogger().getAppender( + LoggerConstants.NAME_FILE_APPENDER); + String logPath = (fileAppender != null) ? fileAppender.getLogPath() + : ""; + launchConsole.println(NLS + .bind(LaunchMessages.LAUNCH_START, logPath)); + + Long startLaunchTime = (long) 0; + Long endLaunchTime = (long) 0; + try { + monitor.beginTask(TizenLaunchMessages.LAUNCH_APPLICATION, 10); + monitor.subTask(TizenLaunchMessages.LAUNCH_APPLICATION); + startLaunchTime = System.currentTimeMillis(); + deployApplication(config, new SubProgressMonitor(monitor, 9)); + verifyLaunchableProject(config, ILaunchManager.RUN_MODE); + + String device = LaunchUtils.getCurrentDeployDevice().toString(); + ProjectType projectType = ProjectType.OSP; + String binaryOfTarget = ""; + String executablePath = ""; + List<String> localPackagePathList = null; + if (isDAReady()) { IApplicationConfiguration adapter = (IApplicationConfiguration) project .getAdapter(IApplicationConfiguration.class); binaryOfTarget = adapter.getAppId(); - runDynamicAnalyzer(device, projectType, binaryOfTarget, executablePath, localPackagePathList); + runDynamicAnalyzer(device, projectType, binaryOfTarget, + executablePath, localPackagePathList); } + } finally { + endLaunchTime = System.currentTimeMillis(); + launchConsole.println(LaunchMessages.getElapsedTimeMessage( + startLaunchTime, endLaunchTime)); + monitor.done(); } - } catch (CoreException e) { - DALog.dlgErrorMessage(Labels.MESSAGE_ERROR, e.getMessage()); + } catch (OperationCanceledException e) { + return; } finally { - rollBackBuildConfigSetting(project); - if (!launch.isTerminated()) { - launch.terminate(); + if (mode.equals(ILaunchManager.DEBUG_MODE)) { + processPostDebug(config); + } else { + if (!launch.isTerminated()) + launch.terminate(); + } ILaunchManager launchManager = DebugPlugin.getDefault() .getLaunchManager(); launchManager.removeLaunch(launch); + firePostLaunched(project, RdsPreferencePage.isRdsMode(project)); + monitor.done(); + UserLogger.end(UserInteraction.CATE_NATIVE_LAUNCH); } } @@ -160,238 +172,6 @@ public class TizenNativeApplicationDADelegate extends return true; } - private boolean packaging_upload_install(final IProject project, - final IDevice currentDevice) { - bSuccessBuild = true; - - 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 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)) { - TizenLaunchCommand tizenCommand = new TizenLaunchCommand( - currentDevice); - rdsDeployer = new NativeRdsDeployer( - project, - currentDevice, - tizenCommand, - TizenLaunchConsole - .getTizenConsole(), - CommonProjectDependentPackager.DEFAULT - .toLowerCase(), monitor); - rdsDeployer.setInterestList(TizenLaunchInfo - .makeInterestList(project)); - rdsDeployer.setIgnoreList(TizenLaunchInfo - .makeIgnoreList(project)); - if (!rdsDeployer.deploy()) { - if (packager == null) { - bSuccessBuild = false; - return; - } - buildPackage(monitor, project, - manifest, packager); - normalDeploy(monitor, project, - currentDevice, manifest, - packager); - } - rdsDeployer.pushResInfoFile(); - } else { - if (packager == null) { - bSuccessBuild = false; - return; - } - buildPackage(monitor, project, manifest, - packager); - normalDeploy(monitor, project, - currentDevice, manifest, packager); - } - LaunchUtils.touchExecutableFile(project); - } catch (CoreException e) { - DALog.dlgErrorMessage(Labels.MESSAGE_ERROR, - e.getMessage()); - bSuccessBuild = false; - monitor.done(); - } finally { - if (rdsDeployer != null) { - try { - rdsDeployer.close(); - } catch (IOException e) { - DALog.dlgErrorMessage( - "Failed to close RDSDeployer", - e.getMessage()); - } - } - } - - if (monitor.isCanceled()) { - bSuccessBuild = false; - monitor.done(); - } - } - }); - } 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; - } - } - }); - - return bSuccessBuild; - } - - private void buildPackage(IProgressMonitor monitor, IProject project, - IProjectLaunchCommand manifest, - CommonProjectDependentPackager packager) throws CoreException { - try { - monitor.beginTask(Labels.MESSAGE_PREPARING_PROFILE, 3); - monitor.subTask(Labels.MESSAGE_BUILDING_PACKAGE); - - manifest.doMultiAppPreProcess(packager, monitor); - - packager.buildPackage(PKG_TYPE, - TizenPlatformConstants.SIGNING_DEFAULT, true); - } catch (SBIException e) { - newCoreException(Labels.MESSAGE_FAIL_TO_BUILD_PROJECT, null); - } - } - - private void normalDeploy(IProgressMonitor monitor, IProject project, - IDevice currentDevice, IProjectLaunchCommand manifest, - CommonProjectDependentPackager packager) throws CoreException { - if (!packager.checkPackageFile(PKG_TYPE)) { - DALog.dlgErrorMessage(CommonBuildMessages.BUILD_RESULT, - CommonBuildMessages.FAIL_TO_BUILD_PACKAGE); - bSuccessBuild = false; - monitor.done(); - return; - } - - File packageFile = null; - String packageDirectory = File.separatorChar - + ManagedBuildManager.getBuildInfo(project) - .getConfigurationName() + File.separatorChar; - IPath packagePath = new Path(project.getLocation().toString() - + packageDirectory); - packageFile = findPackageFile(packagePath.toFile(), - "." + PKG_TYPE.toLowerCase(), project);//$NON-NLS-1$ - - if (packageFile == null) { - newCoreException(CommonBuildMessages.FAIL_TO_BUILD_PACKAGE, null); - } - - try { - uploadApp(monitor, project, currentDevice, packageFile); - installApp(monitor, manifest, currentDevice, packageFile); - } catch (Exception e) { - newCoreException(e.getMessage(), null); - } finally { - monitor.done(); - } - } - - private void uploadApp(IProgressMonitor monitor, IProject project, - IDevice currentDevice, File packageFile) throws CoreException { - try { - monitor.worked(2); - monitor.subTask(TizenLaunchMessages.TRANSFER_PACKAGE); - - String destDirectoryPath = TizenPlatformConstants - .getAppTmpDirectory(currentDevice); - - String srcFilePath = packageFile.getAbsoluteFile() - .getCanonicalPath(); - - SyncResult syncSuccess = currentDevice.getSyncService().push( - srcFilePath, currentDevice.getFileEntry(destDirectoryPath)); // Fixxed - - if (!syncSuccess.isOk()) { - newCoreException(TizenLaunchMessages.CANNOT_TRANSFER_FILE, null); - } - } catch (IOException e) { - newCoreException(TizenLaunchMessages.CANNOT_TRANSFER_FILE, null); - } - } - - @SuppressWarnings("deprecation") - private void installApp(IProgressMonitor monitor, - IProjectLaunchCommand manifest, IDevice currentDevice, - File packageFile) throws CoreException, Exception { - monitor.worked(1); - monitor.subTask(TizenLaunchMessages.INSTALL_PACKAGE); - - 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)) { - String removeCmd = manifest.getRemoveCommand(packageName); - - launcher.run(removeCmd); - } - - String installCmd = manifest.getInstallCommand(packageFile, - PKG_TYPE.toLowerCase(), currentDevice); - launcher.run(installCmd); - } - - private File findPackageFile(final File searchPath, final String ext, - IProject project) { - File[] packageFiles = searchPath.listFiles(new ExtFilter(ext)); - - if (packageFiles == null || packageFiles.length == 0) { - return null; - } - - IProjectLaunchCommand manifest = ProjectUtil - .getProjectManifest(project); - String packageName = manifest.getPackageName(); - if (packageName == null) { - return null; - } - - for (File file : packageFiles) { - String fileName = file.getName(); - if (fileName.contains(packageName)) { - return file; - } - } - - return null; - } - - private void newCoreException(final String message, Throwable exception) - throws CoreException { - Status status = new Status(Status.ERROR, Activator.PLUGIN_ID, message, - exception); - throw new CoreException(status); - } - private boolean executeWindowsCommand(final String command) { if (command == null) { return false; @@ -422,26 +202,9 @@ public class TizenNativeApplicationDADelegate extends return bSuccuss; } - private void verityUnitTestProject(IProject project) throws CoreException { - String[] natures = project.getDescription().getNatureIds(); - for (String nature : natures) { - if (nature.equals(CommonBuildConstants.UNIT_TEST_NATURE_ID)) { - newCoreException(Labels.MESSAGE_NOT_SUPPORT_UNIT_TEST_PROJECT, - null); - } - } - } - - private void verifyIMEProject(IProject project) throws CoreException { - @SuppressWarnings("deprecation") - IXMLStore store = ProjectUtil.getXmlStore(project); - if (store.isImeCategory()) { - newCoreException(Labels.MESSAGE_NOT_SUPPORT_IME_PROJECT, null); - } - } - - private void runDynamicAnalyzer(String device, ProjectType projectType, String binaryOfTarget, - String executablePath, List<String> localPackagePathList) { + private void runDynamicAnalyzer(String device, ProjectType projectType, + String binaryOfTarget, String executablePath, + List<String> localPackagePathList) { if (DAServerManager.getInstance().getClientSocket() == null) { StringBuffer command = new StringBuffer(); @@ -480,18 +243,13 @@ public class TizenNativeApplicationDADelegate extends } } - DAServerManager.getInstance().reserveTraceApplication(device, projectType, binaryOfTarget, executablePath, localPackagePathList); + DAServerManager.getInstance().reserveTraceApplication(device, + projectType, binaryOfTarget, executablePath, + localPackagePathList); } else { - DAServerManager.getInstance().runTraceApplication(device, projectType, binaryOfTarget, executablePath, localPackagePathList); - } - } - - private void rollBackBuildConfigSetting(IProject project) { - String prevBuildConfigName = TizenNativeApplicationDAShortcut - .getPrevBuildConfigName(); - if (prevBuildConfigName != null) { - ManagedBuildManager.getBuildInfo(project).setDefaultConfiguration( - prevBuildConfigName); + DAServerManager.getInstance().runTraceApplication(device, + projectType, binaryOfTarget, executablePath, + localPackagePathList); } } diff --git a/package/changelog b/package/changelog index e8217cc..a804ab5 100644 --- a/package/changelog +++ b/package/changelog @@ -1,3 +1,9 @@ +* 2.2.20 +Apply revision LaunchDelegator to package which has nativeplatform dependency. +== jungwook.ryu <jungwook.ryu@samsung.com> 2015-01-16 +* 2.2.19 +revision LaunchDelegator +== jungwook.ryu <jungwook.ryu@samsung.com> 2014-11-04 * 2.2.18 version up to fix build packaging error == jungwook.ryu <jungwook.ryu@samsung.com> 2014-10-30 diff --git a/package/pkginfo.manifest b/package/pkginfo.manifest index 7cda264..9d47432 100644 --- a/package/pkginfo.manifest +++ b/package/pkginfo.manifest @@ -1,4 +1,4 @@ -Version:2.2.18 +Version:2.2.20 Source:dynamic-analysis-ide-eplugin Maintainer:Jungwook Ryu <jungwook.ryu@samsung.com>, Juyoung Kim <j0.kim@samsung.com> |