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

COVERAGE SUMMARY FOR SOURCE FILE [InnerDeclarationItemProvider.java]

nameclass, %method, %block, %line, %
InnerDeclarationItemProvider.java0%   (0/1)0%   (0/3)0%   (0/38)0%   (0/18)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class InnerDeclarationItemProvider0%   (0/1)0%   (0/3)0%   (0/38)0%   (0/18)
InnerDeclarationItemProvider (AdapterFactory): void 0%   (0/1)0%   (0/4)0%   (0/2)
getColumnImage (Object, int): Object 0%   (0/1)0%   (0/8)0%   (0/3)
getColumnText (Object, int): String 0%   (0/1)0%   (0/26)0%   (0/13)

1package de.uka.ipd.sdq.pcm.dialogs.datatype;
2 
3import org.eclipse.emf.common.notify.AdapterFactory;
4import org.eclipse.emf.edit.provider.IItemLabelProvider;
5import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
6import org.eclipse.emf.edit.provider.ItemProviderDecorator;
7 
8import de.uka.ipd.sdq.pcm.dialogs.parameters.CreateEditorContents;
9import de.uka.ipd.sdq.pcm.repository.InnerDeclaration;
10 
11/**
12 * This class is a decorator for the generated EMF.Edit item providers. It
13 * provides item providers which are used in the operations tab of the tabbed
14 * properties sheet when editing interfaces. It implements
15 * ITableItemLabelProvider to display the given EObject in a tabular form.
16 * Additionally it provided the labels by partcial delegation to the original
17 * IItemLabelProvider.
18 * 
19 * @author Roman Andrej
20 */
21public class InnerDeclarationItemProvider extends ItemProviderDecorator implements
22ITableItemLabelProvider, IItemLabelProvider {
23 
24        /**
25         * @param adapterFactory
26         */
27        public InnerDeclarationItemProvider(AdapterFactory adapterFactory){
28                super(adapterFactory);
29        }
30 
31        /*
32         * (non-Javadoc)
33         * 
34         * @see org.eclipse.emf.edit.provider.ItemProviderDecorator#getColumnImage(java.lang.Object,
35         *      int)
36         */
37        @Override
38        public Object getColumnImage(Object object, int columnIndex) {
39                if (columnIndex == CreateEditorContents.ICON_COLUMN_INDEX)
40                        return this.getImage(object);
41                return null;
42        }
43 
44        /*
45         * (non-Javadoc)
46         * 
47         * @see org.eclipse.emf.edit.provider.ItemProviderDecorator#getColumnText(java.lang.Object,
48         *      int)
49         */
50        @Override
51        public String getColumnText(Object element, int columnIndex) {
52                String result = "";
53 
54                InnerDeclaration declaration = (InnerDeclaration) element;
55 
56                switch (columnIndex) {
57                case CreateEditorContents.ICON_COLUMN_INDEX:
58                        break;
59                case CreateEditorContents.CONTEXT_COLUMN_INDEX:
60                        result = declaration.getClass().getSimpleName();
61                        break;
62                case CreateEditorContents.NAME_COLUMN_INDEX:
63                        if (declaration != null)
64                                result = declaration.getEntityName();
65                        break;
66                case CreateEditorContents.TYPE_COLUMN_INDEX:
67                        result = ParameterRepresentation.dataTypeToString(declaration
68                                        .getDatatype_InnerDeclaration());
69                        break;
70                default:
71                        break;
72                }
73                return result;
74        }
75}

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