Skip to content

Package: VGroupedGridPackageImpl

VGroupedGridPackageImpl

nameinstructionbranchcomplexitylinemethod
VGroupedGridPackageImpl()
M: 0 C: 23
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 8
100%
M: 0 C: 1
100%
createPackageContents()
M: 1 C: 52
98%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 1 C: 12
92%
M: 0 C: 1
100%
getGroup()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getGroup_Name()
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%
getGroup_Rows()
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%
getGroupedGrid()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getGroupedGridFactory()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getGroupedGrid_Groups()
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%
getRow()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getRow_Children()
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%
getSpan()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getSpan_HorizontalSpan()
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%
init()
M: 9 C: 30
77%
M: 2 C: 2
50%
M: 2 C: 1
33%
M: 1 C: 11
92%
M: 0 C: 1
100%
initializePackageContents()
M: 1 C: 187
99%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 1 C: 43
98%
M: 0 C: 1
100%
static {...}
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%

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.impl;
15:
16: import org.eclipse.emf.ecore.EAttribute;
17: import org.eclipse.emf.ecore.EClass;
18: import org.eclipse.emf.ecore.EPackage;
19: import org.eclipse.emf.ecore.EReference;
20: import org.eclipse.emf.ecore.impl.EPackageImpl;
21: import org.eclipse.emf.ecp.view.spi.groupedgrid.model.VGroup;
22: import org.eclipse.emf.ecp.view.spi.groupedgrid.model.VGroupedGrid;
23: import org.eclipse.emf.ecp.view.spi.groupedgrid.model.VGroupedGridFactory;
24: import org.eclipse.emf.ecp.view.spi.groupedgrid.model.VGroupedGridPackage;
25: import org.eclipse.emf.ecp.view.spi.groupedgrid.model.VRow;
26: import org.eclipse.emf.ecp.view.spi.groupedgrid.model.VSpan;
27: import org.eclipse.emf.ecp.view.spi.model.VViewPackage;
28:
29: /**
30: * <!-- begin-user-doc -->
31: * An implementation of the model <b>Package</b>.
32: * <!-- end-user-doc -->
33: *
34: * @generated
35: * @since 1.2
36: */
37: public class VGroupedGridPackageImpl extends EPackageImpl implements VGroupedGridPackage {
38:         /**
39:          * <!-- begin-user-doc -->
40:          * <!-- end-user-doc -->
41:          *
42:          * @generated
43:          */
44:         private EClass groupedGridEClass = null;
45:
46:         /**
47:          * <!-- begin-user-doc -->
48:          * <!-- end-user-doc -->
49:          *
50:          * @generated
51:          */
52:         private EClass groupEClass = null;
53:
54:         /**
55:          * <!-- begin-user-doc -->
56:          * <!-- end-user-doc -->
57:          *
58:          * @generated
59:          */
60:         private EClass rowEClass = null;
61:
62:         /**
63:          * <!-- begin-user-doc -->
64:          * <!-- end-user-doc -->
65:          *
66:          * @generated
67:          */
68:         private EClass spanEClass = null;
69:
70:         /**
71:          * Creates an instance of the model <b>Package</b>, registered with {@link org.eclipse.emf.ecore.EPackage.Registry
72:          * EPackage.Registry} by the package
73:          * package URI value.
74:          * <p>
75:          * Note: the correct way to create the package is via the static factory method {@link #init init()}, which also
76:          * performs initialization of the package, or returns the registered package, if one already exists. <!--
77:          * begin-user-doc --> <!-- end-user-doc -->
78:          *
79:          * @see org.eclipse.emf.ecore.EPackage.Registry
80:          * @see org.eclipse.emf.ecp.view.spi.groupedgrid.model.VGroupedGridPackage#eNS_URI
81:          * @see #init()
82:          * @generated
83:          */
84:         private VGroupedGridPackageImpl() {
85:                 super(eNS_URI, VGroupedGridFactory.eINSTANCE);
86:         }
87:
88:         /**
89:          * <!-- begin-user-doc -->
90:          * <!-- end-user-doc -->
91:          *
92:          * @generated
93:          */
94:         private static boolean isInited = false;
95:
96:         /**
97:          * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
98:          *
99:          * <p>
100:          * This method is used to initialize {@link VGroupedGridPackage#eINSTANCE} when that field is accessed. Clients
101:          * should not invoke it directly. Instead, they should simply access that field to obtain the package. <!--
102:          * begin-user-doc --> <!-- end-user-doc -->
103:          *
104:          * @see #eNS_URI
105:          * @see #createPackageContents()
106:          * @see #initializePackageContents()
107:          * @generated
108:          */
109:         public static VGroupedGridPackage init() {
110:•                if (isInited) {
111:                         return (VGroupedGridPackage) EPackage.Registry.INSTANCE.getEPackage(VGroupedGridPackage.eNS_URI);
112:                 }
113:
114:                 // Obtain or create and register package
115:                 final VGroupedGridPackageImpl theGroupedGridPackage = (VGroupedGridPackageImpl) (EPackage.Registry.INSTANCE
116:•                        .get(eNS_URI) instanceof VGroupedGridPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI)
117:                                 : new VGroupedGridPackageImpl());
118:
119:                 isInited = true;
120:
121:                 // Initialize simple dependencies
122:                 VViewPackage.eINSTANCE.eClass();
123:
124:                 // Create package meta-data objects
125:                 theGroupedGridPackage.createPackageContents();
126:
127:                 // Initialize created meta-data
128:                 theGroupedGridPackage.initializePackageContents();
129:
130:                 // Mark meta-data to indicate it can't be changed
131:                 theGroupedGridPackage.freeze();
132:
133:                 // Update the registry and return the package
134:                 EPackage.Registry.INSTANCE.put(VGroupedGridPackage.eNS_URI, theGroupedGridPackage);
135:                 return theGroupedGridPackage;
136:         }
137:
138:         /**
139:          * <!-- begin-user-doc -->
140:          * <!-- end-user-doc -->
141:          *
142:          * @generated
143:          */
144:         @Override
145:         public EClass getGroupedGrid() {
146:                 return groupedGridEClass;
147:         }
148:
149:         /**
150:          * <!-- begin-user-doc -->
151:          * <!-- end-user-doc -->
152:          *
153:          * @generated
154:          */
155:         @Override
156:         public EReference getGroupedGrid_Groups() {
157:                 return (EReference) groupedGridEClass.getEStructuralFeatures().get(0);
158:         }
159:
160:         /**
161:          * <!-- begin-user-doc -->
162:          * <!-- end-user-doc -->
163:          *
164:          * @generated
165:          */
166:         @Override
167:         public EClass getGroup() {
168:                 return groupEClass;
169:         }
170:
171:         /**
172:          * <!-- begin-user-doc -->
173:          * <!-- end-user-doc -->
174:          *
175:          * @generated
176:          */
177:         @Override
178:         public EReference getGroup_Rows() {
179:                 return (EReference) groupEClass.getEStructuralFeatures().get(0);
180:         }
181:
182:         /**
183:          * <!-- begin-user-doc -->
184:          * <!-- end-user-doc -->
185:          *
186:          * @generated
187:          */
188:         @Override
189:         public EAttribute getGroup_Name() {
190:                 return (EAttribute) groupEClass.getEStructuralFeatures().get(1);
191:         }
192:
193:         /**
194:          * <!-- begin-user-doc -->
195:          * <!-- end-user-doc -->
196:          *
197:          * @generated
198:          */
199:         @Override
200:         public EClass getRow() {
201:                 return rowEClass;
202:         }
203:
204:         /**
205:          * <!-- begin-user-doc -->
206:          * <!-- end-user-doc -->
207:          *
208:          * @generated
209:          */
210:         @Override
211:         public EReference getRow_Children() {
212:                 return (EReference) rowEClass.getEStructuralFeatures().get(0);
213:         }
214:
215:         /**
216:          * <!-- begin-user-doc -->
217:          * <!-- end-user-doc -->
218:          *
219:          * @generated
220:          */
221:         @Override
222:         public EClass getSpan() {
223:                 return spanEClass;
224:         }
225:
226:         /**
227:          * <!-- begin-user-doc -->
228:          * <!-- end-user-doc -->
229:          *
230:          * @generated
231:          */
232:         @Override
233:         public EAttribute getSpan_HorizontalSpan() {
234:                 return (EAttribute) spanEClass.getEStructuralFeatures().get(0);
235:         }
236:
237:         /**
238:          * <!-- begin-user-doc -->
239:          * <!-- end-user-doc -->
240:          *
241:          * @generated
242:          */
243:         @Override
244:         public VGroupedGridFactory getGroupedGridFactory() {
245:                 return (VGroupedGridFactory) getEFactoryInstance();
246:         }
247:
248:         /**
249:          * <!-- begin-user-doc -->
250:          * <!-- end-user-doc -->
251:          *
252:          * @generated
253:          */
254:         private boolean isCreated = false;
255:
256:         /**
257:          * Creates the meta-model objects for the package. This method is
258:          * guarded to have no affect on any invocation but its first.
259:          * <!-- begin-user-doc -->
260:          * <!-- end-user-doc -->
261:          *
262:          * @generated
263:          */
264:         public void createPackageContents() {
265:•                if (isCreated) {
266:                         return;
267:                 }
268:                 isCreated = true;
269:
270:                 // Create classes and their features
271:                 groupedGridEClass = createEClass(GROUPED_GRID);
272:                 createEReference(groupedGridEClass, GROUPED_GRID__GROUPS);
273:
274:                 groupEClass = createEClass(GROUP);
275:                 createEReference(groupEClass, GROUP__ROWS);
276:                 createEAttribute(groupEClass, GROUP__NAME);
277:
278:                 rowEClass = createEClass(ROW);
279:                 createEReference(rowEClass, ROW__CHILDREN);
280:
281:                 spanEClass = createEClass(SPAN);
282:                 createEAttribute(spanEClass, SPAN__HORIZONTAL_SPAN);
283:         }
284:
285:         /**
286:          * <!-- begin-user-doc -->
287:          * <!-- end-user-doc -->
288:          *
289:          * @generated
290:          */
291:         private boolean isInitialized = false;
292:
293:         /**
294:          * Complete the initialization of the package and its meta-model. This
295:          * method is guarded to have no affect on any invocation but its first.
296:          * <!-- begin-user-doc -->
297:          * <!-- end-user-doc -->
298:          *
299:          * @generated
300:          */
301:         public void initializePackageContents() {
302:•                if (isInitialized) {
303:                         return;
304:                 }
305:                 isInitialized = true;
306:
307:                 // Initialize package
308:                 setName(eNAME);
309:                 setNsPrefix(eNS_PREFIX);
310:                 setNsURI(eNS_URI);
311:
312:                 // Obtain other dependent packages
313:                 final VViewPackage theViewPackage = (VViewPackage) EPackage.Registry.INSTANCE.getEPackage(VViewPackage.eNS_URI);
314:
315:                 // Create type parameters
316:
317:                 // Set bounds for type parameters
318:
319:                 // Add supertypes to classes
320:                 groupedGridEClass.getESuperTypes().add(theViewPackage.getContainedElement());
321:                 spanEClass.getESuperTypes().add(theViewPackage.getAttachment());
322:
323:                 // Initialize classes and features; add operations and parameters
324:                 initEClass(groupedGridEClass, VGroupedGrid.class,
325:                         "GroupedGrid", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
326:                 initEReference(
327:                         getGroupedGrid_Groups(),
328:                         getGroup(),
329:                         null,
330:                         "groups", null, 0, -1, VGroupedGrid.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, //$NON-NLS-1$
331:                         !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
332:
333:                 initEClass(groupEClass, VGroup.class, "Group", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
334:                 initEReference(
335:                         getGroup_Rows(),
336:                         getRow(),
337:                         null,
338:                         "rows", null, 0, -1, VGroup.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, //$NON-NLS-1$
339:                         !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
340:                 initEAttribute(
341:                         getGroup_Name(),
342:                         ecorePackage.getEString(),
343:                         "name", null, 1, 1, VGroup.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, //$NON-NLS-1$
344:                         IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
345:
346:                 initEClass(rowEClass, VRow.class, "Row", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
347:                 initEReference(
348:                         getRow_Children(),
349:                         theViewPackage.getContainedElement(),
350:                         null,
351:                         "children", null, 0, -1, VRow.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, //$NON-NLS-1$
352:                         !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
353:
354:                 initEClass(spanEClass, VSpan.class, "Span", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
355:                 initEAttribute(
356:                         getSpan_HorizontalSpan(),
357:                         ecorePackage.getEInt(),
358:                         "horizontalSpan", null, 1, 1, VSpan.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, //$NON-NLS-1$
359:                         !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
360:
361:                 // Create resource
362:                 createResource(eNS_URI);
363:         }
364:
365: } // VGroupedGridPackageImpl