EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][de.uka.ipd.sdq.codegen.simucontroller.runconfig]

COVERAGE SUMMARY FOR SOURCE FILE [SimulationWorkflowLauncher.java]

nameclass, %method, %block, %line, %
SimulationWorkflowLauncher.java0%   (0/1)0%   (0/2)0%   (0/56)0%   (0/16)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class SimulationWorkflowLauncher0%   (0/1)0%   (0/2)0%   (0/56)0%   (0/16)
SimulationWorkflowLauncher (): void 0%   (0/1)0%   (0/3)0%   (0/1)
launch (ILaunchConfiguration, String, ILaunch, IProgressMonitor): void 0%   (0/1)0%   (0/53)0%   (0/15)

1package de.uka.ipd.sdq.codegen.simucontroller.runconfig;
2 
3import org.eclipse.core.runtime.CoreException;
4import org.eclipse.core.runtime.IConfigurationElement;
5import org.eclipse.core.runtime.IProgressMonitor;
6import org.eclipse.core.runtime.Platform;
7import org.eclipse.debug.core.ILaunch;
8import org.eclipse.debug.core.ILaunchConfiguration;
9import org.eclipse.debug.core.model.ILaunchConfigurationDelegate;
10 
11import de.uka.ipd.sdq.simulation.AbstractSimulationConfig;
12import de.uka.ipd.sdq.workflow.pcm.configurations.AbstractPCMLaunchConfigurationDelegate;
13 
14public class SimulationWorkflowLauncher implements ILaunchConfigurationDelegate {
15 
16    @Override
17    public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor)
18            throws CoreException {
19        // find simulator extension by its ID as specified in the launch configuration
20        String simulatorId = configuration.getAttribute(AbstractSimulationConfig.SIMULATOR_ID,
21                AbstractSimulationConfig.DEFAULT_SIMULATOR_ID);
22        IConfigurationElement[] simulatorExtensions = Platform.getExtensionRegistry().getConfigurationElementsFor(
23                SimulatorExtensionHelper.EXTENSION_POINT_ID);
24        IConfigurationElement selectedExtension = null;
25        for (IConfigurationElement extension : simulatorExtensions) {
26            if (extension.getAttribute("id").equals(simulatorId)) {
27                selectedExtension = extension;
28            }
29        }
30 
31        // create launch configuration delegate for the selected simulator
32        AbstractPCMLaunchConfigurationDelegate<?> delegate = null;
33        try {
34            delegate = (AbstractPCMLaunchConfigurationDelegate<?>) selectedExtension
35                    .createExecutableExtension("launchDelegate");
36        } catch (CoreException e) {
37            // TODO throw more detailed exception
38            throw e;
39        }
40 
41        // delegate simulator launch
42        delegate.launch(configuration, mode, launch, monitor);
43    }
44 
45}

[all classes][de.uka.ipd.sdq.codegen.simucontroller.runconfig]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov