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

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

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class LQNAnalysisTabGroup0%   (0/1)0%   (0/2)0%   (0/24)0%   (0/6)
LQNAnalysisTabGroup (): void 0%   (0/1)0%   (0/3)0%   (0/1)
createTabs (ILaunchConfigurationDialog, String): void 0%   (0/1)0%   (0/21)0%   (0/5)
     
class LQNAnalysisTabGroup$MainConfigTabExt0%   (0/1)0%   (0/5)0%   (0/105)0%   (0/26)
LQNAnalysisTabGroup$MainConfigTabExt (LQNAnalysisTabGroup): void 0%   (0/1)0%   (0/6)0%   (0/1)
LQNAnalysisTabGroup$MainConfigTabExt (LQNAnalysisTabGroup, LQNAnalysisTabGrou... 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 LQN Solver analysis method.
18 * 
19 * @author pmerkle
20 *
21 */
22public class LQNAnalysisTabGroup 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                        comboLqnsOutput.setEnabled(false);
48                }
49 
50                @Override
51                public void initializeFrom(ILaunchConfiguration configuration) {
52                        super.initializeFrom(configuration);
53                        
54                        // set LQN Solver as default, if not done yet
55                        if (!comboSolver.getText().equals(MessageStrings.LQNS_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.LQNS_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 (!comboLqnsOutput.getText().equals(MessageStrings.LQN_OUTPUT_XML)) {
68                                String[] outputItems = comboLqnsOutput.getItems();
69                                for (int i = 0; i < outputItems.length; i++) {
70                                        String str = outputItems[i];
71                                        if (str.equals(MessageStrings.LQN_OUTPUT_XML)) {
72                                                comboLqnsOutput.select(i);
73                                        }
74                                }
75                        }
76                        
77                }
78 
79                /**
80                 * {@inheritDoc}
81                 */
82                @Override
83                public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
84                        super.setDefaults(configuration);
85 
86                        configuration.setAttribute(MessageStrings.SOLVER,
87                                        MessageStrings.LQNS_SOLVER);
88                        configuration.setAttribute(MessageStrings.LQNS_OUTPUT,
89                                        MessageStrings.LQN_OUTPUT_XML);
90                }
91                
92        }
93 
94}

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