ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
ILaunchConfigurationType configurationType =
launchManager.getLaunchConfigurationType(IJavaLaunchConfigurationConstants.ID_JAVA_APPLICATION);
String name = launchManager.generateUniqueLaunchConfigurationNameFrom(type.getElementName());
ILaunchConfigurationWorkingCopy workingLaunchConfiguration = configurationType.newInstance(null, name);
workingLaunchConfiguration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME,
PivotPlugin.MAIN_TYPE_NAME);
workingLaunchConfiguration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME,
applicationProjectName);
workingLaunchConfiguration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS,