Skip to content

Package: VCategorizationPackageImpl

VCategorizationPackageImpl

nameinstructionbranchcomplexitylinemethod
VCategorizationPackageImpl()
M: 0 C: 29
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 10
100%
M: 0 C: 1
100%
createPackageContents()
M: 1 C: 82
99%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 1 C: 18
95%
M: 0 C: 1
100%
getAbstractCategorization()
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%
getAbstractCategorization_Actions()
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%
getAction()
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%
getAction_Bundle()
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%
getAction_ClassName()
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%
getCategorizableElement()
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%
getCategorizableElement_LabelObject()
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%
getCategorization()
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%
getCategorizationElement()
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%
getCategorizationElement_Categorizations()
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%
getCategorizationElement_CurrentSelection()
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%
getCategorizationElement_MainCategoryDepth()
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%
getCategorizationFactory()
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%
getCategorization_Categorizations()
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%
getCategory()
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%
getCategory_Composite()
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: 323
100%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 1 C: 50
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: * EclipseSource Munich - initial API and implementation
13: */
14: package org.eclipse.emf.ecp.view.spi.categorization.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.categorization.model.VAbstractCategorization;
22: import org.eclipse.emf.ecp.view.spi.categorization.model.VAction;
23: import org.eclipse.emf.ecp.view.spi.categorization.model.VCategorizableElement;
24: import org.eclipse.emf.ecp.view.spi.categorization.model.VCategorization;
25: import org.eclipse.emf.ecp.view.spi.categorization.model.VCategorizationElement;
26: import org.eclipse.emf.ecp.view.spi.categorization.model.VCategorizationFactory;
27: import org.eclipse.emf.ecp.view.spi.categorization.model.VCategorizationPackage;
28: import org.eclipse.emf.ecp.view.spi.categorization.model.VCategory;
29: import org.eclipse.emf.ecp.view.spi.model.VViewPackage;
30:
31: /**
32: * <!-- begin-user-doc -->
33: * An implementation of the model <b>Package</b>.
34: * <!-- end-user-doc -->
35: *
36: * @generated
37: */
38: public class VCategorizationPackageImpl extends EPackageImpl implements VCategorizationPackage {
39:         /**
40:          * <!-- begin-user-doc -->
41:          * <!-- end-user-doc -->
42:          *
43:          * @generated
44:          */
45:         private EClass abstractCategorizationEClass = null;
46:
47:         /**
48:          * <!-- begin-user-doc -->
49:          * <!-- end-user-doc -->
50:          *
51:          * @generated
52:          */
53:         private EClass categorizationEClass = null;
54:
55:         /**
56:          * <!-- begin-user-doc -->
57:          * <!-- end-user-doc -->
58:          *
59:          * @generated
60:          */
61:         private EClass categoryEClass = null;
62:
63:         /**
64:          * <!-- begin-user-doc -->
65:          * <!-- end-user-doc -->
66:          *
67:          * @generated
68:          */
69:         private EClass actionEClass = null;
70:
71:         /**
72:          * <!-- begin-user-doc -->
73:          * <!-- end-user-doc -->
74:          *
75:          * @generated
76:          */
77:         private EClass categorizationElementEClass = null;
78:
79:         /**
80:          * <!-- begin-user-doc -->
81:          * <!-- end-user-doc -->
82:          *
83:          * @generated
84:          */
85:         private EClass categorizableElementEClass = null;
86:
87:         /**
88:          * Creates an instance of the model <b>Package</b>, registered with {@link org.eclipse.emf.ecore.EPackage.Registry
89:          * EPackage.Registry} by the package
90:          * package URI value.
91:          * <p>
92:          * Note: the correct way to create the package is via the static factory method {@link #init init()}, which also
93:          * performs initialization of the package, or returns the registered package, if one already exists. <!--
94:          * begin-user-doc --> <!-- end-user-doc -->
95:          *
96:          * @see org.eclipse.emf.ecore.EPackage.Registry
97:          * @see org.eclipse.emf.ecp.view.spi.categorization.model.VCategorizationPackage#eNS_URI
98:          * @see #init()
99:          * @generated
100:          */
101:         private VCategorizationPackageImpl() {
102:                 super(eNS_URI, VCategorizationFactory.eINSTANCE);
103:         }
104:
105:         /**
106:          * <!-- begin-user-doc -->
107:          * <!-- end-user-doc -->
108:          *
109:          * @generated
110:          */
111:         private static boolean isInited = false;
112:
113:         /**
114:          * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
115:          *
116:          * <p>
117:          * This method is used to initialize {@link VCategorizationPackage#eINSTANCE} when that field is accessed. Clients
118:          * should not invoke it directly. Instead, they should simply access that field to obtain the package. <!--
119:          * begin-user-doc --> <!-- end-user-doc -->
120:          *
121:          * @see #eNS_URI
122:          * @see #createPackageContents()
123:          * @see #initializePackageContents()
124:          * @generated
125:          */
126:         public static VCategorizationPackage init() {
127:•                if (isInited)
128:                         return (VCategorizationPackage) EPackage.Registry.INSTANCE.getEPackage(VCategorizationPackage.eNS_URI);
129:
130:                 // Obtain or create and register package
131:                 VCategorizationPackageImpl theCategorizationPackage = (VCategorizationPackageImpl) (EPackage.Registry.INSTANCE
132:•                        .get(eNS_URI) instanceof VCategorizationPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI)
133:                                 : new VCategorizationPackageImpl());
134:
135:                 isInited = true;
136:
137:                 // Initialize simple dependencies
138:                 VViewPackage.eINSTANCE.eClass();
139:
140:                 // Create package meta-data objects
141:                 theCategorizationPackage.createPackageContents();
142:
143:                 // Initialize created meta-data
144:                 theCategorizationPackage.initializePackageContents();
145:
146:                 // Mark meta-data to indicate it can't be changed
147:                 theCategorizationPackage.freeze();
148:
149:                 // Update the registry and return the package
150:                 EPackage.Registry.INSTANCE.put(VCategorizationPackage.eNS_URI, theCategorizationPackage);
151:                 return theCategorizationPackage;
152:         }
153:
154:         /**
155:          * <!-- begin-user-doc -->
156:          * <!-- end-user-doc -->
157:          *
158:          * @generated
159:          */
160:         @Override
161:         public EClass getAbstractCategorization() {
162:                 return abstractCategorizationEClass;
163:         }
164:
165:         /**
166:          * <!-- begin-user-doc -->
167:          * <!-- end-user-doc -->
168:          *
169:          * @generated
170:          */
171:         @Override
172:         public EReference getAbstractCategorization_Actions() {
173:                 return (EReference) abstractCategorizationEClass.getEStructuralFeatures().get(0);
174:         }
175:
176:         /**
177:          * <!-- begin-user-doc -->
178:          * <!-- end-user-doc -->
179:          *
180:          * @generated
181:          */
182:         @Override
183:         public EClass getCategorization() {
184:                 return categorizationEClass;
185:         }
186:
187:         /**
188:          * <!-- begin-user-doc -->
189:          * <!-- end-user-doc -->
190:          *
191:          * @generated
192:          */
193:         @Override
194:         public EReference getCategorization_Categorizations() {
195:                 return (EReference) categorizationEClass.getEStructuralFeatures().get(0);
196:         }
197:
198:         /**
199:          * <!-- begin-user-doc -->
200:          * <!-- end-user-doc -->
201:          *
202:          * @generated
203:          */
204:         @Override
205:         public EClass getCategory() {
206:                 return categoryEClass;
207:         }
208:
209:         /**
210:          * <!-- begin-user-doc -->
211:          * <!-- end-user-doc -->
212:          *
213:          * @generated
214:          */
215:         @Override
216:         public EReference getCategory_Composite() {
217:                 return (EReference) categoryEClass.getEStructuralFeatures().get(0);
218:         }
219:
220:         /**
221:          * <!-- begin-user-doc -->
222:          * <!-- end-user-doc -->
223:          *
224:          * @generated
225:          */
226:         @Override
227:         public EClass getAction() {
228:                 return actionEClass;
229:         }
230:
231:         /**
232:          * <!-- begin-user-doc -->
233:          * <!-- end-user-doc -->
234:          *
235:          * @generated
236:          */
237:         @Override
238:         public EAttribute getAction_Bundle() {
239:                 return (EAttribute) actionEClass.getEStructuralFeatures().get(0);
240:         }
241:
242:         /**
243:          * <!-- begin-user-doc -->
244:          * <!-- end-user-doc -->
245:          *
246:          * @generated
247:          */
248:         @Override
249:         public EAttribute getAction_ClassName() {
250:                 return (EAttribute) actionEClass.getEStructuralFeatures().get(1);
251:         }
252:
253:         /**
254:          * <!-- begin-user-doc -->
255:          * <!-- end-user-doc -->
256:          *
257:          * @generated
258:          */
259:         @Override
260:         public EClass getCategorizationElement() {
261:                 return categorizationElementEClass;
262:         }
263:
264:         /**
265:          * <!-- begin-user-doc -->
266:          * <!-- end-user-doc -->
267:          *
268:          * @generated
269:          */
270:         @Override
271:         public EReference getCategorizationElement_Categorizations() {
272:                 return (EReference) categorizationElementEClass.getEStructuralFeatures().get(0);
273:         }
274:
275:         /**
276:          * <!-- begin-user-doc -->
277:          * <!-- end-user-doc -->
278:          *
279:          * @generated
280:          */
281:         @Override
282:         public EReference getCategorizationElement_CurrentSelection() {
283:                 return (EReference) categorizationElementEClass.getEStructuralFeatures().get(1);
284:         }
285:
286:         /**
287:          * <!-- begin-user-doc -->
288:          * <!-- end-user-doc -->
289:          *
290:          * @generated
291:          */
292:         @Override
293:         public EAttribute getCategorizationElement_MainCategoryDepth() {
294:                 return (EAttribute) categorizationElementEClass.getEStructuralFeatures().get(2);
295:         }
296:
297:         /**
298:          * <!-- begin-user-doc -->
299:          * <!-- end-user-doc -->
300:          *
301:          * @generated
302:          */
303:         @Override
304:         public EClass getCategorizableElement() {
305:                 return categorizableElementEClass;
306:         }
307:
308:         /**
309:          * <!-- begin-user-doc -->
310:          * <!-- end-user-doc -->
311:          *
312:          * @generated
313:          */
314:         @Override
315:         public EReference getCategorizableElement_LabelObject() {
316:                 return (EReference) categorizableElementEClass.getEStructuralFeatures().get(0);
317:         }
318:
319:         /**
320:          * <!-- begin-user-doc -->
321:          * <!-- end-user-doc -->
322:          *
323:          * @generated
324:          */
325:         @Override
326:         public VCategorizationFactory getCategorizationFactory() {
327:                 return (VCategorizationFactory) getEFactoryInstance();
328:         }
329:
330:         /**
331:          * <!-- begin-user-doc -->
332:          * <!-- end-user-doc -->
333:          *
334:          * @generated
335:          */
336:         private boolean isCreated = false;
337:
338:         /**
339:          * Creates the meta-model objects for the package. This method is
340:          * guarded to have no affect on any invocation but its first.
341:          * <!-- begin-user-doc -->
342:          * <!-- end-user-doc -->
343:          *
344:          * @generated
345:          */
346:         public void createPackageContents() {
347:•                if (isCreated)
348:                         return;
349:                 isCreated = true;
350:
351:                 // Create classes and their features
352:                 abstractCategorizationEClass = createEClass(ABSTRACT_CATEGORIZATION);
353:                 createEReference(abstractCategorizationEClass, ABSTRACT_CATEGORIZATION__ACTIONS);
354:
355:                 categorizationEClass = createEClass(CATEGORIZATION);
356:                 createEReference(categorizationEClass, CATEGORIZATION__CATEGORIZATIONS);
357:
358:                 categoryEClass = createEClass(CATEGORY);
359:                 createEReference(categoryEClass, CATEGORY__COMPOSITE);
360:
361:                 actionEClass = createEClass(ACTION);
362:                 createEAttribute(actionEClass, ACTION__BUNDLE);
363:                 createEAttribute(actionEClass, ACTION__CLASS_NAME);
364:
365:                 categorizationElementEClass = createEClass(CATEGORIZATION_ELEMENT);
366:                 createEReference(categorizationElementEClass, CATEGORIZATION_ELEMENT__CATEGORIZATIONS);
367:                 createEReference(categorizationElementEClass, CATEGORIZATION_ELEMENT__CURRENT_SELECTION);
368:                 createEAttribute(categorizationElementEClass, CATEGORIZATION_ELEMENT__MAIN_CATEGORY_DEPTH);
369:
370:                 categorizableElementEClass = createEClass(CATEGORIZABLE_ELEMENT);
371:                 createEReference(categorizableElementEClass, CATEGORIZABLE_ELEMENT__LABEL_OBJECT);
372:         }
373:
374:         /**
375:          * <!-- begin-user-doc -->
376:          * <!-- end-user-doc -->
377:          *
378:          * @generated
379:          */
380:         private boolean isInitialized = false;
381:
382:         /**
383:          * Complete the initialization of the package and its meta-model. This
384:          * method is guarded to have no affect on any invocation but its first.
385:          * <!-- begin-user-doc -->
386:          * <!-- end-user-doc -->
387:          *
388:          * @generated
389:          */
390:         public void initializePackageContents() {
391:•                if (isInitialized)
392:                         return;
393:                 isInitialized = true;
394:
395:                 // Initialize package
396:                 setName(eNAME);
397:                 setNsPrefix(eNS_PREFIX);
398:                 setNsURI(eNS_URI);
399:
400:                 // Obtain other dependent packages
401:                 VViewPackage theViewPackage = (VViewPackage) EPackage.Registry.INSTANCE.getEPackage(VViewPackage.eNS_URI);
402:
403:                 // Create type parameters
404:
405:                 // Set bounds for type parameters
406:
407:                 // Add supertypes to classes
408:                 abstractCategorizationEClass.getESuperTypes().add(this.getCategorizableElement());
409:                 categorizationEClass.getESuperTypes().add(this.getAbstractCategorization());
410:                 categoryEClass.getESuperTypes().add(this.getAbstractCategorization());
411:                 categorizationElementEClass.getESuperTypes().add(theViewPackage.getContainedElement());
412:                 categorizableElementEClass.getESuperTypes().add(theViewPackage.getElement());
413:                 categorizableElementEClass.getESuperTypes().add(theViewPackage.getHasTooltip());
414:
415:                 // Initialize classes and features; add operations and parameters
416:                 initEClass(abstractCategorizationEClass, VAbstractCategorization.class, "AbstractCategorization", IS_ABSTRACT, //$NON-NLS-1$
417:                         !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
418:                 initEReference(getAbstractCategorization_Actions(), this.getAction(), null, "actions", null, 0, -1, //$NON-NLS-1$
419:                         VAbstractCategorization.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE,
420:                         !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
421:
422:                 initEClass(categorizationEClass, VCategorization.class, "Categorization", !IS_ABSTRACT, !IS_INTERFACE, //$NON-NLS-1$
423:                         IS_GENERATED_INSTANCE_CLASS);
424:                 initEReference(getCategorization_Categorizations(), this.getAbstractCategorization(), null, "categorizations", //$NON-NLS-1$
425:                         null, 0, -1, VCategorization.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE,
426:                         !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
427:
428:                 initEClass(categoryEClass, VCategory.class, "Category", !IS_ABSTRACT, !IS_INTERFACE, //$NON-NLS-1$
429:                         IS_GENERATED_INSTANCE_CLASS);
430:                 initEReference(getCategory_Composite(), theViewPackage.getContainedElement(), null, "composite", null, 0, 1, //$NON-NLS-1$
431:                         VCategory.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES,
432:                         !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
433:
434:                 initEClass(actionEClass, VAction.class, "Action", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
435:                 initEAttribute(getAction_Bundle(), ecorePackage.getEString(), "bundle", null, 1, 1, VAction.class, //$NON-NLS-1$
436:                         !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
437:                 initEAttribute(getAction_ClassName(), ecorePackage.getEString(), "className", null, 1, 1, VAction.class, //$NON-NLS-1$
438:                         !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
439:
440:                 initEClass(categorizationElementEClass, VCategorizationElement.class, "CategorizationElement", !IS_ABSTRACT, //$NON-NLS-1$
441:                         !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
442:                 initEReference(getCategorizationElement_Categorizations(), this.getAbstractCategorization(), null,
443:                         "categorizations", null, 0, -1, VCategorizationElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, //$NON-NLS-1$
444:                         IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
445:                 initEReference(getCategorizationElement_CurrentSelection(), this.getCategorizableElement(), null,
446:                         "currentSelection", null, 0, 1, VCategorizationElement.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, //$NON-NLS-1$
447:                         !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
448:                 initEAttribute(getCategorizationElement_MainCategoryDepth(), ecorePackage.getEInt(), "mainCategoryDepth", "0", //$NON-NLS-1$ //$NON-NLS-2$
449:                         0, 1, VCategorizationElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID,
450:                         IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
451:
452:                 initEClass(categorizableElementEClass, VCategorizableElement.class, "CategorizableElement", IS_ABSTRACT, //$NON-NLS-1$
453:                         !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
454:                 initEReference(getCategorizableElement_LabelObject(), ecorePackage.getEObject(), null, "labelObject", null, 0, //$NON-NLS-1$
455:                         1, VCategorizableElement.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE,
456:                         !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
457:
458:                 // Create resource
459:                 createResource(eNS_URI);
460:         }
461:
462: } // VCategorizationPackageImpl