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);
}
}
}