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

COVERAGE SUMMARY FOR SOURCE FILE [PCMNavigatorLabelProvider.java]

nameclass, %method, %block, %line, %
PCMNavigatorLabelProvider.java0%   (0/1)0%   (0/7)0%   (0/88)0%   (0/26)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class PCMNavigatorLabelProvider0%   (0/1)0%   (0/7)0%   (0/88)0%   (0/26)
PCMNavigatorLabelProvider (): void 0%   (0/1)0%   (0/52)0%   (0/13)
addListener (ILabelProviderListener): void 0%   (0/1)0%   (0/5)0%   (0/2)
dispose (): void 0%   (0/1)0%   (0/4)0%   (0/2)
getImage (Object): Image 0%   (0/1)0%   (0/10)0%   (0/3)
getText (Object): String 0%   (0/1)0%   (0/10)0%   (0/3)
isLabelProperty (Object, String): boolean 0%   (0/1)0%   (0/2)0%   (0/1)
removeListener (ILabelProviderListener): void 0%   (0/1)0%   (0/5)0%   (0/2)

1package de.uka.ipd.sdq.pcmbench.navigator;
2 
3import org.eclipse.emf.common.notify.AdapterFactory;
4import org.eclipse.emf.ecore.EObject;
5import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
6import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory;
7import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory;
8import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
9import org.eclipse.jface.viewers.ILabelProvider;
10import org.eclipse.jface.viewers.ILabelProviderListener;
11import org.eclipse.swt.graphics.Image;
12 
13import de.uka.ipd.sdq.pcm.repository.provider.RepositoryItemProviderAdapterFactory;
14import de.uka.ipd.sdq.pcm.seff.provider.SeffItemProviderAdapterFactory;
15import de.uka.ipd.sdq.pcmbench.ui.provider.PalladioItemProviderAdapterFactory;
16import de.uka.ipd.sdq.pcmbench.ui.provider.categoryaware.CategoryAwareItemProviderAdapterFactory;
17import de.uka.ipd.sdq.pcmbench.ui.provider.categoryaware.PalladioCategoryDescriptions;
18 
19public class PCMNavigatorLabelProvider implements ILabelProvider {
20 
21        private ComposedAdapterFactory adapterFactory;
22        private AdapterFactoryLabelProvider labelContentProvider;
23 
24        public PCMNavigatorLabelProvider()
25        {
26                adapterFactory = new ComposedAdapterFactory();
27                adapterFactory
28                                .addAdapterFactory(new ResourceItemProviderAdapterFactory());
29                adapterFactory
30                                .addAdapterFactory(new RepositoryItemProviderAdapterFactory());
31                adapterFactory.addAdapterFactory(new SeffItemProviderAdapterFactory());
32                adapterFactory
33                                .addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
34                
35                AdapterFactory palladioFactory = new PalladioItemProviderAdapterFactory(adapterFactory);
36                AdapterFactory decoratorFactory = new CategoryAwareItemProviderAdapterFactory(palladioFactory, new PalladioCategoryDescriptions());
37                
38                labelContentProvider = new AdapterFactoryLabelProvider(decoratorFactory);
39        }
40        
41        public Image getImage(Object element) {
42                if (element instanceof EObject)
43                {
44                        return labelContentProvider.getImage(element);
45                }
46                return null;
47        }
48 
49        public String getText(Object element) {
50                if (element instanceof LinkedRepositoriesNode)
51                {
52                        return "Linked Repositories";
53                }
54                return labelContentProvider.getText(element);
55        }
56 
57        public void addListener(ILabelProviderListener listener) {
58                labelContentProvider.addListener(listener);
59        }
60 
61        public void dispose() {
62                labelContentProvider.dispose();
63        }
64 
65        public boolean isLabelProperty(Object element, String property) {
66                return true;
67        }
68 
69        public void removeListener(ILabelProviderListener listener) {
70                labelContentProvider.removeListener(listener);
71        }
72 
73}

[all classes][de.uka.ipd.sdq.pcmbench.navigator]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov