Skip to content

Package: VTTextControlEnablementPackageImpl

VTTextControlEnablementPackageImpl

nameinstructionbranchcomplexitylinemethod
VTTextControlEnablementPackageImpl()
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: 17
94%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 1 C: 6
86%
M: 0 C: 1
100%
getTextControlEnablementFactory()
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%
getTextControlEnablementStyleProperty()
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%
getTextControlEnablementStyleProperty_RenderDisableAsEditable()
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: 63
98%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 1 C: 17
94%
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.textControlEnablement.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.textControlEnablement.model.VTTextControlEnablementFactory;
22: import org.eclipse.emf.ecp.view.template.style.textControlEnablement.model.VTTextControlEnablementPackage;
23: import org.eclipse.emf.ecp.view.template.style.textControlEnablement.model.VTTextControlEnablementStyleProperty;
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 VTTextControlEnablementPackageImpl extends EPackageImpl implements VTTextControlEnablementPackage {
33:         /**
34:          * <!-- begin-user-doc -->
35:          * <!-- end-user-doc -->
36:          *
37:          * @generated
38:          */
39:         private EClass textControlEnablementStylePropertyEClass = 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.textControlEnablement.model.VTTextControlEnablementPackage#eNS_URI
52:          * @see #init()
53:          * @generated
54:          */
55:         private VTTextControlEnablementPackageImpl() {
56:                 super(eNS_URI, VTTextControlEnablementFactory.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 VTTextControlEnablementPackage#eINSTANCE} when that field is accessed.
72:          * Clients 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 VTTextControlEnablementPackage init() {
81:•                if (isInited) {
82:                         return (VTTextControlEnablementPackage) EPackage.Registry.INSTANCE
83:                                 .getEPackage(VTTextControlEnablementPackage.eNS_URI);
84:                 }
85:
86:                 // Obtain or create and register package
87:                 final VTTextControlEnablementPackageImpl theTextControlEnablementPackage = (VTTextControlEnablementPackageImpl) (EPackage.Registry.INSTANCE
88:•                        .get(eNS_URI) instanceof VTTextControlEnablementPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI)
89:                                 : new VTTextControlEnablementPackageImpl());
90:
91:                 isInited = true;
92:
93:                 // Initialize simple dependencies
94:                 VTTemplatePackage.eINSTANCE.eClass();
95:
96:                 // Create package meta-data objects
97:                 theTextControlEnablementPackage.createPackageContents();
98:
99:                 // Initialize created meta-data
100:                 theTextControlEnablementPackage.initializePackageContents();
101:
102:                 // Mark meta-data to indicate it can't be changed
103:                 theTextControlEnablementPackage.freeze();
104:
105:                 // Update the registry and return the package
106:                 EPackage.Registry.INSTANCE.put(VTTextControlEnablementPackage.eNS_URI, theTextControlEnablementPackage);
107:                 return theTextControlEnablementPackage;
108:         }
109:
110:         /**
111:          * <!-- begin-user-doc -->
112:          * <!-- end-user-doc -->
113:          *
114:          * @generated
115:          */
116:         @Override
117:         public EClass getTextControlEnablementStyleProperty() {
118:                 return textControlEnablementStylePropertyEClass;
119:         }
120:
121:         /**
122:          * <!-- begin-user-doc -->
123:          * <!-- end-user-doc -->
124:          *
125:          * @generated
126:          */
127:         @Override
128:         public EAttribute getTextControlEnablementStyleProperty_RenderDisableAsEditable() {
129:                 return (EAttribute) textControlEnablementStylePropertyEClass.getEStructuralFeatures().get(0);
130:         }
131:
132:         /**
133:          * <!-- begin-user-doc -->
134:          * <!-- end-user-doc -->
135:          *
136:          * @generated
137:          */
138:         @Override
139:         public VTTextControlEnablementFactory getTextControlEnablementFactory() {
140:                 return (VTTextControlEnablementFactory) getEFactoryInstance();
141:         }
142:
143:         /**
144:          * <!-- begin-user-doc -->
145:          * <!-- end-user-doc -->
146:          *
147:          * @generated
148:          */
149:         private boolean isCreated = false;
150:
151:         /**
152:          * Creates the meta-model objects for the package. This method is
153:          * guarded to have no affect on any invocation but its first.
154:          * <!-- begin-user-doc -->
155:          * <!-- end-user-doc -->
156:          *
157:          * @generated
158:          */
159:         public void createPackageContents() {
160:•                if (isCreated) {
161:                         return;
162:                 }
163:                 isCreated = true;
164:
165:                 // Create classes and their features
166:                 textControlEnablementStylePropertyEClass = createEClass(TEXT_CONTROL_ENABLEMENT_STYLE_PROPERTY);
167:                 createEAttribute(textControlEnablementStylePropertyEClass,
168:                         TEXT_CONTROL_ENABLEMENT_STYLE_PROPERTY__RENDER_DISABLE_AS_EDITABLE);
169:         }
170:
171:         /**
172:          * <!-- begin-user-doc -->
173:          * <!-- end-user-doc -->
174:          *
175:          * @generated
176:          */
177:         private boolean isInitialized = false;
178:
179:         /**
180:          * Complete the initialization of the package and its meta-model. This
181:          * method is guarded to have no affect on any invocation but its first.
182:          * <!-- begin-user-doc -->
183:          * <!-- end-user-doc -->
184:          *
185:          * @generated
186:          */
187:         public void initializePackageContents() {
188:•                if (isInitialized) {
189:                         return;
190:                 }
191:                 isInitialized = true;
192:
193:                 // Initialize package
194:                 setName(eNAME);
195:                 setNsPrefix(eNS_PREFIX);
196:                 setNsURI(eNS_URI);
197:
198:                 // Obtain other dependent packages
199:                 final VTTemplatePackage theTemplatePackage = (VTTemplatePackage) EPackage.Registry.INSTANCE
200:                         .getEPackage(VTTemplatePackage.eNS_URI);
201:
202:                 // Create type parameters
203:
204:                 // Set bounds for type parameters
205:
206:                 // Add supertypes to classes
207:                 textControlEnablementStylePropertyEClass.getESuperTypes().add(theTemplatePackage.getStyleProperty());
208:
209:                 // Initialize classes and features; add operations and parameters
210:                 initEClass(textControlEnablementStylePropertyEClass, VTTextControlEnablementStyleProperty.class,
211:                         "TextControlEnablementStyleProperty", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
212:                 initEAttribute(
213:                         getTextControlEnablementStyleProperty_RenderDisableAsEditable(),
214:                         ecorePackage.getEBoolean(),
215:                         "RenderDisableAsEditable", "false", 0, 1, VTTextControlEnablementStyleProperty.class, !IS_TRANSIENT, //$NON-NLS-1$ //$NON-NLS-2$
216:                         !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
217:
218:                 // Create resource
219:                 createResource(eNS_URI);
220:         }
221:
222: } // VTTextControlEnablementPackageImpl