Skip to content

Package: VIndexdmrPackageImpl

VIndexdmrPackageImpl

nameinstructionbranchcomplexitylinemethod
VIndexdmrPackageImpl()
M: 0 C: 14
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
createEcoreAnnotations()
M: 0 C: 18
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
createPackageContents()
M: 1 C: 27
96%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 1 C: 7
88%
M: 0 C: 1
100%
getIndexDomainModelReference()
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%
getIndexDomainModelReference_Index()
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%
getIndexDomainModelReference_PrefixDMR()
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%
getIndexDomainModelReference_TargetDMR()
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%
getIndexdmrFactory()
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%
init()
M: 9 C: 37
80%
M: 2 C: 2
50%
M: 2 C: 1
33%
M: 2 C: 13
87%
M: 0 C: 1
100%
initializePackageContents()
M: 1 C: 109
99%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 1 C: 29
97%
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-2014 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.indexdmr.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.EValidator;
21: import org.eclipse.emf.ecore.impl.EPackageImpl;
22: import org.eclipse.emf.ecp.view.spi.indexdmr.model.VIndexDomainModelReference;
23: import org.eclipse.emf.ecp.view.spi.indexdmr.model.VIndexdmrFactory;
24: import org.eclipse.emf.ecp.view.spi.indexdmr.model.VIndexdmrPackage;
25: import org.eclipse.emf.ecp.view.spi.indexdmr.model.util.IndexdmrValidator;
26: import org.eclipse.emf.ecp.view.spi.model.VViewPackage;
27:
28: /**
29: * <!-- begin-user-doc -->
30: * An implementation of the model <b>Package</b>.
31: * <!-- end-user-doc -->
32: *
33: * @generated
34: */
35: public class VIndexdmrPackageImpl extends EPackageImpl implements VIndexdmrPackage {
36:         /**
37:          * <!-- begin-user-doc -->
38:          * <!-- end-user-doc -->
39:          *
40:          * @generated
41:          */
42:         private EClass indexDomainModelReferenceEClass = null;
43:
44:         /**
45:          * Creates an instance of the model <b>Package</b>, registered with {@link org.eclipse.emf.ecore.EPackage.Registry
46:          * EPackage.Registry} by the package
47:          * package URI value.
48:          * <p>
49:          * Note: the correct way to create the package is via the static factory method {@link #init init()}, which also
50:          * performs initialization of the package, or returns the registered package, if one already exists. <!--
51:          * begin-user-doc --> <!-- end-user-doc -->
52:          *
53:          * @see org.eclipse.emf.ecore.EPackage.Registry
54:          * @see org.eclipse.emf.ecp.view.spi.indexdmr.model.VIndexdmrPackage#eNS_URI
55:          * @see #init()
56:          * @generated
57:          */
58:         private VIndexdmrPackageImpl() {
59:                 super(eNS_URI, VIndexdmrFactory.eINSTANCE);
60:         }
61:
62:         /**
63:          * <!-- begin-user-doc -->
64:          * <!-- end-user-doc -->
65:          *
66:          * @generated
67:          */
68:         private static boolean isInited = false;
69:
70:         /**
71:          * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
72:          *
73:          * <p>
74:          * This method is used to initialize {@link VIndexdmrPackage#eINSTANCE} when that field is accessed. Clients should
75:          * not invoke it directly. Instead, they should simply access that field to obtain the package. <!-- begin-user-doc
76:          * --> <!-- end-user-doc -->
77:          *
78:          * @see #eNS_URI
79:          * @see #createPackageContents()
80:          * @see #initializePackageContents()
81:          * @generated
82:          */
83:         public static VIndexdmrPackage init() {
84:•                if (isInited) {
85:                         return (VIndexdmrPackage) EPackage.Registry.INSTANCE.getEPackage(VIndexdmrPackage.eNS_URI);
86:                 }
87:
88:                 // Obtain or create and register package
89:                 final VIndexdmrPackageImpl theIndexdmrPackage = (VIndexdmrPackageImpl) (EPackage.Registry.INSTANCE
90:•                        .get(eNS_URI) instanceof VIndexdmrPackageImpl ? EPackage.Registry.INSTANCE
91:                                 .get(eNS_URI)
92:                                 : new VIndexdmrPackageImpl());
93:
94:                 isInited = true;
95:
96:                 // Initialize simple dependencies
97:                 VViewPackage.eINSTANCE.eClass();
98:
99:                 // Create package meta-data objects
100:                 theIndexdmrPackage.createPackageContents();
101:
102:                 // Initialize created meta-data
103:                 theIndexdmrPackage.initializePackageContents();
104:
105:                 // Register package validator
106:                 EValidator.Registry.INSTANCE.put(theIndexdmrPackage,
107:                         new EValidator.Descriptor() {
108:                                 @Override
109:                                 public EValidator getEValidator() {
110:                                         return IndexdmrValidator.INSTANCE;
111:                                 }
112:                         });
113:
114:                 // Mark meta-data to indicate it can't be changed
115:                 theIndexdmrPackage.freeze();
116:
117:                 // Update the registry and return the package
118:                 EPackage.Registry.INSTANCE.put(VIndexdmrPackage.eNS_URI, theIndexdmrPackage);
119:                 return theIndexdmrPackage;
120:         }
121:
122:         /**
123:          * <!-- begin-user-doc -->
124:          * <!-- end-user-doc -->
125:          *
126:          * @generated
127:          */
128:         @Override
129:         public EClass getIndexDomainModelReference() {
130:                 return indexDomainModelReferenceEClass;
131:         }
132:
133:         /**
134:          * <!-- begin-user-doc -->
135:          * <!-- end-user-doc -->
136:          *
137:          * @generated
138:          */
139:         @Override
140:         public EReference getIndexDomainModelReference_PrefixDMR() {
141:                 return (EReference) indexDomainModelReferenceEClass.getEStructuralFeatures().get(0);
142:         }
143:
144:         /**
145:          * <!-- begin-user-doc -->
146:          * <!-- end-user-doc -->
147:          *
148:          * @generated
149:          */
150:         @Override
151:         public EReference getIndexDomainModelReference_TargetDMR() {
152:                 return (EReference) indexDomainModelReferenceEClass.getEStructuralFeatures().get(2);
153:         }
154:
155:         /**
156:          * <!-- begin-user-doc -->
157:          * <!-- end-user-doc -->
158:          *
159:          * @generated
160:          */
161:         @Override
162:         public EAttribute getIndexDomainModelReference_Index() {
163:                 return (EAttribute) indexDomainModelReferenceEClass.getEStructuralFeatures().get(1);
164:         }
165:
166:         /**
167:          * <!-- begin-user-doc -->
168:          * <!-- end-user-doc -->
169:          *
170:          * @generated
171:          */
172:         @Override
173:         public VIndexdmrFactory getIndexdmrFactory() {
174:                 return (VIndexdmrFactory) getEFactoryInstance();
175:         }
176:
177:         /**
178:          * <!-- begin-user-doc -->
179:          * <!-- end-user-doc -->
180:          *
181:          * @generated
182:          */
183:         private boolean isCreated = false;
184:
185:         /**
186:          * Creates the meta-model objects for the package. This method is
187:          * guarded to have no affect on any invocation but its first.
188:          * <!-- begin-user-doc -->
189:          * <!-- end-user-doc -->
190:          *
191:          * @generated
192:          */
193:         public void createPackageContents() {
194:•                if (isCreated) {
195:                         return;
196:                 }
197:                 isCreated = true;
198:
199:                 // Create classes and their features
200:                 indexDomainModelReferenceEClass = createEClass(INDEX_DOMAIN_MODEL_REFERENCE);
201:                 createEReference(indexDomainModelReferenceEClass, INDEX_DOMAIN_MODEL_REFERENCE__PREFIX_DMR);
202:                 createEAttribute(indexDomainModelReferenceEClass, INDEX_DOMAIN_MODEL_REFERENCE__INDEX);
203:                 createEReference(indexDomainModelReferenceEClass, INDEX_DOMAIN_MODEL_REFERENCE__TARGET_DMR);
204:         }
205:
206:         /**
207:          * <!-- begin-user-doc -->
208:          * <!-- end-user-doc -->
209:          *
210:          * @generated
211:          */
212:         private boolean isInitialized = false;
213:
214:         /**
215:          * Complete the initialization of the package and its meta-model. This
216:          * method is guarded to have no affect on any invocation but its first.
217:          * <!-- begin-user-doc -->
218:          * <!-- end-user-doc -->
219:          *
220:          * @generated
221:          */
222:         public void initializePackageContents() {
223:•                if (isInitialized) {
224:                         return;
225:                 }
226:                 isInitialized = true;
227:
228:                 // Initialize package
229:                 setName(eNAME);
230:                 setNsPrefix(eNS_PREFIX);
231:                 setNsURI(eNS_URI);
232:
233:                 // Obtain other dependent packages
234:                 final VViewPackage theViewPackage = (VViewPackage) EPackage.Registry.INSTANCE.getEPackage(VViewPackage.eNS_URI);
235:
236:                 // Create type parameters
237:
238:                 // Set bounds for type parameters
239:
240:                 // Add supertypes to classes
241:                 indexDomainModelReferenceEClass.getESuperTypes().add(theViewPackage.getFeaturePathDomainModelReference());
242:
243:                 // Initialize classes and features; add operations and parameters
244:                 initEClass(indexDomainModelReferenceEClass, VIndexDomainModelReference.class,
245:                         "IndexDomainModelReference", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
246:                 initEReference(
247:                         getIndexDomainModelReference_PrefixDMR(),
248:                         theViewPackage.getDomainModelReference(),
249:                         null,
250:                         "prefixDMR", null, 1, 1, VIndexDomainModelReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, //$NON-NLS-1$
251:                         IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
252:                 initEAttribute(
253:                         getIndexDomainModelReference_Index(),
254:                         ecorePackage.getEInt(),
255:                         "index", null, 0, 1, VIndexDomainModelReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, //$NON-NLS-1$
256:                         !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
257:                 initEReference(
258:                         getIndexDomainModelReference_TargetDMR(),
259:                         theViewPackage.getDomainModelReference(),
260:                         null,
261:                         "targetDMR", null, 1, 1, VIndexDomainModelReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, //$NON-NLS-1$
262:                         IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
263:
264:                 // Create resource
265:                 createResource(eNS_URI);
266:
267:                 // Create annotations
268:                 // http://www.eclipse.org/emf/2002/Ecore
269:                 createEcoreAnnotations();
270:         }
271:
272:         /**
273:          * Initializes the annotations for <b>http://www.eclipse.org/emf/2002/Ecore</b>.
274:          * <!-- begin-user-doc -->
275:          * <!-- end-user-doc -->
276:          *
277:          * @generated
278:          */
279:         protected void createEcoreAnnotations() {
280:                 final String source = "http://www.eclipse.org/emf/2002/Ecore"; //$NON-NLS-1$
281:                 addAnnotation(indexDomainModelReferenceEClass,
282:                         source,
283:                         new String[] { "constraints", "resolveable" //$NON-NLS-1$ //$NON-NLS-2$
284:                         });
285:         }
286:
287: } // VIndexdmrPackageImpl