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 [CodeGenerationConfigurationTab.java]

nameclass, %method, %block, %line, %
CodeGenerationConfigurationTab.java0%   (0/2)0%   (0/8)0%   (0/115)0%   (0/30)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class CodeGenerationConfigurationTab0%   (0/1)0%   (0/6)0%   (0/101)0%   (0/27)
CodeGenerationConfigurationTab (): void 0%   (0/1)0%   (0/3)0%   (0/1)
access$0 (CodeGenerationConfigurationTab, boolean): void 0%   (0/1)0%   (0/4)0%   (0/1)
access$1 (CodeGenerationConfigurationTab): void 0%   (0/1)0%   (0/3)0%   (0/1)
createControl (Composite): void 0%   (0/1)0%   (0/42)0%   (0/10)
initializeFrom (ILaunchConfiguration): void 0%   (0/1)0%   (0/39)0%   (0/11)
performApply (ILaunchConfigurationWorkingCopy): void 0%   (0/1)0%   (0/10)0%   (0/4)
     
class CodeGenerationConfigurationTab$10%   (0/1)0%   (0/2)0%   (0/14)0%   (0/5)
CodeGenerationConfigurationTab$1 (CodeGenerationConfigurationTab): void 0%   (0/1)0%   (0/6)0%   (0/2)
modifyText (ModifyEvent): void 0%   (0/1)0%   (0/8)0%   (0/3)

1package de.uka.ipd.sdq.codegen.ejb;
2 
3 
4import org.eclipse.core.runtime.CoreException;
5import org.eclipse.debug.core.ILaunchConfiguration;
6import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
7import org.eclipse.swt.SWT;
8import org.eclipse.swt.events.ModifyEvent;
9import org.eclipse.swt.events.ModifyListener;
10import org.eclipse.swt.widgets.Combo;
11import org.eclipse.swt.widgets.Composite;
12 
13import de.uka.ipd.sdq.codegen.simucontroller.runconfig.SimuConfigurationTab;
14import de.uka.ipd.sdq.workflow.pcm.ConstantsContainer;
15 
16 
17public class CodeGenerationConfigurationTab extends SimuConfigurationTab {
18        
19        protected Combo comboModelToTextTarget;
20 
21        @Override
22        public void createControl(Composite parent) {
23                super.createControl(parent);
24                
25                final ModifyListener modifyListener = new ModifyListener() {
26 
27                        public void modifyText(ModifyEvent e) {
28                                CodeGenerationConfigurationTab.this.setDirty(true);
29                                CodeGenerationConfigurationTab.this.updateLaunchConfigurationDialog();
30                        }
31                };
32                
33                Composite container = (Composite) getControl();
34                
35                comboModelToTextTarget = new Combo (container, SWT.READ_ONLY);
36                comboModelToTextTarget.setItems (new String [] {
37                                ConstantsContainer.MODEL_TO_TEXT_TARGET_EJB,
38                                ConstantsContainer.MODEL_TO_TEXT_TARGET_PROTO
39                                });
40                comboModelToTextTarget.setSize (400, 200);
41                comboModelToTextTarget.addModifyListener(modifyListener);
42                
43                
44        }
45 
46        @Override
47        public void initializeFrom(ILaunchConfiguration configuration) {
48                super.initializeFrom(configuration);
49                
50                try{
51                        String solverStr = configuration.getAttribute(ConstantsContainer.MODEL_TO_TEXT_CHOICE, 
52                                        ConstantsContainer.MODEL_TO_TEXT_TARGET_EJB);
53                        String[] items = comboModelToTextTarget.getItems();
54                        for (int i=0; i<items.length; i++){
55                                String str = items[i];
56                                if (str.equals(solverStr)){
57                                        comboModelToTextTarget.select(i);
58                                }
59                        }
60                } catch(CoreException e){
61                        comboModelToTextTarget.select(0);
62                }
63                
64                
65        }
66 
67        @Override
68        public void performApply(ILaunchConfigurationWorkingCopy configuration) {
69                super.performApply(configuration);
70                
71                configuration.setAttribute(ConstantsContainer.MODEL_TO_TEXT_CHOICE,
72                                comboModelToTextTarget.getText());
73                
74        }
75 
76        
77        
78}

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