/** * Creates a shared launch configuration for launching Ant in a separate VM with the given name. * * @since 3.5 */ public static void createLaunchConfigurationForSeparateVM( String launchConfigName, String buildFileName) throws Exception { String bf = buildFileName; ILaunchConfigurationType type = AbstractAntUITest.getLaunchManager() .getLaunchConfigurationType(IAntLaunchConstants.ID_ANT_LAUNCH_CONFIGURATION_TYPE); ILaunchConfigurationWorkingCopy config = type.newInstance( AbstractAntUITest.getJavaProject().getProject().getFolder("launchConfigurations"), launchConfigName); //$NON-NLS-1$ config.setAttribute( IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, "org.eclipse.ant.internal.launching.remote.InternalAntRunner"); //$NON-NLS-1$ config.setAttribute( IJavaLaunchConfigurationConstants.ATTR_CLASSPATH_PROVIDER, "org.eclipse.ant.ui.AntClasspathProvider"); //$NON-NLS-1$ config.setAttribute( IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, AbstractAntUITest.getJavaProject().getElementName()); if (bf == null) { bf = launchConfigName; } config.setAttribute( IExternalToolConstants.ATTR_LOCATION, "${workspace_loc:/" + PROJECT_NAME + "/buildfiles/" + bf + ".xml}"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ config.setAttribute(IDebugUIConstants.ATTR_LAUNCH_IN_BACKGROUND, true); config.setAttribute( DebugPlugin.ATTR_PROCESS_FACTORY_ID, IAntUIConstants.REMOTE_ANT_PROCESS_FACTORY_ID); ProjectHelper.setVM(config); config.doSave(); }
/** * Creates a shared launch configuration for launching Ant in a separate VM with the given name. */ public static void createLaunchConfiguration(String launchConfigName) throws Exception { ProjectHelper.createLaunchConfiguration( launchConfigName, PROJECT_NAME + "/buildfiles/" + launchConfigName + ".xml"); // $NON-NLS-1$ //$NON-NLS-2$ }
/** * Creates two launch configurations one standard one and one for a separate VM * * @param launchConfigName * @throws Exception * @since 3.5 */ public static void createLaunchConfigurationForBoth(String launchConfigName) throws Exception { ProjectHelper.createLaunchConfiguration(launchConfigName); ProjectHelper.createLaunchConfigurationForSeparateVM( launchConfigName + "SepVM", launchConfigName); // $NON-NLS-1$ }