mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-04 06:45:43 +02:00
[268314] - remove limitation on type id of launch config
This commit is contained in:
parent
b00cc975fd
commit
9c0729da4a
2 changed files with 14 additions and 11 deletions
|
@ -85,17 +85,23 @@ public class ImportExecutablePageTwo extends WizardPage {
|
||||||
private void addLaunchConfigTypes() {
|
private void addLaunchConfigTypes() {
|
||||||
ILaunchConfigurationType[] configTypeList = DebugPlugin.getDefault()
|
ILaunchConfigurationType[] configTypeList = DebugPlugin.getDefault()
|
||||||
.getLaunchManager().getLaunchConfigurationTypes();
|
.getLaunchManager().getLaunchConfigurationTypes();
|
||||||
|
int j = 0, capp = 0;
|
||||||
for (int i = 0; i < configTypeList.length; i++) {
|
for (int i = 0; i < configTypeList.length; i++) {
|
||||||
String configTypeName = configTypeList[i].getName();
|
ILaunchConfigurationType type = configTypeList[i];
|
||||||
if (configTypeList[i].isPublic()
|
String configTypeName = type.getName();
|
||||||
&& configTypeList[i]
|
if (type.isPublic()
|
||||||
.supportsMode(ILaunchManager.DEBUG_MODE)) {
|
&& type.supportsMode(ILaunchManager.DEBUG_MODE)) {
|
||||||
if (wizard.supportsConfigurationType(configTypeList[i])) {
|
if (wizard.supportsConfigurationType(type)) {
|
||||||
configTypes.add(configTypeName);
|
configTypes.add(configTypeName);
|
||||||
|
|
||||||
|
if (type.getIdentifier().equals("org.eclipse.cdt.launch.applicationLaunchType")) {
|
||||||
|
capp = j;
|
||||||
|
}
|
||||||
|
j++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
configTypes.select(0);
|
configTypes.select(capp);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void checkExecutableSettings() {
|
public void checkExecutableSettings() {
|
||||||
|
|
|
@ -36,15 +36,12 @@ public class ImportExecutableWizard extends AbstractImportExecutableWizard {
|
||||||
|
|
||||||
public void setupFileDialog(FileDialog dialog) {
|
public void setupFileDialog(FileDialog dialog) {
|
||||||
dialog.setText(Messages.ImportExecutableWizard_fileDialogTitle);
|
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 });
|
dialog.setFilterNames(new String[] { Messages.ImportExecutableWizard_AllFiles, Messages.ImportExecutableWizard_Applications, Messages.ImportExecutableWizard_LIbaries });
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean supportsConfigurationType(ILaunchConfigurationType type) {
|
public boolean supportsConfigurationType(ILaunchConfigurationType type) {
|
||||||
return type.getIdentifier().startsWith("org.eclipse.cdt.launch")
|
return true;
|
||||||
// Just for fun, lets support QNX launches too.
|
|
||||||
// Really points at something missing, no?
|
|
||||||
|| type.getIdentifier().startsWith("com.qnx");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue