diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/importexecutable/ImportExecutablePageTwo.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/importexecutable/ImportExecutablePageTwo.java index 8afa84a21ab..3da326e0096 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/importexecutable/ImportExecutablePageTwo.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/importexecutable/ImportExecutablePageTwo.java @@ -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() { diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/importexecutable/ImportExecutableWizard.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/importexecutable/ImportExecutableWizard.java index c517fb22fc1..d1c440afd7b 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/importexecutable/ImportExecutableWizard.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/importexecutable/ImportExecutableWizard.java @@ -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; } }