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

COVERAGE SUMMARY FOR SOURCE FILE [PCMStoExPrettyPrintVisitor.java]

nameclass, %method, %block, %line, %
PCMStoExPrettyPrintVisitor.java0%   (0/1)0%   (0/5)0%   (0/134)0%   (0/22)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class PCMStoExPrettyPrintVisitor0%   (0/1)0%   (0/5)0%   (0/134)0%   (0/22)
PCMStoExPrettyPrintVisitor (): void 0%   (0/1)0%   (0/3)0%   (0/1)
caseCharacterisedVariable (CharacterisedVariable): String 0%   (0/1)0%   (0/21)0%   (0/3)
caseVariableCharacterisation (VariableCharacterisation): String 0%   (0/1)0%   (0/15)0%   (0/3)
caseVariableUsage (VariableUsage): String 0%   (0/1)0%   (0/62)0%   (0/8)
doSwitch (EClass, EObject): String 0%   (0/1)0%   (0/33)0%   (0/7)

1package de.uka.ipd.sdq.pcm.stochasticexpressions;
2 
3import org.eclipse.emf.ecore.EClass;
4import org.eclipse.emf.ecore.EObject;
5 
6import de.uka.ipd.sdq.pcm.parameter.CharacterisedVariable;
7import de.uka.ipd.sdq.pcm.parameter.ParameterPackage;
8import de.uka.ipd.sdq.pcm.parameter.VariableCharacterisation;
9import de.uka.ipd.sdq.pcm.parameter.VariableUsage;
10import de.uka.ipd.sdq.stoex.analyser.visitors.StoExPrettyPrintVisitor;
11 
12public class PCMStoExPrettyPrintVisitor extends StoExPrettyPrintVisitor {
13 
14        protected String doSwitch(EClass theEClass, EObject theEObject) {
15                if (theEClass == ParameterPackage.eINSTANCE.getCharacterisedVariable()) {
16                        return caseCharacterisedVariable((CharacterisedVariable) theEObject);
17                } else if (theEClass == ParameterPackage.eINSTANCE.getVariableUsage()){
18                        return caseVariableUsage((VariableUsage) theEObject);
19                } else if (theEClass == ParameterPackage.eINSTANCE.getVariableCharacterisation()){
20                        return caseVariableCharacterisation((VariableCharacterisation) theEObject);
21                } else {
22                        return super.doSwitch(theEClass, theEObject);
23                }
24        }
25        
26        public String caseCharacterisedVariable(CharacterisedVariable object) {
27                String result = (String)doSwitch(object.getId_Variable());
28                result += "." + object.getCharacterisationType().getLiteral();
29                return result;
30        }
31        
32        public String caseVariableUsage(VariableUsage object) {
33                String result = "";
34                if (object.getNamedReference__VariableUsage() != null)
35                        result += doSwitch(object.getNamedReference__VariableUsage());
36                else
37                        result += "<not set yet>";
38                if (object.getVariableCharacterisation_VariableUsage().size() > 0)
39                        result += "." + doSwitch((VariableCharacterisation)object.getVariableCharacterisation_VariableUsage().get(0));
40                else
41                        result += ".<missing characterisation> = <missing expression>";
42                return result;
43        }
44        
45        public String caseVariableCharacterisation(VariableCharacterisation object) {
46                String result = "";
47                result += object.getType().getLiteral();
48                //result += " = " + object.getSpecification_VariableCharacterisation().getSpecification();
49                return result;
50        }
51}

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