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

COVERAGE SUMMARY FOR SOURCE FILE [TypeDialogCellEditor.java]

nameclass, %method, %block, %line, %
TypeDialogCellEditor.java0%   (0/1)0%   (0/2)0%   (0/52)0%   (0/16)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class TypeDialogCellEditor0%   (0/1)0%   (0/2)0%   (0/52)0%   (0/16)
TypeDialogCellEditor (Composite, TransactionalEditingDomain): void 0%   (0/1)0%   (0/10)0%   (0/4)
openDialogBox (Control): Object 0%   (0/1)0%   (0/42)0%   (0/12)

1package de.uka.ipd.sdq.pcm.dialogs.parameters;
2 
3import java.util.ArrayList;
4 
5import org.eclipse.emf.ecore.EReference;
6import org.eclipse.emf.transaction.TransactionalEditingDomain;
7import org.eclipse.jface.viewers.DialogCellEditor;
8import org.eclipse.swt.widgets.Composite;
9import org.eclipse.swt.widgets.Control;
10 
11import de.uka.ipd.sdq.pcm.dialogs.datatype.CallDataTypeDialog;
12import de.uka.ipd.sdq.pcm.repository.DataType;
13import de.uka.ipd.sdq.pcm.repository.Repository;
14 
15/**
16 * The class defines a CellEditor, for which the call of DataTypeDialog makes
17 * possible.
18 * 
19 * @author Roman Andrej
20 */
21public class TypeDialogCellEditor extends DialogCellEditor {
22 
23        /**
24         * The transactional editing domain which is used to get the commands and
25         * alter the model
26         */
27 
28        private TransactionalEditingDomain editingDomain = null;
29 
30        /*
31         * @See org.eclipse.jface.viewers.DialogCellEditor#DialogCellEditor(org.eclipse.swt.widgets.Control
32         *      parent)
33         */
34        public TypeDialogCellEditor(Composite parent, TransactionalEditingDomain editingDomain) {
35                super(parent);
36                this.editingDomain = editingDomain;
37        }
38 
39        /*
40         * (non-Javadoc)
41         * 
42         * @see org.eclipse.jface.viewers.DialogCellEditor#openDialogBox(org.eclipse.swt.widgets.Control)
43         */
44        @Override
45        protected Object openDialogBox(Control cellEditorWindow) {
46 
47                ArrayList<Object> filterList = new ArrayList<Object>();
48                filterList.add(Repository.class);
49                filterList.add(DataType.class);
50                ArrayList<EReference> additionalReferences = new ArrayList<EReference>();
51 
52                CallDataTypeDialog dialog = new CallDataTypeDialog(cellEditorWindow
53                                .getShell(), filterList, additionalReferences, editingDomain
54                                .getResourceSet());
55                dialog.setProvidedService(DataType.class);
56                dialog.open();
57 
58                if (!(dialog.getResult() instanceof DataType))
59                        return null;
60 
61                return dialog.getResult();
62        }
63}

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