Skip to content

Package: VTViewModelElementPackageImpl

VTViewModelElementPackageImpl

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