4
Eclipseプロジェクトにさまざまな起動設定ファイルがあります。任意の起動構成をプログラムでどのように実行することができますか?Eclipse:起動設定をプログラムで実行するにはどうすればよいですか?
Eclipseプロジェクトにさまざまな起動設定ファイルがあります。任意の起動構成をプログラムでどのように実行することができますか?Eclipse:起動設定をプログラムで実行するにはどうすればよいですか?
ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
ILaunchConfigurationType type = manager.getLaunchConfigurationType("org.eclipse.cdt.launch.applicationLaunchType");
ILaunchConfiguration[] lcs = manager.getLaunchConfigurations(type);
for (ILaunchConfiguration iLaunchConfiguration : lcs) {
if (iLaunchConfiguration.getName().equals("Test PThread")) {
ILaunchConfigurationWorkingCopy t = iLaunchConfiguration.getWorkingCopy();
ILaunchConfiguration config = t.doSave();
if (config != null) {
// config.launch(ILaunchManager.RUN_MODE, null);
DebugUITools.launch(config, ILaunchManager.DEBUG_MODE);
}
}
}