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

COVERAGE SUMMARY FOR SOURCE FILE [TabItemProviderAdapterFactory.java]

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

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class TabItemProviderAdapterFactory0%   (0/1)0%   (0/3)0%   (0/44)0%   (0/14)
TabItemProviderAdapterFactory (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.generic;
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;
9import org.eclipse.emf.edit.provider.ItemProviderDecorator;
10 
11import de.uka.ipd.sdq.pcmbench.tabs.operations.OperationsTabItemProvider;
12 
13public class TabItemProviderAdapterFactory<T extends ItemProviderDecorator> extends
14                DecoratorAdapterFactory {
15 
16        public TabItemProviderAdapterFactory(AdapterFactory decoratedAdapterFactory) {
17                super(decoratedAdapterFactory);
18        }
19 
20        
21        /* (non-Javadoc)
22         * @see org.eclipse.emf.edit.provider.DecoratorAdapterFactory#createItemProviderDecorator(java.lang.Object, java.lang.Object)
23         */
24        @Override
25        protected IItemProviderDecorator createItemProviderDecorator(Object target,
26                        Object type) {
27                IItemProviderDecorator decorator = new OperationsTabItemProvider(this);
28                if (type == ITableItemLabelProvider.class) {
29                        decorator
30                                        .setDecoratedItemProvider((IChangeNotifier) decoratedAdapterFactory
31                                                        .adapt(target, IItemLabelProvider.class));
32                } else {
33                        decorator
34                                        .setDecoratedItemProvider((IChangeNotifier) decoratedAdapterFactory
35                                                        .adapt(target, type));
36                }
37                return decorator;
38        }
39 
40        /* (non-Javadoc)
41         * @see org.eclipse.emf.edit.provider.DecoratorAdapterFactory#adapt(java.lang.Object, java.lang.Object)
42         */
43        @Override
44        public Object adapt(Object target, Object type) {
45                if (type == ITableItemLabelProvider.class)
46                        return createItemProviderDecorator(target, type);
47                return super.adapt(target, type);
48        }
49        
50//        private T getItemProviderDecorator(Class<T> decoratorClass, ){
51//                try {
52//                        return decoratorClass.;
53//                } catch (InstantiationException e) {
54//                        // TODO Auto-generated catch block
55//                        e.printStackTrace();
56//                } catch (IllegalAccessException e) {
57//                        // TODO Auto-generated catch block
58//                        e.printStackTrace();
59//                }
60//        }
61 
62}

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