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

COVERAGE SUMMARY FOR SOURCE FILE [EJBCodegenWorkflowLauncher.java]

nameclass, %method, %block, %line, %
EJBCodegenWorkflowLauncher.java0%   (0/1)0%   (0/4)0%   (0/101)0%   (0/18)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class EJBCodegenWorkflowLauncher0%   (0/1)0%   (0/4)0%   (0/101)0%   (0/18)
EJBCodegenWorkflowLauncher (): void 0%   (0/1)0%   (0/3)0%   (0/1)
createWorkflowJob (EjbCodeGenerationConfiguration, ILaunch): IJob 0%   (0/1)0%   (0/16)0%   (0/4)
deriveConfiguration (ILaunchConfiguration, String): EjbCodeGenerationConfigur... 0%   (0/1)0%   (0/24)0%   (0/7)
setupLogging (Level): ArrayList 0%   (0/1)0%   (0/58)0%   (0/6)

1package de.uka.ipd.sdq.codegen.ejb;
2 
3import java.util.ArrayList;
4 
5import org.apache.log4j.Level;
6import org.eclipse.core.runtime.CoreException;
7import org.eclipse.debug.core.ILaunch;
8import org.eclipse.debug.core.ILaunchConfiguration;
9 
10import de.uka.ipd.sdq.codegen.simucontroller.debug.IDebugListener;
11import de.uka.ipd.sdq.codegen.simucontroller.debug.SimulationDebugListener;
12import de.uka.ipd.sdq.workflow.IJob;
13import de.uka.ipd.sdq.workflow.launchconfig.AbstractWorkflowConfigurationBuilder;
14import de.uka.ipd.sdq.workflow.launchconfig.LoggerAppenderStruct;
15import de.uka.ipd.sdq.workflow.pcm.configurations.AbstractPCMLaunchConfigurationDelegate;
16import de.uka.ipd.sdq.workflow.pcm.configurations.PCMWorkflowConfigurationBuilder;
17 
18/**
19 * The class adapts defined functionality in the AbstractMDSDLaunchConfigurationDelegate for
20 * SimuCom Framework.
21 * 
22 */
23public class EJBCodegenWorkflowLauncher extends
24                AbstractPCMLaunchConfigurationDelegate<EjbCodeGenerationConfiguration> {
25 
26        /*
27         * (non-Javadoc)
28         * 
29         * @seede.uka.ipd.sdq.codegen.runconfig.LaunchConfigurationDelegate#
30         * creataAttributesGetMethods(org.eclipse.debug.core.ILaunchConfiguration)
31         */
32        @Override
33        protected EjbCodeGenerationConfiguration deriveConfiguration(
34                        ILaunchConfiguration configuration, String mode)
35                        throws CoreException {
36                EjbCodeGenerationConfiguration config = new EjbCodeGenerationConfiguration();
37                
38                AbstractWorkflowConfigurationBuilder builder;
39                builder = new PCMWorkflowConfigurationBuilder(configuration, mode);
40                builder.fillConfiguration(config);
41                
42                builder = new EjbCodeGenerationLaunchConfigurationBasedConfigBuilder(
43                                configuration, mode);
44                builder.fillConfiguration(config);
45                
46                return config;
47        }
48 
49        /* (non-Javadoc)
50         * @see de.uka.ipd.sdq.codegen.simucontroller.runconfig.AbstractMDSDLaunchConfigurationDelegate#setupLogging(org.apache.log4j.Level)
51         */
52        @Override
53        protected ArrayList<LoggerAppenderStruct> setupLogging(Level logLevel) throws CoreException {
54                ArrayList<LoggerAppenderStruct> loggerList = super.setupLogging(logLevel);
55                loggerList.add(setupLogger("de.uka.ipd.sdq.codegen", logLevel, Level.DEBUG == logLevel ? DETAILED_LOG_PATTERN : SHORT_LOG_PATTERN));
56                loggerList.add(setupLogger("de.uka.ipd.sdq.simucomframework", logLevel, Level.DEBUG == logLevel ? DETAILED_LOG_PATTERN : SHORT_LOG_PATTERN));
57                loggerList.add(setupLogger("de.uka.ipd.sdq.workflow.mdsd.emf.qvtr", logLevel, Level.DEBUG == logLevel ? DETAILED_LOG_PATTERN : SHORT_LOG_PATTERN));
58                loggerList.add(setupLogger("de.uka.ipd.sdq.statistics", logLevel, Level.DEBUG == logLevel ? DETAILED_LOG_PATTERN : SHORT_LOG_PATTERN));
59                
60                return loggerList;
61        }
62 
63        /*
64         * (non-Javadoc)
65         * 
66         * @seede.uka.ipd.sdq.codegen.runconfig.LaunchConfigurationDelegate#
67         * createRunCompositeJob
68         * (de.uka.ipd.sdq.codegen.runconfig.AttributesGetMethods)
69         */
70        @Override
71        protected IJob createWorkflowJob(EjbCodeGenerationConfiguration config,
72                        final ILaunch launch) throws CoreException {
73                IDebugListener listener = null;
74                
75                if (config.isDebug()) {
76                        listener = new SimulationDebugListener(launch);
77                        /*listener = new IDebugListener() {
78 
79                                private SimulationDebugTarget target = null;
80 
81                                public void simulationStartsInDock(DockModel dock) {
82                                        target   = new SimulationDebugTarget(launch,dock);
83                                        launch.addDebugTarget(target);
84                                }
85 
86                                public void simulationStoppedInDock() {
87                                        if (target != null) {
88                                                // Wait for termination, needed as termination is reported via async events by the dock
89                                                while (!target.isTerminated()) {
90                                                        try {
91                                                                Thread.sleep(100);
92                                                        } catch (InterruptedException e) {
93                                                        }
94                                                }
95                                                launch.removeDebugTarget(target);
96                                                target.dispose();
97                                        }
98                                }
99 
100                        };*/
101                }
102                return new EJBCodeGenerationJob(config,listener);
103        }        
104}

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