From c6b32ddf7be25c4054428977693326a780d25c27 Mon Sep 17 00:00:00 2001 From: "donghyuk,yang" Date: Mon, 5 May 2014 00:12:35 +0900 Subject: [PATCH] LAUNCH: Added "Load shared library symbols automatically" option to launch wizard. "Load shared library symbols automatically" option is true as default before. It sometimes makes waiting for a long time. Now, user can select the option in launch wizard. Change-Id: Ib6a114cda97cdb22bdb1c5fc212b28e6d5abd92a Signed-off-by: donghyuk,yang --- .../build/PlatformExternalBuildRunner.java | 16 +++++++++------- .../launch/LaunchConfigurationProcessor.java | 11 +++++++---- .../wizard/pages/PlatformEFLLaunchSettingPage.java | 4 +++- .../wizard/pages/PlatformLaunchSettingPage.java | 20 +++++++++++++++++++- .../launch/wizards/PlatformCommonLaunchWizard.java | 5 +++++ .../launch/wizards/PlatformLaunchWizard.java | 1 + .../launch/wizards/PlatformLaunchWizardDialog.java | 7 +++++++ .../nativeplatform/rds/RemoteRpmRapidDeployer.java | 1 - 8 files changed, 51 insertions(+), 14 deletions(-) diff --git a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/build/PlatformExternalBuildRunner.java b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/build/PlatformExternalBuildRunner.java index 6113d4a..0e2b67f 100644 --- a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/build/PlatformExternalBuildRunner.java +++ b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/build/PlatformExternalBuildRunner.java @@ -40,6 +40,7 @@ import org.eclipse.cdt.core.CCorePlugin; import org.eclipse.cdt.core.ErrorParserManager; import org.eclipse.cdt.core.ICommandLauncher; import org.eclipse.cdt.core.IMarkerGenerator; +import org.eclipse.cdt.core.index.IIndexManager; import org.eclipse.cdt.core.model.CoreModel; import org.eclipse.cdt.core.model.ICModelMarker; import org.eclipse.cdt.core.resources.IConsole; @@ -105,7 +106,6 @@ import org.tizen.nativeplatform.remote.connection.WorkspaceResourceDelta; import org.tizen.nativeplatform.remote.connection.WorkspaceSyncronizer; import org.tizen.nativeplatform.rootstrap.RootstrapManager; import org.tizen.nativeplatform.util.IPackageUtil; -import org.tizen.nativeplatform.util.PackageUtil; import org.tizen.nativeplatform.util.PkgUtilFactory; import org.tizen.nativeplatform.util.PlatformProjectUtil; import org.tizen.nativeplatform.util.RootstrapUtil; @@ -400,12 +400,14 @@ public class PlatformExternalBuildRunner extends ExternalBuildRunner { if (processor.process(buildArguments)) { String[] rpmFiles = processor.getRpmFiles(); String[] xmlFiles = processor.getXmlFiles(); - buf = new StringBuffer(NEWLINE); - buf.append("**** RPM files ****").append(NEWLINE); - for (String file : rpmFiles) { - buf.append(" - ").append(file).append(NEWLINE); - } - if (xmlFiles.length >= 0) { + if (rpmFiles.length > 0) { + buf = new StringBuffer(NEWLINE); + buf.append("**** RPM files ****").append(NEWLINE); + for (String file : rpmFiles) { + buf.append(" - ").append(file).append(NEWLINE); + } + } + if (xmlFiles.length > 0) { buf.append(NEWLINE); buf.append("**** XML files ****").append(NEWLINE); for (String file : xmlFiles) { diff --git a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/LaunchConfigurationProcessor.java b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/LaunchConfigurationProcessor.java index 23e3698..22e380a 100644 --- a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/LaunchConfigurationProcessor.java +++ b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/LaunchConfigurationProcessor.java @@ -5,6 +5,7 @@ import java.util.List; import java.util.Map; import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants; +import org.eclipse.cdt.debug.mi.core.IMILaunchConfigurationConstants; import org.eclipse.cdt.debug.ui.CDebugUIPlugin; import org.eclipse.cdt.managedbuilder.core.IConfiguration; import org.eclipse.core.resources.IProject; @@ -219,9 +220,10 @@ public class LaunchConfigurationProcessor implements ILaunchConfigurationProcess if (Window.OK == dlg.open()) { String programPath = dlg.getProgramPath(); String arguments = dlg.getArguments(); + boolean loadSharedLib = dlg.loadSharedLibAutomatically(); applicationId = dlg.getSelectedApp(); Map environments = dlg.getEnvironments(); - setOptionAttributes(wc, programPath, arguments, applicationId, environments); + setOptionAttributes(wc, programPath, arguments, applicationId, environments, loadSharedLib); } } }); @@ -238,7 +240,7 @@ public class LaunchConfigurationProcessor implements ILaunchConfigurationProcess return false; } } - + /* protected void setOptionAttributes(ILaunchConfigurationWorkingCopy wc, String programPath, String arguments, String applicationId, List devicePackages, List rootstrapPackages, boolean reinstallOp, boolean selectPkgOp, @@ -246,9 +248,10 @@ public class LaunchConfigurationProcessor implements ILaunchConfigurationProcess setOptionAttributes(wc, programPath, arguments, applicationId, environments); setOptionAttributes(wc, devicePackages, rootstrapPackages, reinstallOp); } + */ protected void setOptionAttributes(ILaunchConfigurationWorkingCopy wc, String programPath, - String arguments, String applicationId, Map environments) { + String arguments, String applicationId, Map environments, boolean loadSharedLib) { if (programPath != null) { wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, programPath); } @@ -264,7 +267,7 @@ public class LaunchConfigurationProcessor implements ILaunchConfigurationProcess wc.setAttribute(ILaunchManager.ATTR_ENVIRONMENT_VARIABLES, environments); } wc.setAttribute(ILaunchManager.ATTR_APPEND_ENVIRONMENT_VARIABLES, false); - + wc.setAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB, loadSharedLib); try { wc.doSave(); } catch (CoreException e) { diff --git a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/wizard/pages/PlatformEFLLaunchSettingPage.java b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/wizard/pages/PlatformEFLLaunchSettingPage.java index 99d7f95..0fc2c38 100644 --- a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/wizard/pages/PlatformEFLLaunchSettingPage.java +++ b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/wizard/pages/PlatformEFLLaunchSettingPage.java @@ -94,7 +94,9 @@ public class PlatformEFLLaunchSettingPage extends PlatformLaunchSettingPage { createInfoComposite(composite); createAppComboComposite(composite); createRunCommandComposite(composite, false); - + if (isDebug) { + createDebugOptionComposite(composite); + } setControl(composite); validate(); } diff --git a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/wizard/pages/PlatformLaunchSettingPage.java b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/wizard/pages/PlatformLaunchSettingPage.java index 8628c5f..a9ce339 100644 --- a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/wizard/pages/PlatformLaunchSettingPage.java +++ b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/wizard/pages/PlatformLaunchSettingPage.java @@ -80,6 +80,7 @@ public class PlatformLaunchSettingPage extends PlatformLaunchCommonPage { protected boolean isDebug; protected String COMMAND_LABEL_TEXT = "Command:"; + protected Button autoLibButton; protected Text commandText; protected Text argumentsText; protected Color originColor; @@ -120,7 +121,10 @@ public class PlatformLaunchSettingPage extends PlatformLaunchCommonPage { gridLayout.marginHeight = 0; composite.setLayout(gridLayout); createInfoComposite(composite); - createRunCommandComposite(composite, true); + createRunCommandComposite(composite, true); + if (isDebug) { + createDebugOptionComposite(composite); + } setControl(composite); validate(); } @@ -217,6 +221,16 @@ public class PlatformLaunchSettingPage extends PlatformLaunchCommonPage { argumentsText.setText(argumentsInitText); } + protected void createDebugOptionComposite(Composite parent) { + Composite composite = new Composite(parent, SWT.NULL); + composite.setLayout(new GridLayout(1, false)); + composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); + + autoLibButton = new Button(composite, SWT.CHECK); + autoLibButton.setText("Load shared library symbols automatically"); + autoLibButton.setSelection(true); + } + protected void validate() { final String command = commandText.getText().trim(); String projName = platformProject.getName(); @@ -322,6 +336,10 @@ public class PlatformLaunchSettingPage extends PlatformLaunchCommonPage { return argumentsText.getText().trim(); } + public boolean loadSharedLibAutomatically() { + return autoLibButton.getSelection(); + } + public String getSelectedApp() { return null; } diff --git a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/wizards/PlatformCommonLaunchWizard.java b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/wizards/PlatformCommonLaunchWizard.java index 8ab585f..7e78cae 100644 --- a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/wizards/PlatformCommonLaunchWizard.java +++ b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/wizards/PlatformCommonLaunchWizard.java @@ -69,6 +69,7 @@ public class PlatformCommonLaunchWizard extends Wizard implements IPageChangingL protected boolean canFinish = false; protected String deviceLog = ""; protected String rootstrapLog = ""; + protected boolean loadSharedLib = true; public PlatformCommonLaunchWizard() { } @@ -144,6 +145,10 @@ public class PlatformCommonLaunchWizard extends Wizard implements IPageChangingL public Map getEnvironments() { return envs; } + + public boolean loadSharedLibAutomatically() { + return loadSharedLib; + } @Override public void addPages() { diff --git a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/wizards/PlatformLaunchWizard.java b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/wizards/PlatformLaunchWizard.java index 656e3b2..14738d7 100644 --- a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/wizards/PlatformLaunchWizard.java +++ b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/wizards/PlatformLaunchWizard.java @@ -71,6 +71,7 @@ public class PlatformLaunchWizard extends PlatformCommonLaunchWizard { programPath = binPage.getBinaryPath(); arguments = binPage.getArguments(); selectedApp = binPage.getSelectedApp(); + loadSharedLib = binPage.loadSharedLibAutomatically(); } return true; } diff --git a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/wizards/PlatformLaunchWizardDialog.java b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/wizards/PlatformLaunchWizardDialog.java index a606f08..3292610 100644 --- a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/wizards/PlatformLaunchWizardDialog.java +++ b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/wizards/PlatformLaunchWizardDialog.java @@ -129,4 +129,11 @@ public class PlatformLaunchWizardDialog extends WizardDialog { return null; } } + + public boolean loadSharedLibAutomatically() { + if (wizard != null) { + return wizard.loadSharedLibAutomatically(); + } + return true; + } } diff --git a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/rds/RemoteRpmRapidDeployer.java b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/rds/RemoteRpmRapidDeployer.java index 9360789..50b55db 100644 --- a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/rds/RemoteRpmRapidDeployer.java +++ b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/rds/RemoteRpmRapidDeployer.java @@ -85,7 +85,6 @@ public class RemoteRpmRapidDeployer { List addList = new ArrayList(); List remainList = new ArrayList(); List removeList = new ArrayList(); - System.out.print(true); String copyFileList = groupFiles(sourceChecksums, targetChecksums, copyList, addList, remainList, removeList); if (isDeviceCommander()) { -- 2.7.4