1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-24 09:25:31 +02:00

[268314] - remove limitation on type id of launch config

This commit is contained in:
Alena Laskavaia 2009-03-12 17:53:36 +00:00
parent b00cc975fd
commit 9c0729da4a
2 changed files with 14 additions and 11 deletions

View file

@ -85,17 +85,23 @@ public class ImportExecutablePageTwo extends WizardPage {
private void addLaunchConfigTypes() {
ILaunchConfigurationType[] configTypeList = DebugPlugin.getDefault()
.getLaunchManager().getLaunchConfigurationTypes();
int j = 0, capp = 0;
for (int i = 0; i < configTypeList.length; i++) {
String configTypeName = configTypeList[i].getName();
if (configTypeList[i].isPublic()
&& configTypeList[i]
.supportsMode(ILaunchManager.DEBUG_MODE)) {
if (wizard.supportsConfigurationType(configTypeList[i])) {
ILaunchConfigurationType type = configTypeList[i];
String configTypeName = type.getName();
if (type.isPublic()
&& type.supportsMode(ILaunchManager.DEBUG_MODE)) {
if (wizard.supportsConfigurationType(type)) {
configTypes.add(configTypeName);
if (type.getIdentifier().equals("org.eclipse.cdt.launch.applicationLaunchType")) {
capp = j;
}
j++;
}
}
}
configTypes.select(0);
configTypes.select(capp);
}
public void checkExecutableSettings() {

View file

@ -36,15 +36,12 @@ public class ImportExecutableWizard extends AbstractImportExecutableWizard {
public void setupFileDialog(FileDialog dialog) {
dialog.setText(Messages.ImportExecutableWizard_fileDialogTitle);
dialog.setFilterExtensions(new String[] { "*.*", "*.exe", "*.dll" });
dialog.setFilterExtensions(new String[] { "*", "*.exe", "*.dll" });
dialog.setFilterNames(new String[] { Messages.ImportExecutableWizard_AllFiles, Messages.ImportExecutableWizard_Applications, Messages.ImportExecutableWizard_LIbaries });
}
public boolean supportsConfigurationType(ILaunchConfigurationType type) {
return type.getIdentifier().startsWith("org.eclipse.cdt.launch")
// Just for fun, lets support QNX launches too.
// Really points at something missing, no?
|| type.getIdentifier().startsWith("com.qnx");
return true;
}
}