mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-15 04:05:38 +02:00
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.
This commit is contained in:
parent
972787c6a9
commit
72d87e8b69
1 changed files with 7 additions and 14 deletions
|
@ -13,6 +13,7 @@
|
||||||
package org.eclipse.cdt.launch.ui;
|
package org.eclipse.cdt.launch.ui;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.text.Collator;
|
||||||
import java.text.MessageFormat;
|
import java.text.MessageFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
@ -181,12 +182,9 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
|
||||||
ICDebugConfiguration[] debugConfigs;
|
ICDebugConfiguration[] debugConfigs;
|
||||||
String configPlatform = getPlatform(config);
|
String configPlatform = getPlatform(config);
|
||||||
debugConfigs = CDebugCorePlugin.getDefault().getActiveDebugConfigurations();
|
debugConfigs = CDebugCorePlugin.getDefault().getActiveDebugConfigurations();
|
||||||
Arrays.sort(debugConfigs, new Comparator() {
|
Arrays.sort(debugConfigs, new Comparator<ICDebugConfiguration>() {
|
||||||
|
public int compare(ICDebugConfiguration c1, ICDebugConfiguration c2) {
|
||||||
public int compare(Object o1, Object o2) {
|
return Collator.getInstance().compare(c1.getName(), c2.getName());
|
||||||
ICDebugConfiguration ic1 = (ICDebugConfiguration)o1;
|
|
||||||
ICDebugConfiguration ic2 = (ICDebugConfiguration)o2;
|
|
||||||
return ic1.getName().compareTo(ic2.getName());
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
List list = new ArrayList();
|
List list = new ArrayList();
|
||||||
|
@ -399,14 +397,9 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
|
||||||
setErrorMessage(LaunchMessages.getString("CDebuggerTab.No_debugger_available")); //$NON-NLS-1$
|
setErrorMessage(LaunchMessages.getString("CDebuggerTab.No_debugger_available")); //$NON-NLS-1$
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!validatePlatform(config, debugConfig)) {
|
// We do not validate platform and CPU compatibility to avoid accidentally disabling
|
||||||
setErrorMessage(LaunchMessages.getString("CDebuggerTab.Platform_is_not_supported")); //$NON-NLS-1$
|
// a valid configuration. It's much better to let an incompatible configuration through
|
||||||
return false;
|
// than to disable a valid one.
|
||||||
}
|
|
||||||
if (!validateCPU(config, debugConfig)) {
|
|
||||||
setErrorMessage(LaunchMessages.getString("CDebuggerTab.CPU_is_not_supported")); //$NON-NLS-1$
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue