Skip to content

Package: VCustomPackageImpl

VCustomPackageImpl

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