|
|
Re: Creating Run/Debug configuration [message #1758606 is a reply to message #1758109] |
Thu, 30 March 2017 10:18  |
Eclipse User |
|
|
|
Hello,
This is an example how I import External Tools Configurations with Oomph, in my opinion we can use the same approach to import Run / Debug configurations:
<?xml version="1.0" encoding="UTF-8"?>
<setup:Project
xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
name="launch.cfg.settings"
label="Launch configurations">
<setupTask
xsi:type="setup:ResourceCreationTask"
filter=""
content="<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.ui.externaltools.ProgramLaunchConfigurationType">
	<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
		<listEntry value="org.eclipse.ui.externaltools.launchGroup"/>
	</listAttribute>
	<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LAUNCH_CONFIGURATION_BUILD_SCOPE" value="$${none}"/>
	<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="$${env_var:windir}\explorer.exe"/>
	<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="$${workspace_loc}"/>
</launchConfiguration>"
targetURL="file:/${workspace.location}\.metadata\.plugins\org.eclipse.debug.core\.launches\Open workspace directory.launch"
encoding="UTF-8">
<description></description>
</setupTask>
<setupTask
xsi:type="setup:ResourceCreationTask"
content="<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.ui.externaltools.ProgramLaunchConfigurationType">
	<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
		<listEntry value="org.eclipse.ui.externaltools.launchGroup"/>
	</listAttribute>
	<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LAUNCH_CONFIGURATION_BUILD_SCOPE" value="$${none}"/>
	<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="$${eclipse_home}\eclipse.exe"/>
	<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="$${workspace_loc}/.metadata/.log"/>
</launchConfiguration>"
targetURL="file:/${workspace.location}\.metadata\.plugins\org.eclipse.debug.core\.launches\Open workspace .log file.launch"
encoding="UTF-8"/>
<stream name="master" label="Master"/>
<logicalProjectContainer xsi:type="setup:ProjectCatalog" href="index:/org.eclipse.setup#//@projectCatalogs[name='org.eclipse']"/>
<description>Import External Tools Launch configurations.</description>
</setup:Project>
what you need to do is to enter the XML content of .launch file in content field of the Resource Creation task:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.ui.externaltools.ProgramLaunchConfigurationType">
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
<listEntry value="org.eclipse.ui.externaltools.launchGroup"/>
</listAttribute>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LAUNCH_CONFIGURATION_BUILD_SCOPE" value="$${none}"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="$${eclipse_home}\eclipse.exe"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="$${workspace_loc}/.metadata/.log"/>
</launchConfiguration>
But also please take into consideration the approach mentioned by Ed Merks.
Regards,
Velizar
|
|
|
Powered by
FUDForum. Page generated in 0.03419 seconds