Skip to content

Package: VTTableStylePropertyPackageImpl

VTTableStylePropertyPackageImpl

nameinstructionbranchcomplexitylinemethod
VTTableStylePropertyPackageImpl()
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%
getRenderMode()
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%
getTableStyleProperty()
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%
getTableStylePropertyFactory()
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%
getTableStyleProperty_EnableSorting()
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%
getTableStyleProperty_MaximumHeight()
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%
getTableStyleProperty_MinimumHeight()
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%
getTableStyleProperty_RenderMode()
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%
getTableStyleProperty_ShowValidationSummaryTooltip()
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%
getTableStyleProperty_VisibleLines()
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: 2 C: 11
85%
M: 0 C: 1
100%
initializePackageContents()
M: 1 C: 184
99%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 1 C: 33
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-2016 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.tableStyleProperty.model.impl;
15:
16: import org.eclipse.emf.ecore.EAttribute;
17: import org.eclipse.emf.ecore.EClass;
18: import org.eclipse.emf.ecore.EEnum;
19: import org.eclipse.emf.ecore.EPackage;
20: import org.eclipse.emf.ecore.impl.EPackageImpl;
21: import org.eclipse.emf.ecp.view.template.model.VTTemplatePackage;
22: import org.eclipse.emf.ecp.view.template.style.tableStyleProperty.model.RenderMode;
23: import org.eclipse.emf.ecp.view.template.style.tableStyleProperty.model.VTTableStyleProperty;
24: import org.eclipse.emf.ecp.view.template.style.tableStyleProperty.model.VTTableStylePropertyFactory;
25: import org.eclipse.emf.ecp.view.template.style.tableStyleProperty.model.VTTableStylePropertyPackage;
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 VTTableStylePropertyPackageImpl extends EPackageImpl implements VTTableStylePropertyPackage {
35:         /**
36:          * <!-- begin-user-doc -->
37:          * <!-- end-user-doc -->
38:          *
39:          * @generated
40:          */
41:         private EClass tableStylePropertyEClass = null;
42:
43:         /**
44:          * <!-- begin-user-doc -->
45:          * <!-- end-user-doc -->
46:          *
47:          * @generated
48:          */
49:         private EEnum renderModeEEnum = null;
50:
51:         /**
52:          * Creates an instance of the model <b>Package</b>, registered with
53:          * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
54:          * package URI value.
55:          * <p>
56:          * Note: the correct way to create the package is via the static
57:          * factory method {@link #init init()}, which also performs
58:          * initialization of the package, or returns the registered package,
59:          * if one already exists.
60:          * <!-- begin-user-doc -->
61:          * <!-- end-user-doc -->
62:          *
63:          * @see org.eclipse.emf.ecore.EPackage.Registry
64:          * @see org.eclipse.emf.ecp.view.template.style.tableStyleProperty.model.VTTableStylePropertyPackage#eNS_URI
65:          * @see #init()
66:          * @generated
67:          */
68:         private VTTableStylePropertyPackageImpl() {
69:                 super(eNS_URI, VTTableStylePropertyFactory.eINSTANCE);
70:         }
71:
72:         /**
73:          * <!-- begin-user-doc -->
74:          * <!-- end-user-doc -->
75:          *
76:          * @generated
77:          */
78:         private static boolean isInited = false;
79:
80:         /**
81:          * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
82:          *
83:          * <p>
84:          * This method is used to initialize {@link VTTableStylePropertyPackage#eINSTANCE} when that field is accessed.
85:          * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
86:          * <!-- begin-user-doc -->
87:          * <!-- end-user-doc -->
88:          *
89:          * @see #eNS_URI
90:          * @see #createPackageContents()
91:          * @see #initializePackageContents()
92:          * @generated
93:          */
94:         public static VTTableStylePropertyPackage init() {
95:•                if (isInited) {
96:                         return (VTTableStylePropertyPackage) EPackage.Registry.INSTANCE
97:                                 .getEPackage(VTTableStylePropertyPackage.eNS_URI);
98:                 }
99:
100:                 // Obtain or create and register package
101:                 final VTTableStylePropertyPackageImpl theTableStylePropertyPackage = (VTTableStylePropertyPackageImpl) (EPackage.Registry.INSTANCE
102:•                        .get(eNS_URI) instanceof VTTableStylePropertyPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI)
103:                                 : new VTTableStylePropertyPackageImpl());
104:
105:                 isInited = true;
106:
107:                 // Initialize simple dependencies
108:                 VTTemplatePackage.eINSTANCE.eClass();
109:
110:                 // Create package meta-data objects
111:                 theTableStylePropertyPackage.createPackageContents();
112:
113:                 // Initialize created meta-data
114:                 theTableStylePropertyPackage.initializePackageContents();
115:
116:                 // Mark meta-data to indicate it can't be changed
117:                 theTableStylePropertyPackage.freeze();
118:
119:                 // Update the registry and return the package
120:                 EPackage.Registry.INSTANCE.put(VTTableStylePropertyPackage.eNS_URI, theTableStylePropertyPackage);
121:                 return theTableStylePropertyPackage;
122:         }
123:
124:         /**
125:          * <!-- begin-user-doc -->
126:          * <!-- end-user-doc -->
127:          *
128:          * @generated
129:          */
130:         @Override
131:         public EClass getTableStyleProperty() {
132:                 return tableStylePropertyEClass;
133:         }
134:
135:         /**
136:          * <!-- begin-user-doc -->
137:          * <!-- end-user-doc -->
138:          *
139:          * @generated
140:          */
141:         @Override
142:         public EAttribute getTableStyleProperty_MinimumHeight() {
143:                 return (EAttribute) tableStylePropertyEClass.getEStructuralFeatures().get(0);
144:         }
145:
146:         /**
147:          * <!-- begin-user-doc -->
148:          * <!-- end-user-doc -->
149:          *
150:          * @generated
151:          */
152:         @Override
153:         public EAttribute getTableStyleProperty_MaximumHeight() {
154:                 return (EAttribute) tableStylePropertyEClass.getEStructuralFeatures().get(1);
155:         }
156:
157:         /**
158:          * <!-- begin-user-doc -->
159:          * <!-- end-user-doc -->
160:          *
161:          * @generated
162:          */
163:         @Override
164:         public EAttribute getTableStyleProperty_ShowValidationSummaryTooltip() {
165:                 return (EAttribute) tableStylePropertyEClass.getEStructuralFeatures().get(2);
166:         }
167:
168:         /**
169:          * <!-- begin-user-doc -->
170:          * <!-- end-user-doc -->
171:          *
172:          * @generated
173:          */
174:         @Override
175:         public EAttribute getTableStyleProperty_EnableSorting() {
176:                 return (EAttribute) tableStylePropertyEClass.getEStructuralFeatures().get(3);
177:         }
178:
179:         /**
180:          * <!-- begin-user-doc -->
181:          * <!-- end-user-doc -->
182:          *
183:          * @generated
184:          */
185:         @Override
186:         public EAttribute getTableStyleProperty_VisibleLines() {
187:                 return (EAttribute) tableStylePropertyEClass.getEStructuralFeatures().get(4);
188:         }
189:
190:         /**
191:          * <!-- begin-user-doc -->
192:          * <!-- end-user-doc -->
193:          *
194:          * @generated
195:          */
196:         @Override
197:         public EAttribute getTableStyleProperty_RenderMode() {
198:                 return (EAttribute) tableStylePropertyEClass.getEStructuralFeatures().get(5);
199:         }
200:
201:         /**
202:          * <!-- begin-user-doc -->
203:          * <!-- end-user-doc -->
204:          *
205:          * @generated
206:          */
207:         @Override
208:         public EEnum getRenderMode() {
209:                 return renderModeEEnum;
210:         }
211:
212:         /**
213:          * <!-- begin-user-doc -->
214:          * <!-- end-user-doc -->
215:          *
216:          * @generated
217:          */
218:         @Override
219:         public VTTableStylePropertyFactory getTableStylePropertyFactory() {
220:                 return (VTTableStylePropertyFactory) getEFactoryInstance();
221:         }
222:
223:         /**
224:          * <!-- begin-user-doc -->
225:          * <!-- end-user-doc -->
226:          *
227:          * @generated
228:          */
229:         private boolean isCreated = false;
230:
231:         /**
232:          * Creates the meta-model objects for the package. This method is
233:          * guarded to have no affect on any invocation but its first.
234:          * <!-- begin-user-doc -->
235:          * <!-- end-user-doc -->
236:          *
237:          * @generated
238:          */
239:         public void createPackageContents() {
240:•                if (isCreated) {
241:                         return;
242:                 }
243:                 isCreated = true;
244:
245:                 // Create classes and their features
246:                 tableStylePropertyEClass = createEClass(TABLE_STYLE_PROPERTY);
247:                 createEAttribute(tableStylePropertyEClass, TABLE_STYLE_PROPERTY__MINIMUM_HEIGHT);
248:                 createEAttribute(tableStylePropertyEClass, TABLE_STYLE_PROPERTY__MAXIMUM_HEIGHT);
249:                 createEAttribute(tableStylePropertyEClass, TABLE_STYLE_PROPERTY__SHOW_VALIDATION_SUMMARY_TOOLTIP);
250:                 createEAttribute(tableStylePropertyEClass, TABLE_STYLE_PROPERTY__ENABLE_SORTING);
251:                 createEAttribute(tableStylePropertyEClass, TABLE_STYLE_PROPERTY__VISIBLE_LINES);
252:                 createEAttribute(tableStylePropertyEClass, TABLE_STYLE_PROPERTY__RENDER_MODE);
253:
254:                 // Create enums
255:                 renderModeEEnum = createEEnum(RENDER_MODE);
256:         }
257:
258:         /**
259:          * <!-- begin-user-doc -->
260:          * <!-- end-user-doc -->
261:          *
262:          * @generated
263:          */
264:         private boolean isInitialized = false;
265:
266:         /**
267:          * Complete the initialization of the package and its meta-model. This
268:          * method is guarded to have no affect on any invocation but its first.
269:          * <!-- begin-user-doc -->
270:          * <!-- end-user-doc -->
271:          *
272:          * @generated
273:          */
274:         public void initializePackageContents() {
275:•                if (isInitialized) {
276:                         return;
277:                 }
278:                 isInitialized = true;
279:
280:                 // Initialize package
281:                 setName(eNAME);
282:                 setNsPrefix(eNS_PREFIX);
283:                 setNsURI(eNS_URI);
284:
285:                 // Obtain other dependent packages
286:                 final VTTemplatePackage theTemplatePackage = (VTTemplatePackage) EPackage.Registry.INSTANCE
287:                         .getEPackage(VTTemplatePackage.eNS_URI);
288:
289:                 // Create type parameters
290:
291:                 // Set bounds for type parameters
292:
293:                 // Add supertypes to classes
294:                 tableStylePropertyEClass.getESuperTypes().add(theTemplatePackage.getStyleProperty());
295:
296:                 // Initialize classes, features, and operations; add parameters
297:                 initEClass(tableStylePropertyEClass, VTTableStyleProperty.class, "TableStyleProperty", !IS_ABSTRACT, //$NON-NLS-1$
298:                         !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
299:                 initEAttribute(getTableStyleProperty_MinimumHeight(), ecorePackage.getEInt(), "minimumHeight", null, 0, 1, //$NON-NLS-1$
300:                         VTTableStyleProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
301:                         !IS_DERIVED, IS_ORDERED);
302:                 initEAttribute(getTableStyleProperty_MaximumHeight(), ecorePackage.getEInt(), "maximumHeight", null, 0, 1, //$NON-NLS-1$
303:                         VTTableStyleProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
304:                         !IS_DERIVED, IS_ORDERED);
305:                 initEAttribute(getTableStyleProperty_ShowValidationSummaryTooltip(), ecorePackage.getEBoolean(),
306:                         "showValidationSummaryTooltip", null, 0, 1, VTTableStyleProperty.class, !IS_TRANSIENT, !IS_VOLATILE, //$NON-NLS-1$
307:                         IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
308:                 initEAttribute(getTableStyleProperty_EnableSorting(), ecorePackage.getEBoolean(), "enableSorting", "true", 0, 1, //$NON-NLS-1$ //$NON-NLS-2$
309:                         VTTableStyleProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
310:                         !IS_DERIVED, IS_ORDERED);
311:                 initEAttribute(getTableStyleProperty_VisibleLines(), ecorePackage.getEInt(), "visibleLines", null, 0, 1, //$NON-NLS-1$
312:                         VTTableStyleProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
313:                         !IS_DERIVED, IS_ORDERED);
314:                 initEAttribute(getTableStyleProperty_RenderMode(), getRenderMode(), "renderMode", null, 0, 1, //$NON-NLS-1$
315:                         VTTableStyleProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
316:                         !IS_DERIVED, IS_ORDERED);
317:
318:                 // Initialize enums and add enum literals
319:                 initEEnum(renderModeEEnum, RenderMode.class, "RenderMode"); //$NON-NLS-1$
320:                 addEEnumLiteral(renderModeEEnum, RenderMode.DEFAULT);
321:                 addEEnumLiteral(renderModeEEnum, RenderMode.COMPACT_VERTICALLY);
322:
323:                 // Create resource
324:                 createResource(eNS_URI);
325:         }
326:
327: } // VTTableStylePropertyPackageImpl