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

COVERAGE SUMMARY FOR SOURCE FILE [FiltersTabLabelProvider.java]

nameclass, %method, %block, %line, %
FiltersTabLabelProvider.java0%   (0/1)0%   (0/10)0%   (0/62)0%   (0/22)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class FiltersTabLabelProvider0%   (0/1)0%   (0/10)0%   (0/62)0%   (0/22)
FiltersTabLabelProvider (): void 0%   (0/1)0%   (0/3)0%   (0/1)
addListener (ILabelProviderListener): void 0%   (0/1)0%   (0/1)0%   (0/1)
dispose (): void 0%   (0/1)0%   (0/1)0%   (0/1)
getColumnImage (Object, int): Image 0%   (0/1)0%   (0/2)0%   (0/1)
getColumnText (Object, int): String 0%   (0/1)0%   (0/32)0%   (0/13)
getDescription (Properties): String 0%   (0/1)0%   (0/5)0%   (0/1)
getType (Properties): String 0%   (0/1)0%   (0/8)0%   (0/1)
getValue (Properties): String 0%   (0/1)0%   (0/7)0%   (0/1)
isLabelProperty (Object, String): boolean 0%   (0/1)0%   (0/2)0%   (0/1)
removeListener (ILabelProviderListener): void 0%   (0/1)0%   (0/1)0%   (0/1)

1/**
2 * 
3 */
4package de.uka.ipd.sdq.sensorframework.visualisation.tabs.filters;
5 
6import java.util.Properties;
7 
8import org.eclipse.jface.viewers.ILabelProviderListener;
9import org.eclipse.jface.viewers.ITableLabelProvider;
10import org.eclipse.swt.graphics.Image;
11 
12import de.uka.ipd.sdq.sensorframework.filter.IFilteredCollectionFactory;
13 
14 
15/**
16 * @author Roman Andrej
17 */
18public class FiltersTabLabelProvider implements ITableLabelProvider {
19 
20        /* (non-Javadoc)
21         * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int)
22         */
23        public Image getColumnImage(Object element, int columnIndex) {
24                // TODO Auto-generated method stub
25                return null;
26        }
27 
28        /* (non-Javadoc)
29         * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int)
30         */
31        public String getColumnText(Object element, int columnIndex) {
32                String result = "";
33 
34                IFilteredCollectionFactory entry = (IFilteredCollectionFactory) element;
35 
36                switch (columnIndex) {
37                case FiltersPropertySection.ICON_COLUMN_INDEX:
38                        break;
39                case FiltersPropertySection.FILTERNAME_COLUMN_INDEX:
40                        result = entry.getFilterFactoryID();
41                        break;
42                case FiltersPropertySection.PARAMETER_TYPE_COLUMN_INDEX:
43                        result = getType(entry.getProperties());
44                        break;
45                case FiltersPropertySection.PARAMETER_DESCRIPTION_COLUMN_INDEX:
46                        result = getDescription(entry.getProperties());
47                        break;
48                case FiltersPropertySection.PARAMETER_VALUE_COLUMN_INDEX:
49                        result = getValue(entry.getProperties());
50                        break;
51                default:
52                        break;
53                }
54                return result;
55        }
56        
57        private String getDescription(Properties properties){
58                return properties.propertyNames().nextElement().toString();
59        }
60        
61        private String getType(Properties properties){
62                return properties.get(getDescription(properties)).getClass().getSimpleName();
63        }
64        
65        private String getValue(Properties properties){
66                return properties.get(getDescription(properties)).toString();
67        }
68 
69        /* (non-Javadoc)
70         * @see org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse.jface.viewers.ILabelProviderListener)
71         */
72        public void addListener(ILabelProviderListener listener) {
73                // The implementation is not necessary.
74        }
75 
76        /* (non-Javadoc)
77         * @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose()
78         */
79        public void dispose() {
80                // The implementation is not necessary.
81        }
82 
83        /* (non-Javadoc)
84         * @see org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java.lang.Object, java.lang.String)
85         */
86        public boolean isLabelProperty(Object element, String property) {
87                return false;
88        }
89 
90        /* (non-Javadoc)
91         * @see org.eclipse.jface.viewers.IBaseLabelProvider#removeListener(org.eclipse.jface.viewers.ILabelProviderListener)
92         */
93        public void removeListener(ILabelProviderListener listener) {
94                // The implementation is not necessary.
95        }
96}

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