LAUNCH: Added "Load shared library symbols automatically" option to
authordonghyuk,yang <donghyuk.yang@samsung.com>
Sun, 4 May 2014 15:12:35 +0000 (00:12 +0900)
committerdonghyuk,yang <donghyuk.yang@samsung.com>
Sun, 4 May 2014 15:12:35 +0000 (00:12 +0900)
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 <donghyuk.yang@samsung.com>
org.tizen.nativeplatform/src/org/tizen/nativeplatform/build/PlatformExternalBuildRunner.java
org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/LaunchConfigurationProcessor.java
org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/wizard/pages/PlatformEFLLaunchSettingPage.java
org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/wizard/pages/PlatformLaunchSettingPage.java
org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/wizards/PlatformCommonLaunchWizard.java
org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/wizards/PlatformLaunchWizard.java
org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/wizards/PlatformLaunchWizardDialog.java
org.tizen.nativeplatform/src/org/tizen/nativeplatform/rds/RemoteRpmRapidDeployer.java

index 6113d4a..0e2b67f 100644 (file)
@@ -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) {
index 23e3698..22e380a 100644 (file)
@@ -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<String, String> 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<IPackage> devicePackages,
             List<IPackage> 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<String, String> environments) {
+            String arguments, String applicationId, Map<String, String> 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) {
index 99d7f95..0fc2c38 100644 (file)
@@ -94,7 +94,9 @@ public class PlatformEFLLaunchSettingPage extends PlatformLaunchSettingPage {
         createInfoComposite(composite);
         createAppComboComposite(composite);
         createRunCommandComposite(composite, false);
-
+        if (isDebug) {
+               createDebugOptionComposite(composite);
+        }
         setControl(composite);
         validate();
     }
index 8628c5f..a9ce339 100644 (file)
@@ -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;
     }
index 8ab585f..7e78cae 100644 (file)
@@ -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<String, String> getEnvironments() {
         return envs;
     }
+    
+    public boolean loadSharedLibAutomatically() {
+       return loadSharedLib;
+    }
 
     @Override
     public void addPages() {
index 656e3b2..14738d7 100644 (file)
@@ -71,6 +71,7 @@ public class PlatformLaunchWizard extends PlatformCommonLaunchWizard {
             programPath = binPage.getBinaryPath();
             arguments = binPage.getArguments();
             selectedApp = binPage.getSelectedApp();
+            loadSharedLib = binPage.loadSharedLibAutomatically();
         }
         return true;
     }
index a606f08..3292610 100644 (file)
@@ -129,4 +129,11 @@ public class PlatformLaunchWizardDialog extends WizardDialog {
             return null;
         }
     }
+    
+    public boolean loadSharedLibAutomatically() {
+        if (wizard != null) {
+            return wizard.loadSharedLibAutomatically();
+        }
+        return true;
+    }
 }
index 9360789..50b55db 100644 (file)
@@ -85,7 +85,6 @@ public class RemoteRpmRapidDeployer {
         List<String> addList = new ArrayList<String>();
         List<String> remainList = new ArrayList<String>();
         List<String> removeList = new ArrayList<String>();
-        System.out.print(true);
         String copyFileList = groupFiles(sourceChecksums, targetChecksums, copyList, addList,
                 remainList, removeList);
         if (isDeviceCommander()) {