From 72d87e8b692a9132afca28008e6856406c7be113 Mon Sep 17 00:00:00 2001 From: Sergey Prigogin Date: Mon, 3 Mar 2008 01:09:32 +0000 Subject: Do not validate platform and CPU compatibility of debug configurations to avoid accidentally disabling a valid one. It's much better to let an incompatible configuration through than to disable a valid one. --- .../src/org/eclipse/cdt/launch/ui/CDebuggerTab.java | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) (limited to 'launch') diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CDebuggerTab.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CDebuggerTab.java index 6998514c5f3..1b52ada19db 100644 --- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CDebuggerTab.java +++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CDebuggerTab.java @@ -13,6 +13,7 @@ package org.eclipse.cdt.launch.ui; import java.io.IOException; +import java.text.Collator; import java.text.MessageFormat; import java.util.ArrayList; import java.util.Arrays; @@ -181,12 +182,9 @@ public class CDebuggerTab extends AbstractCDebuggerTab { ICDebugConfiguration[] debugConfigs; String configPlatform = getPlatform(config); debugConfigs = CDebugCorePlugin.getDefault().getActiveDebugConfigurations(); - Arrays.sort(debugConfigs, new Comparator() { - - public int compare(Object o1, Object o2) { - ICDebugConfiguration ic1 = (ICDebugConfiguration)o1; - ICDebugConfiguration ic2 = (ICDebugConfiguration)o2; - return ic1.getName().compareTo(ic2.getName()); + Arrays.sort(debugConfigs, new Comparator() { + public int compare(ICDebugConfiguration c1, ICDebugConfiguration c2) { + return Collator.getInstance().compare(c1.getName(), c2.getName()); } }); List list = new ArrayList(); @@ -399,14 +397,9 @@ public class CDebuggerTab extends AbstractCDebuggerTab { setErrorMessage(LaunchMessages.getString("CDebuggerTab.No_debugger_available")); //$NON-NLS-1$ return false; } - if (!validatePlatform(config, debugConfig)) { - setErrorMessage(LaunchMessages.getString("CDebuggerTab.Platform_is_not_supported")); //$NON-NLS-1$ - return false; - } - if (!validateCPU(config, debugConfig)) { - setErrorMessage(LaunchMessages.getString("CDebuggerTab.CPU_is_not_supported")); //$NON-NLS-1$ - return false; - } + // We do not validate platform and CPU compatibility to avoid accidentally disabling + // a valid configuration. It's much better to let an incompatible configuration through + // than to disable a valid one. return true; } -- cgit v1.2.3