Skip to content

Package: VTAlignmentPackageImpl

VTAlignmentPackageImpl

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