Skip to content

Package: VTTabPackageImpl

VTTabPackageImpl

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