Skip to content

Package: VTTableValidationPackageImpl

VTTableValidationPackageImpl

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