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

COVERAGE SUMMARY FOR SOURCE FILE [EventTypesTabItemProviderAdapterFactory.java]

nameclass, %method, %block, %line, %
EventTypesTabItemProviderAdapterFactory.java0%   (0/1)0%   (0/3)0%   (0/44)0%   (0/14)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class EventTypesTabItemProviderAdapterFactory0%   (0/1)0%   (0/3)0%   (0/44)0%   (0/14)
EventTypesTabItemProviderAdapterFactory (AdapterFactory): void 0%   (0/1)0%   (0/4)0%   (0/2)
adapt (Object, Object): Object 0%   (0/1)0%   (0/13)0%   (0/3)
createItemProviderDecorator (Object, Object): IItemProviderDecorator 0%   (0/1)0%   (0/27)0%   (0/9)

1package de.uka.ipd.sdq.pcmbench.tabs.operations;
2 
3import org.eclipse.emf.common.notify.AdapterFactory;
4import org.eclipse.emf.edit.provider.DecoratorAdapterFactory;
5import org.eclipse.emf.edit.provider.IChangeNotifier;
6import org.eclipse.emf.edit.provider.IItemLabelProvider;
7import org.eclipse.emf.edit.provider.IItemProviderDecorator;
8import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
9 
10/**
11 * Factory for an event types tab item provider adapter.
12 * This is can be used as an input for EMF AdapterFactoryLabelProviders 
13 * to create an event type item provider.
14 * 
15 * @author Benjamin Klatt
16 *
17 */
18public class EventTypesTabItemProviderAdapterFactory extends
19                DecoratorAdapterFactory {
20 
21        public EventTypesTabItemProviderAdapterFactory(AdapterFactory adapterFactory) {
22                super(adapterFactory);
23        }
24        
25        @Override
26        protected IItemProviderDecorator createItemProviderDecorator(Object target,
27                        Object type) {
28                IItemProviderDecorator decorator = new EventTypesTabItemProvider(this);
29                if (type == ITableItemLabelProvider.class) {
30                        decorator
31                                        .setDecoratedItemProvider((IChangeNotifier) decoratedAdapterFactory
32                                                        .adapt(target, IItemLabelProvider.class));
33                } else {
34                        decorator
35                                        .setDecoratedItemProvider((IChangeNotifier) decoratedAdapterFactory
36                                                        .adapt(target, type));
37                }
38                return decorator;
39        }
40 
41        @Override
42        public Object adapt(Object target, Object type) {
43                if (type == ITableItemLabelProvider.class)
44                        return createItemProviderDecorator(target, type);
45                return super.adapt(target, type);
46        }
47}

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