EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][de.uka.ipd.sdq.dsexplore.qml.profile.QMLProfile.provider]

COVERAGE SUMMARY FOR SOURCE FILE [QMLProfileItemProviderAdapterFactory.java]

nameclass, %method, %block, %line, %
QMLProfileItemProviderAdapterFactory.java0%   (0/1)0%   (0/14)0%   (0/185)0%   (0/44)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class QMLProfileItemProviderAdapterFactory0%   (0/1)0%   (0/14)0%   (0/185)0%   (0/44)
QMLProfileItemProviderAdapterFactory (): 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)
createEntryLevelSystemCallRequirementAdapter (): Adapter 0%   (0/1)0%   (0/12)0%   (0/3)
createRefinedQMLProfileAdapter (): Adapter 0%   (0/1)0%   (0/12)0%   (0/3)
createSimpleQMLProfileAdapter (): Adapter 0%   (0/1)0%   (0/12)0%   (0/3)
createUsageScenarioRequirementAdapter (): Adapter 0%   (0/1)0%   (0/12)0%   (0/3)
dispose (): void 0%   (0/1)0%   (0/25)0%   (0/5)
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.dsexplore.qml.profile.QMLProfile.provider;
8 
9import de.uka.ipd.sdq.dsexplore.qml.profile.QMLProfile.util.QMLProfileAdapterFactory;
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 QMLProfileItemProviderAdapterFactory extends QMLProfileAdapterFactory 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 QMLProfileItemProviderAdapterFactory() {
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.dsexplore.qml.profile.QMLProfile.SimpleQMLProfile} instances.
80         * <!-- begin-user-doc -->
81         * <!-- end-user-doc -->
82         * @generated
83         */
84        protected SimpleQMLProfileItemProvider simpleQMLProfileItemProvider;
85 
86        /**
87         * This creates an adapter for a {@link de.uka.ipd.sdq.dsexplore.qml.profile.QMLProfile.SimpleQMLProfile}.
88         * <!-- begin-user-doc -->
89         * <!-- end-user-doc -->
90         * @generated
91         */
92        @Override
93        public Adapter createSimpleQMLProfileAdapter() {
94                if (simpleQMLProfileItemProvider == null) {
95                        simpleQMLProfileItemProvider = new SimpleQMLProfileItemProvider(this);
96                }
97 
98                return simpleQMLProfileItemProvider;
99        }
100 
101        /**
102         * This keeps track of the one adapter used for all {@link de.uka.ipd.sdq.dsexplore.qml.profile.QMLProfile.RefinedQMLProfile} instances.
103         * <!-- begin-user-doc -->
104         * <!-- end-user-doc -->
105         * @generated
106         */
107        protected RefinedQMLProfileItemProvider refinedQMLProfileItemProvider;
108 
109        /**
110         * This creates an adapter for a {@link de.uka.ipd.sdq.dsexplore.qml.profile.QMLProfile.RefinedQMLProfile}.
111         * <!-- begin-user-doc -->
112         * <!-- end-user-doc -->
113         * @generated
114         */
115        @Override
116        public Adapter createRefinedQMLProfileAdapter() {
117                if (refinedQMLProfileItemProvider == null) {
118                        refinedQMLProfileItemProvider = new RefinedQMLProfileItemProvider(this);
119                }
120 
121                return refinedQMLProfileItemProvider;
122        }
123 
124        /**
125         * This keeps track of the one adapter used for all {@link de.uka.ipd.sdq.dsexplore.qml.profile.QMLProfile.UsageScenarioRequirement} instances.
126         * <!-- begin-user-doc -->
127         * <!-- end-user-doc -->
128         * @generated
129         */
130        protected UsageScenarioRequirementItemProvider usageScenarioRequirementItemProvider;
131 
132        /**
133         * This creates an adapter for a {@link de.uka.ipd.sdq.dsexplore.qml.profile.QMLProfile.UsageScenarioRequirement}.
134         * <!-- begin-user-doc -->
135         * <!-- end-user-doc -->
136         * @generated
137         */
138        @Override
139        public Adapter createUsageScenarioRequirementAdapter() {
140                if (usageScenarioRequirementItemProvider == null) {
141                        usageScenarioRequirementItemProvider = new UsageScenarioRequirementItemProvider(this);
142                }
143 
144                return usageScenarioRequirementItemProvider;
145        }
146 
147        /**
148         * This keeps track of the one adapter used for all {@link de.uka.ipd.sdq.dsexplore.qml.profile.QMLProfile.EntryLevelSystemCallRequirement} instances.
149         * <!-- begin-user-doc -->
150         * <!-- end-user-doc -->
151         * @generated
152         */
153        protected EntryLevelSystemCallRequirementItemProvider entryLevelSystemCallRequirementItemProvider;
154 
155        /**
156         * This creates an adapter for a {@link de.uka.ipd.sdq.dsexplore.qml.profile.QMLProfile.EntryLevelSystemCallRequirement}.
157         * <!-- begin-user-doc -->
158         * <!-- end-user-doc -->
159         * @generated
160         */
161        @Override
162        public Adapter createEntryLevelSystemCallRequirementAdapter() {
163                if (entryLevelSystemCallRequirementItemProvider == null) {
164                        entryLevelSystemCallRequirementItemProvider = new EntryLevelSystemCallRequirementItemProvider(this);
165                }
166 
167                return entryLevelSystemCallRequirementItemProvider;
168        }
169 
170        /**
171         * This returns the root adapter factory that contains this factory.
172         * <!-- begin-user-doc -->
173         * <!-- end-user-doc -->
174         * @generated
175         */
176        public ComposeableAdapterFactory getRootAdapterFactory() {
177                return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
178        }
179 
180        /**
181         * This sets the composed adapter factory that contains this factory.
182         * <!-- begin-user-doc -->
183         * <!-- end-user-doc -->
184         * @generated
185         */
186        public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
187                this.parentAdapterFactory = parentAdapterFactory;
188        }
189 
190        /**
191         * <!-- begin-user-doc -->
192         * <!-- end-user-doc -->
193         * @generated
194         */
195        @Override
196        public boolean isFactoryForType(Object type) {
197                return supportedTypes.contains(type) || super.isFactoryForType(type);
198        }
199 
200        /**
201         * This implementation substitutes the factory itself as the key for the adapter.
202         * <!-- begin-user-doc -->
203         * <!-- end-user-doc -->
204         * @generated
205         */
206        @Override
207        public Adapter adapt(Notifier notifier, Object type) {
208                return super.adapt(notifier, this);
209        }
210 
211        /**
212         * <!-- begin-user-doc -->
213         * <!-- end-user-doc -->
214         * @generated
215         */
216        @Override
217        public Object adapt(Object object, Object type) {
218                if (isFactoryForType(type)) {
219                        Object adapter = super.adapt(object, type);
220                        if (!(type instanceof Class<?>) || (((Class<?>)type).isInstance(adapter))) {
221                                return adapter;
222                        }
223                }
224 
225                return null;
226        }
227 
228        /**
229         * This adds a listener.
230         * <!-- begin-user-doc -->
231         * <!-- end-user-doc -->
232         * @generated
233         */
234        public void addListener(INotifyChangedListener notifyChangedListener) {
235                changeNotifier.addListener(notifyChangedListener);
236        }
237 
238        /**
239         * This removes a listener.
240         * <!-- begin-user-doc -->
241         * <!-- end-user-doc -->
242         * @generated
243         */
244        public void removeListener(INotifyChangedListener notifyChangedListener) {
245                changeNotifier.removeListener(notifyChangedListener);
246        }
247 
248        /**
249         * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
250         * <!-- begin-user-doc -->
251         * <!-- end-user-doc -->
252         * @generated
253         */
254        public void fireNotifyChanged(Notification notification) {
255                changeNotifier.fireNotifyChanged(notification);
256 
257                if (parentAdapterFactory != null) {
258                        parentAdapterFactory.fireNotifyChanged(notification);
259                }
260        }
261 
262        /**
263         * This disposes all of the item providers created by this factory. 
264         * <!-- begin-user-doc -->
265         * <!-- end-user-doc -->
266         * @generated
267         */
268        public void dispose() {
269                if (simpleQMLProfileItemProvider != null) simpleQMLProfileItemProvider.dispose();
270                if (refinedQMLProfileItemProvider != null) refinedQMLProfileItemProvider.dispose();
271                if (usageScenarioRequirementItemProvider != null) usageScenarioRequirementItemProvider.dispose();
272                if (entryLevelSystemCallRequirementItemProvider != null) entryLevelSystemCallRequirementItemProvider.dispose();
273        }
274 
275}

[all classes][de.uka.ipd.sdq.dsexplore.qml.profile.QMLProfile.provider]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov