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

COVERAGE SUMMARY FOR SOURCE FILE [LQSimAnalysisTabGroup.java]

nameclass, %method, %block, %line, %
LQSimAnalysisTabGroup.java0%   (0/2)0%   (0/7)0%   (0/129)0%   (0/32)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class LQSimAnalysisTabGroup0%   (0/1)0%   (0/2)0%   (0/24)0%   (0/6)
LQSimAnalysisTabGroup (): void 0%   (0/1)0%   (0/3)0%   (0/1)
createTabs (ILaunchConfigurationDialog, String): void 0%   (0/1)0%   (0/21)0%   (0/5)
     
class LQSimAnalysisTabGroup$MainConfigTabExt0%   (0/1)0%   (0/5)0%   (0/105)0%   (0/26)
LQSimAnalysisTabGroup$MainConfigTabExt (LQSimAnalysisTabGroup): void 0%   (0/1)0%   (0/6)0%   (0/1)
LQSimAnalysisTabGroup$MainConfigTabExt (LQSimAnalysisTabGroup, LQSimAnalysisT... 0%   (0/1)0%   (0/4)0%   (0/1)
createControl (Composite): void 0%   (0/1)0%   (0/12)0%   (0/4)
initializeFrom (ILaunchConfiguration): void 0%   (0/1)0%   (0/71)0%   (0/15)
setDefaults (ILaunchConfigurationWorkingCopy): void 0%   (0/1)0%   (0/12)0%   (0/6)

1package de.uka.ipd.sdq.dsexplore.analysis.lqn.launch;
2 
3import org.eclipse.debug.core.ILaunchConfiguration;
4import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
5import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
6import org.eclipse.debug.ui.ILaunchConfigurationDialog;
7import org.eclipse.debug.ui.ILaunchConfigurationTab;
8import org.eclipse.swt.SWT;
9import org.eclipse.swt.widgets.Composite;
10import org.eclipse.swt.widgets.Event;
11 
12import de.uka.ipd.sdq.pcmsolver.runconfig.MainConfigTab;
13import de.uka.ipd.sdq.pcmsolver.runconfig.MessageStrings;
14import de.uka.ipd.sdq.workflow.pcm.runconfig.ConfigurationTab;
15 
16/**
17 * Provides a configuration tab group for the LQNSim analysis method.
18 * 
19 * @author pmerkle
20 *
21 */
22public class LQSimAnalysisTabGroup extends AbstractLaunchConfigurationTabGroup {
23 
24        public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
25                ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] {
26                        new MainConfigTabExt(),
27                        new ConfigurationTab()
28                };
29                setTabs(tabs);
30                
31        }
32        
33        /**
34         * This class extends the {@link MainConfigTab} in order to support
35         * disabling of the solver selection combo. 
36         * 
37         * @author pmerkle
38         * 
39         */
40        private class MainConfigTabExt extends MainConfigTab {
41 
42                @Override
43                public void createControl(Composite parent) {
44                        super.createControl(parent);
45                        
46                        comboSolver.setEnabled(false);
47                        comboLqsimOutput.setEnabled(false);
48                }
49 
50                @Override
51                public void initializeFrom(ILaunchConfiguration configuration) {
52                        super.initializeFrom(configuration);
53                        
54                        // set LQSim as default, if not done yet
55                        if (!comboSolver.getText().equals(MessageStrings.LQSIM_SOLVER)) {
56                                String[] solverItems = comboSolver.getItems();
57                                for (int i = 0; i < solverItems.length; i++) {
58                                        String str = solverItems[i];
59                                        if (str.equals(MessageStrings.LQSIM_SOLVER)) {
60                                                comboSolver.select(i);
61                                                comboSolver.notifyListeners(SWT.Selection, new Event());
62                                        }
63                                }
64                        }
65                        
66                        // set XML Output as default, if not done yet
67                        if (!comboLqsimOutput.getText().equals(MessageStrings.LQN_OUTPUT_XML)) {
68                                String[] outputItems = comboLqsimOutput.getItems();
69                                for (int i = 0; i < outputItems.length; i++) {
70                                        String str = outputItems[i];
71                                        if (str.equals(MessageStrings.LQN_OUTPUT_XML)) {
72                                                comboLqsimOutput.select(i);
73                                        }
74                                }
75                        }
76                }
77 
78                /**
79                 * {@inheritDoc}
80                 */
81                @Override
82                public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
83                        super.setDefaults(configuration);
84 
85                        configuration.setAttribute(MessageStrings.SOLVER,
86                                        MessageStrings.LQSIM_SOLVER);
87                        configuration.setAttribute(MessageStrings.LQSIM_OUTPUT,
88                                        MessageStrings.LQN_OUTPUT_XML);
89                }
90                
91        }
92 
93}

[all classes][de.uka.ipd.sdq.dsexplore.analysis.lqn.launch]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov