* If such a configuration does not exist it creates a new one.
* @return an XVR launch configuration.
* @throws CoreException If it is not possible to get a {@link ILaunchConfiguration} for the project.
*/
public static ILaunchConfiguration getXVRLaunchConfiguration(IProject prj) throws CoreException{
ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
ILaunchConfigurationType type = manager.getLaunchConfigurationType(ApplicationLaunchConfigurationDelegate.XVR_LAUNCH_CONFIGURATION_ID);
String name = prj.getName() + ".launch";
IFile container = prj.getFile(name);
if(container.exists())
return manager.getLaunchConfiguration(container);
ILaunchConfigurationWorkingCopy config;
//try {
config = type.newInstance(prj, name);
config.setAttribute(XVRConstants.XVR_LAUNCH_CONFIG_PROJECT_NAME_KEY, prj.getName());