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

COVERAGE SUMMARY FOR SOURCE FILE [ConfigureDatasourceDialog.java]

nameclass, %method, %block, %line, %
ConfigureDatasourceDialog.java0%   (0/4)0%   (0/8)0%   (0/111)0%   (0/31)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ConfigureDatasourceDialog0%   (0/1)0%   (0/2)0%   (0/33)0%   (0/10)
<static initializer> 0%   (0/1)0%   (0/5)0%   (0/3)
ConfigureDatasourceDialog (Shell, String, boolean): void 0%   (0/1)0%   (0/28)0%   (0/7)
     
class ConfigureDatasourceDialog$10%   (0/1)0%   (0/2)0%   (0/18)0%   (0/7)
ConfigureDatasourceDialog$1 (ConfigureDatasourceDialog): void 0%   (0/1)0%   (0/6)0%   (0/2)
widgetSelected (SelectionEvent): void 0%   (0/1)0%   (0/12)0%   (0/5)
     
class ConfigureDatasourceDialog$20%   (0/1)0%   (0/2)0%   (0/30)0%   (0/9)
ConfigureDatasourceDialog$2 (ConfigureDatasourceDialog): void 0%   (0/1)0%   (0/6)0%   (0/2)
widgetSelected (SelectionEvent): void 0%   (0/1)0%   (0/24)0%   (0/7)
     
class ConfigureDatasourceDialog$30%   (0/1)0%   (0/2)0%   (0/30)0%   (0/10)
ConfigureDatasourceDialog$3 (ConfigureDatasourceDialog): void 0%   (0/1)0%   (0/6)0%   (0/2)
widgetSelected (SelectionEvent): void 0%   (0/1)0%   (0/24)0%   (0/8)

1package de.uka.ipd.sdq.sensorframework.dialogs.dataset;
2 
3 
4import org.eclipse.jface.wizard.WizardDialog;
5import org.eclipse.swt.events.SelectionAdapter;
6import org.eclipse.swt.events.SelectionEvent;
7import org.eclipse.swt.widgets.Shell;
8 
9import de.uka.ipd.sdq.sensorframework.SensorFrameworkDataset;
10import de.uka.ipd.sdq.sensorframework.entities.dao.IDAOFactory;
11 
12/** @author Roman Andrej */
13public class ConfigureDatasourceDialog extends DatasourceDialog {
14        
15    public static String OPEN_WISARD_TITLE = "Load a source storage for the sensor framework.";
16    public static String ADD_WIZARD_TITLE = "Select/create a storage for the sensor framework.";
17 
18        public ConfigureDatasourceDialog(Shell parentShell, String dialogTitel, boolean makeValidation) {
19                super(parentShell, dialogTitel, SensorFrameworkDataset
20                                .singleton().getDataSources(), makeValidation);
21                create();
22                setRemoveButtonAction(new SelectionAdapter() {
23 
24                        /* (non-Javadoc)
25                         * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
26                         */
27                        @Override
28                        public void widgetSelected(SelectionEvent e) {
29                                IDAOFactory selectedSource = (IDAOFactory) getResult();
30                                SensorFrameworkDataset.singleton().removeDataSource(
31                                                selectedSource);
32                                refresh();
33                        }
34                });
35                
36                setAddButtonAction(new SelectionAdapter(){
37 
38                        /* (non-Javadoc)
39                         * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
40                         */
41                        @Override
42                        public void widgetSelected(SelectionEvent e) {
43                                AddNewDatasourceWizard w = new AddNewDatasourceWizard();
44                                //w.init(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getWorkbench(),
45                            //       null);
46                            // Instantiates the wizard container with the wizard and opens it
47                            WizardDialog dialog = new WizardDialog(e.display.getActiveShell(), w);
48                            dialog.create();
49                            dialog.setTitle(ADD_WIZARD_TITLE);
50                            dialog.open();                            
51                            refresh();
52                        }
53                        
54                });
55                
56                setOpenButtonAction(new SelectionAdapter(){
57 
58                        /* (non-Javadoc)
59                         * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
60                         */
61                        @Override
62                        public void widgetSelected(SelectionEvent e) {
63 
64                                OpenDatasourceWizard w = new OpenDatasourceWizard();
65 
66                                // Instantiates the wizard container with the wizard and opens it
67                                WizardDialog dialog = new WizardDialog(e.display
68                                                .getActiveShell(), w);
69                                dialog.create();
70                                dialog.setTitle(OPEN_WISARD_TITLE);
71                                dialog.open();
72                                refresh();
73                        }
74                });
75        }
76}

[all classes][de.uka.ipd.sdq.sensorframework.dialogs.dataset]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov