* may be thrown by implementations
*/
private void addCoverageAgent(ILaunchConfigurationWorkingCopy workingcopy,
ICoverageLaunch launch) throws CoreException {
final AgentOptions options = new AgentOptions();
final ICorePreferences preferences = EclEmmaCorePlugin.getInstance()
.getPreferences();
options.setIncludes(preferences.getAgentIncludes());
options.setExcludes(preferences.getAgentExcludes());
options.setExclClassloader(preferences.getAgentExclClassloader());
options.setDestfile(launch.getExecutionDataFile().toOSString());
try {
final URL agentfileurl = FileLocator.toFileURL(AgentJar.getResource());
final File agentfile = new Path(agentfileurl.getPath()).toFile();
addVMArgument(workingcopy, options.getVMArgument(agentfile));