Skip to content

Package: GroupedGridAdapterFactory

GroupedGridAdapterFactory

nameinstructionbranchcomplexitylinemethod
GroupedGridAdapterFactory()
M: 0 C: 13
100%
M: 0 C: 2
100%
M: 0 C: 2
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
createAdapter(Notifier)
M: 0 C: 7
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
createAttachmentAdapter()
M: 2 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
createContainedElementAdapter()
M: 2 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
createEObjectAdapter()
M: 2 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
createElementAdapter()
M: 2 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
createGroupAdapter()
M: 2 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
createGroupedGridAdapter()
M: 2 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
createRowAdapter()
M: 2 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
createSpanAdapter()
M: 2 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
isFactoryForType(Object)
M: 20 C: 0
0%
M: 6 C: 0
0%
M: 4 C: 0
0%
M: 5 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /**
2: * Copyright (c) 2011-2013 EclipseSource Muenchen GmbH and others.
3: *
4: * All rights reserved. This program and the accompanying materials
5: * are made available under the terms of the Eclipse Public License 2.0
6: * which accompanies this distribution, and is available at
7: * https://www.eclipse.org/legal/epl-2.0/
8: *
9: * SPDX-License-Identifier: EPL-2.0
10: *
11: * Contributors:
12: * Eugen Neufeld - initial API and implementation
13: */
14: package org.eclipse.emf.ecp.view.spi.groupedgrid.model.util;
15:
16: import org.eclipse.emf.common.notify.Adapter;
17: import org.eclipse.emf.common.notify.Notifier;
18: import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
19: import org.eclipse.emf.ecore.EObject;
20: import org.eclipse.emf.ecp.view.spi.groupedgrid.model.VGroup;
21: import org.eclipse.emf.ecp.view.spi.groupedgrid.model.VGroupedGrid;
22: import org.eclipse.emf.ecp.view.spi.groupedgrid.model.VGroupedGridPackage;
23: import org.eclipse.emf.ecp.view.spi.groupedgrid.model.VRow;
24: import org.eclipse.emf.ecp.view.spi.groupedgrid.model.VSpan;
25: import org.eclipse.emf.ecp.view.spi.model.VAttachment;
26: import org.eclipse.emf.ecp.view.spi.model.VContainedElement;
27: import org.eclipse.emf.ecp.view.spi.model.VElement;
28:
29: /**
30: * <!-- begin-user-doc -->
31: * The <b>Adapter Factory</b> for the model.
32: * It provides an adapter <code>createXXX</code> method for each class of the model.
33: * <!-- end-user-doc -->
34: *
35: * @see org.eclipse.emf.ecp.view.spi.groupedgrid.model.VGroupedGridPackage
36: * @generated
37: * @since 1.2
38: */
39: public class GroupedGridAdapterFactory extends AdapterFactoryImpl {
40:         /**
41:          * The cached model package.
42:          * <!-- begin-user-doc -->
43:          * <!-- end-user-doc -->
44:          *
45:          * @generated
46:          */
47:         protected static VGroupedGridPackage modelPackage;
48:
49:         /**
50:          * Creates an instance of the adapter factory.
51:          * <!-- begin-user-doc -->
52:          * <!-- end-user-doc -->
53:          *
54:          * @generated
55:          */
56:         public GroupedGridAdapterFactory() {
57:•                if (modelPackage == null) {
58:                         modelPackage = VGroupedGridPackage.eINSTANCE;
59:                 }
60:         }
61:
62:         /**
63:          * Returns whether this factory is applicable for the type of the object.
64:          * <!-- begin-user-doc -->
65:          * This implementation returns <code>true</code> if the object is either the model's package or is an instance
66:          * object of the model.
67:          * <!-- end-user-doc -->
68:          *
69:          * @return whether this factory is applicable for the type of the object.
70:          * @generated
71:          */
72:         @Override
73:         public boolean isFactoryForType(Object object) {
74:•                if (object == modelPackage) {
75:                         return true;
76:                 }
77:•                if (object instanceof EObject) {
78:•                        return ((EObject) object).eClass().getEPackage() == modelPackage;
79:                 }
80:                 return false;
81:         }
82:
83:         /**
84:          * The switch that delegates to the <code>createXXX</code> methods.
85:          * <!-- begin-user-doc -->
86:          * <!-- end-user-doc -->
87:          *
88:          * @generated
89:          */
90:         protected GroupedGridSwitch<Adapter> modelSwitch = new GroupedGridSwitch<Adapter>() {
91:                 @Override
92:                 public Adapter caseGroupedGrid(VGroupedGrid object) {
93:                         return createGroupedGridAdapter();
94:                 }
95:
96:                 @Override
97:                 public Adapter caseGroup(VGroup object) {
98:                         return createGroupAdapter();
99:                 }
100:
101:                 @Override
102:                 public Adapter caseRow(VRow object) {
103:                         return createRowAdapter();
104:                 }
105:
106:                 @Override
107:                 public Adapter caseSpan(VSpan object) {
108:                         return createSpanAdapter();
109:                 }
110:
111:                 @Override
112:                 public Adapter caseElement(VElement object) {
113:                         return createElementAdapter();
114:                 }
115:
116:                 @Override
117:                 public Adapter caseContainedElement(VContainedElement object) {
118:                         return createContainedElementAdapter();
119:                 }
120:
121:                 @Override
122:                 public Adapter caseAttachment(VAttachment object) {
123:                         return createAttachmentAdapter();
124:                 }
125:
126:                 @Override
127:                 public Adapter defaultCase(EObject object) {
128:                         return createEObjectAdapter();
129:                 }
130:         };
131:
132:         /**
133:          * Creates an adapter for the <code>target</code>.
134:          * <!-- begin-user-doc -->
135:          * <!-- end-user-doc -->
136:          *
137:          * @param target the object to adapt.
138:          * @return the adapter for the <code>target</code>.
139:          * @generated
140:          */
141:         @Override
142:         public Adapter createAdapter(Notifier target) {
143:                 return modelSwitch.doSwitch((EObject) target);
144:         }
145:
146:         /**
147:          * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.view.spi.groupedgrid.model.VGroupedGrid
148:          * <em>Grouped Grid</em>}'.
149:          * <!-- begin-user-doc -->
150:          * This default implementation returns null so that we can easily ignore cases;
151:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
152:          * <!-- end-user-doc -->
153:          *
154:          * @return the new adapter.
155:          * @see org.eclipse.emf.ecp.view.spi.groupedgrid.model.VGroupedGrid
156:          * @generated
157:          */
158:         public Adapter createGroupedGridAdapter() {
159:                 return null;
160:         }
161:
162:         /**
163:          * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.view.spi.groupedgrid.model.VGroup
164:          * <em>Group</em>}'.
165:          * <!-- begin-user-doc -->
166:          * This default implementation returns null so that we can easily ignore cases;
167:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
168:          * <!-- end-user-doc -->
169:          *
170:          * @return the new adapter.
171:          * @see org.eclipse.emf.ecp.view.spi.groupedgrid.model.VGroup
172:          * @generated
173:          */
174:         public Adapter createGroupAdapter() {
175:                 return null;
176:         }
177:
178:         /**
179:          * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.view.spi.groupedgrid.model.VRow
180:          * <em>Row</em>}'.
181:          * <!-- begin-user-doc -->
182:          * This default implementation returns null so that we can easily ignore cases;
183:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
184:          * <!-- end-user-doc -->
185:          *
186:          * @return the new adapter.
187:          * @see org.eclipse.emf.ecp.view.spi.groupedgrid.model.VRow
188:          * @generated
189:          */
190:         public Adapter createRowAdapter() {
191:                 return null;
192:         }
193:
194:         /**
195:          * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.view.spi.groupedgrid.model.VSpan
196:          * <em>Span</em>}'.
197:          * <!-- begin-user-doc -->
198:          * This default implementation returns null so that we can easily ignore cases;
199:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
200:          * <!-- end-user-doc -->
201:          *
202:          * @return the new adapter.
203:          * @see org.eclipse.emf.ecp.view.spi.groupedgrid.model.VSpan
204:          * @generated
205:          */
206:         public Adapter createSpanAdapter() {
207:                 return null;
208:         }
209:
210:         /**
211:          * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.view.spi.model.VElement
212:          * <em>Element</em>}'.
213:          * <!-- begin-user-doc -->
214:          * This default implementation returns null so that we can easily ignore cases;
215:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
216:          * <!-- end-user-doc -->
217:          *
218:          * @return the new adapter.
219:          * @see org.eclipse.emf.ecp.view.spi.model.VElement
220:          * @generated
221:          */
222:         public Adapter createElementAdapter() {
223:                 return null;
224:         }
225:
226:         /**
227:          * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.view.spi.model.VContainedElement
228:          * <em>Contained Element</em>}'.
229:          * <!-- begin-user-doc -->
230:          * This default implementation returns null so that we can easily ignore cases;
231:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
232:          * <!-- end-user-doc -->
233:          *
234:          * @return the new adapter.
235:          * @see org.eclipse.emf.ecp.view.spi.model.VContainedElement
236:          * @generated
237:          */
238:         public Adapter createContainedElementAdapter() {
239:                 return null;
240:         }
241:
242:         /**
243:          * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.view.spi.model.VAttachment
244:          * <em>Attachment</em>}'.
245:          * <!-- begin-user-doc -->
246:          * This default implementation returns null so that we can easily ignore cases;
247:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
248:          * <!-- end-user-doc -->
249:          *
250:          * @return the new adapter.
251:          * @see org.eclipse.emf.ecp.view.spi.model.VAttachment
252:          * @generated
253:          */
254:         public Adapter createAttachmentAdapter() {
255:                 return null;
256:         }
257:
258:         /**
259:          * Creates a new adapter for the default case.
260:          * <!-- begin-user-doc -->
261:          * This default implementation returns null.
262:          * <!-- end-user-doc -->
263:          *
264:          * @return the new adapter.
265:          * @generated
266:          */
267:         public Adapter createEObjectAdapter() {
268:                 return null;
269:         }
270:
271: } // GroupedGridAdapterFactory