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

COVERAGE SUMMARY FOR SOURCE FILE [RepositorydecoratorItemProviderAdapterFactory.java]

nameclass, %method, %block, %line, %
RepositorydecoratorItemProviderAdapterFactory.java0%   (0/1)0%   (0/13)0%   (0/167)0%   (0/40)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class RepositorydecoratorItemProviderAdapterFactory0%   (0/1)0%   (0/13)0%   (0/167)0%   (0/40)
RepositorydecoratorItemProviderAdapterFactory (): void 0%   (0/1)0%   (0/38)0%   (0/9)
adapt (Notifier, Object): Adapter 0%   (0/1)0%   (0/5)0%   (0/1)
adapt (Object, Object): Object 0%   (0/1)0%   (0/21)0%   (0/5)
addListener (INotifyChangedListener): void 0%   (0/1)0%   (0/5)0%   (0/2)
createAllocationContextResultsAdapter (): Adapter 0%   (0/1)0%   (0/12)0%   (0/3)
createAllocationServiceResultAdapter (): Adapter 0%   (0/1)0%   (0/12)0%   (0/3)
createInterfaceProvidingRequiringEntityResultsAdapter (): Adapter 0%   (0/1)0%   (0/12)0%   (0/3)
dispose (): void 0%   (0/1)0%   (0/19)0%   (0/4)
fireNotifyChanged (Notification): void 0%   (0/1)0%   (0/12)0%   (0/4)
getRootAdapterFactory (): ComposeableAdapterFactory 0%   (0/1)0%   (0/9)0%   (0/1)
isFactoryForType (Object): boolean 0%   (0/1)0%   (0/13)0%   (0/1)
removeListener (INotifyChangedListener): void 0%   (0/1)0%   (0/5)0%   (0/2)
setParentAdapterFactory (ComposedAdapterFactory): void 0%   (0/1)0%   (0/4)0%   (0/2)

1/**
2 * <copyright>
3 * </copyright>
4 *
5 * $Id$
6 */
7package de.uka.ipd.sdq.pcm.resultdecorator.repositorydecorator.provider;
8 
9import de.uka.ipd.sdq.pcm.resultdecorator.repositorydecorator.util.RepositorydecoratorAdapterFactory;
10 
11import java.util.ArrayList;
12import java.util.Collection;
13 
14import org.eclipse.emf.common.notify.Adapter;
15import org.eclipse.emf.common.notify.Notification;
16import org.eclipse.emf.common.notify.Notifier;
17 
18import org.eclipse.emf.edit.provider.ChangeNotifier;
19import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
20import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
21import org.eclipse.emf.edit.provider.IChangeNotifier;
22import org.eclipse.emf.edit.provider.IDisposable;
23import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
24import org.eclipse.emf.edit.provider.IItemLabelProvider;
25import org.eclipse.emf.edit.provider.IItemPropertySource;
26import org.eclipse.emf.edit.provider.INotifyChangedListener;
27import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
28import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
29 
30/**
31 * This is the factory that is used to provide the interfaces needed to support Viewers.
32 * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
33 * The adapters also support Eclipse property sheets.
34 * Note that most of the adapters are shared among multiple instances.
35 * <!-- begin-user-doc -->
36 * <!-- end-user-doc -->
37 * @generated
38 */
39public class RepositorydecoratorItemProviderAdapterFactory extends RepositorydecoratorAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable {
40        /**
41         * This keeps track of the root adapter factory that delegates to this adapter factory.
42         * <!-- begin-user-doc -->
43         * <!-- end-user-doc -->
44         * @generated
45         */
46        protected ComposedAdapterFactory parentAdapterFactory;
47 
48        /**
49         * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
50         * <!-- begin-user-doc -->
51         * <!-- end-user-doc -->
52         * @generated
53         */
54        protected IChangeNotifier changeNotifier = new ChangeNotifier();
55 
56        /**
57         * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
58         * <!-- begin-user-doc -->
59         * <!-- end-user-doc -->
60         * @generated
61         */
62        protected Collection<Object> supportedTypes = new ArrayList<Object>();
63 
64        /**
65         * This constructs an instance.
66         * <!-- begin-user-doc -->
67         * <!-- end-user-doc -->
68         * @generated
69         */
70        public RepositorydecoratorItemProviderAdapterFactory() {
71                supportedTypes.add(IEditingDomainItemProvider.class);
72                supportedTypes.add(IStructuredItemContentProvider.class);
73                supportedTypes.add(ITreeItemContentProvider.class);
74                supportedTypes.add(IItemLabelProvider.class);
75                supportedTypes.add(IItemPropertySource.class);
76        }
77 
78        /**
79         * This keeps track of the one adapter used for all {@link de.uka.ipd.sdq.pcm.resultdecorator.repositorydecorator.InterfaceProvidingRequiringEntityResults} instances.
80         * <!-- begin-user-doc -->
81         * <!-- end-user-doc -->
82         * @generated
83         */
84        protected InterfaceProvidingRequiringEntityResultsItemProvider interfaceProvidingRequiringEntityResultsItemProvider;
85 
86        /**
87         * This creates an adapter for a {@link de.uka.ipd.sdq.pcm.resultdecorator.repositorydecorator.InterfaceProvidingRequiringEntityResults}.
88         * <!-- begin-user-doc -->
89         * <!-- end-user-doc -->
90         * @generated
91         */
92        @Override
93        public Adapter createInterfaceProvidingRequiringEntityResultsAdapter() {
94                if (interfaceProvidingRequiringEntityResultsItemProvider == null) {
95                        interfaceProvidingRequiringEntityResultsItemProvider = new InterfaceProvidingRequiringEntityResultsItemProvider(this);
96                }
97 
98                return interfaceProvidingRequiringEntityResultsItemProvider;
99        }
100 
101        /**
102         * This keeps track of the one adapter used for all {@link de.uka.ipd.sdq.pcm.resultdecorator.repositorydecorator.AllocationContextResults} instances.
103         * <!-- begin-user-doc -->
104         * <!-- end-user-doc -->
105         * @generated
106         */
107        protected AllocationContextResultsItemProvider allocationContextResultsItemProvider;
108 
109        /**
110         * This creates an adapter for a {@link de.uka.ipd.sdq.pcm.resultdecorator.repositorydecorator.AllocationContextResults}.
111         * <!-- begin-user-doc -->
112         * <!-- end-user-doc -->
113         * @generated
114         */
115        @Override
116        public Adapter createAllocationContextResultsAdapter() {
117                if (allocationContextResultsItemProvider == null) {
118                        allocationContextResultsItemProvider = new AllocationContextResultsItemProvider(this);
119                }
120 
121                return allocationContextResultsItemProvider;
122        }
123 
124        /**
125         * This keeps track of the one adapter used for all {@link de.uka.ipd.sdq.pcm.resultdecorator.repositorydecorator.AllocationServiceResult} instances.
126         * <!-- begin-user-doc -->
127         * <!-- end-user-doc -->
128         * @generated
129         */
130        protected AllocationServiceResultItemProvider allocationServiceResultItemProvider;
131 
132        /**
133         * This creates an adapter for a {@link de.uka.ipd.sdq.pcm.resultdecorator.repositorydecorator.AllocationServiceResult}.
134         * <!-- begin-user-doc -->
135         * <!-- end-user-doc -->
136         * @generated
137         */
138        @Override
139        public Adapter createAllocationServiceResultAdapter() {
140                if (allocationServiceResultItemProvider == null) {
141                        allocationServiceResultItemProvider = new AllocationServiceResultItemProvider(this);
142                }
143 
144                return allocationServiceResultItemProvider;
145        }
146 
147        /**
148         * This returns the root adapter factory that contains this factory.
149         * <!-- begin-user-doc -->
150         * <!-- end-user-doc -->
151         * @generated
152         */
153        public ComposeableAdapterFactory getRootAdapterFactory() {
154                return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
155        }
156 
157        /**
158         * This sets the composed adapter factory that contains this factory.
159         * <!-- begin-user-doc -->
160         * <!-- end-user-doc -->
161         * @generated
162         */
163        public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
164                this.parentAdapterFactory = parentAdapterFactory;
165        }
166 
167        /**
168         * <!-- begin-user-doc -->
169         * <!-- end-user-doc -->
170         * @generated
171         */
172        @Override
173        public boolean isFactoryForType(Object type) {
174                return supportedTypes.contains(type) || super.isFactoryForType(type);
175        }
176 
177        /**
178         * This implementation substitutes the factory itself as the key for the adapter.
179         * <!-- begin-user-doc -->
180         * <!-- end-user-doc -->
181         * @generated
182         */
183        @Override
184        public Adapter adapt(Notifier notifier, Object type) {
185                return super.adapt(notifier, this);
186        }
187 
188        /**
189         * <!-- begin-user-doc -->
190         * <!-- end-user-doc -->
191         * @generated
192         */
193        @Override
194        public Object adapt(Object object, Object type) {
195                if (isFactoryForType(type)) {
196                        Object adapter = super.adapt(object, type);
197                        if (!(type instanceof Class<?>) || (((Class<?>)type).isInstance(adapter))) {
198                                return adapter;
199                        }
200                }
201 
202                return null;
203        }
204 
205        /**
206         * This adds a listener.
207         * <!-- begin-user-doc -->
208         * <!-- end-user-doc -->
209         * @generated
210         */
211        public void addListener(INotifyChangedListener notifyChangedListener) {
212                changeNotifier.addListener(notifyChangedListener);
213        }
214 
215        /**
216         * This removes a listener.
217         * <!-- begin-user-doc -->
218         * <!-- end-user-doc -->
219         * @generated
220         */
221        public void removeListener(INotifyChangedListener notifyChangedListener) {
222                changeNotifier.removeListener(notifyChangedListener);
223        }
224 
225        /**
226         * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
227         * <!-- begin-user-doc -->
228         * <!-- end-user-doc -->
229         * @generated
230         */
231        public void fireNotifyChanged(Notification notification) {
232                changeNotifier.fireNotifyChanged(notification);
233 
234                if (parentAdapterFactory != null) {
235                        parentAdapterFactory.fireNotifyChanged(notification);
236                }
237        }
238 
239        /**
240         * This disposes all of the item providers created by this factory. 
241         * <!-- begin-user-doc -->
242         * <!-- end-user-doc -->
243         * @generated
244         */
245        public void dispose() {
246                if (interfaceProvidingRequiringEntityResultsItemProvider != null) interfaceProvidingRequiringEntityResultsItemProvider.dispose();
247                if (allocationContextResultsItemProvider != null) allocationContextResultsItemProvider.dispose();
248                if (allocationServiceResultItemProvider != null) allocationServiceResultItemProvider.dispose();
249        }
250 
251}

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