[Title] Removed hard coding for debugger ("Tizen")
authordonghyuk.yang <donghyuk.yang@samsung.com>
Wed, 3 Jul 2013 06:17:52 +0000 (15:17 +0900)
committerdonghyuk.yang <donghyuk.yang@samsung.com>
Wed, 3 Jul 2013 06:17:52 +0000 (15:17 +0900)
org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/shortcut/PlatformProjectCommonLaunchShortcut.java

index 48bd215..2b34b82 100644 (file)
@@ -65,6 +65,7 @@ import org.eclipse.ui.dialogs.ElementListSelectionDialog;
 import org.tizen.common.connection.ConnectionPlugin;
 import org.tizen.common.util.DialogUtil;
 import org.tizen.nativecommon.build.SmartBuildInterface;
+import org.tizen.nativecommon.launch.TizenLaunchConfigurationConstants;
 import org.tizen.nativecommon.launch.TizenLaunchMessages;
 import org.tizen.nativeplatform.build.PlatformConfigurationManager;
 import org.tizen.nativeplatform.launch.PlatformLaunchMessages;
@@ -165,7 +166,8 @@ abstract public class PlatformProjectCommonLaunchShortcut extends CApplicationLa
             for (int i = 0; i < debugConfigs.length; i++) {
                 if (debugConfigs[i]
                         .supportsMode(ICDTLaunchConfigurationConstants.DEBUGGER_MODE_RUN)) {
-                    if (debugConfigs[i].getName().contains("Tizen")) {
+                    if (debugConfigs[i].getID().equals(
+                            TizenLaunchConfigurationConstants.DEBUGGER_ID)) {
                         debugList.add(debugConfigs[i]);
                     }
                 }
@@ -182,7 +184,8 @@ abstract public class PlatformProjectCommonLaunchShortcut extends CApplicationLa
         return configuration;
     }
 
-    protected ICDebugConfiguration chooseDebugConfig(ICDebugConfiguration[] debugConfigs, String mode) {
+    protected ICDebugConfiguration chooseDebugConfig(ICDebugConfiguration[] debugConfigs,
+            String mode) {
         ILabelProvider provider = new LabelProvider() {
             public String getText(Object element) {
                 if (element == null) {
@@ -218,7 +221,8 @@ abstract public class PlatformProjectCommonLaunchShortcut extends CApplicationLa
     abstract protected ILaunchConfiguration createConfiguration(IProject project,
             ICDebugConfiguration debugConfig, String mode);
 
-    protected void setSourceContainer(IProject project, ILaunchConfigurationWorkingCopy configuration) {
+    protected void setSourceContainer(IProject project,
+            ILaunchConfigurationWorkingCopy configuration) {
         PlatformRootstrap rootstrap = target.getRootstrap();
 
         String basePath = rootstrap.getPath().toOSString();