Skip to content

Package: VHorizontalPackageImpl

VHorizontalPackageImpl

nameinstructionbranchcomplexitylinemethod
VHorizontalPackageImpl()
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: 12
92%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 1 C: 4
80%
M: 0 C: 1
100%
getHorizontalFactory()
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%
getHorizontalLayout()
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: 2 C: 11
85%
M: 0 C: 1
100%
initializePackageContents()
M: 1 C: 42
98%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 1 C: 11
92%
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-2013 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: * Eugen Neufeld - initial API and implementation
13: */
14: package org.eclipse.emf.ecp.view.spi.horizontal.model.impl;
15:
16: import org.eclipse.emf.ecore.EClass;
17: import org.eclipse.emf.ecore.EPackage;
18: import org.eclipse.emf.ecore.impl.EPackageImpl;
19: import org.eclipse.emf.ecp.view.spi.horizontal.model.VHorizontalFactory;
20: import org.eclipse.emf.ecp.view.spi.horizontal.model.VHorizontalLayout;
21: import org.eclipse.emf.ecp.view.spi.horizontal.model.VHorizontalPackage;
22: import org.eclipse.emf.ecp.view.spi.model.VViewPackage;
23:
24: /**
25: * <!-- begin-user-doc -->
26: * An implementation of the model <b>Package</b>.
27: *
28: * @since 1.2
29: * <!-- end-user-doc -->
30: *
31: * @generated
32: */
33: public class VHorizontalPackageImpl extends EPackageImpl implements VHorizontalPackage {
34:         /**
35:          * <!-- begin-user-doc -->
36:          * <!-- end-user-doc -->
37:          *
38:          * @generated
39:          */
40:         private EClass horizontalLayoutEClass = null;
41:
42:         /**
43:          * Creates an instance of the model <b>Package</b>, registered with {@link org.eclipse.emf.ecore.EPackage.Registry
44:          * EPackage.Registry} by the package
45:          * package URI value.
46:          * <p>
47:          * Note: the correct way to create the package is via the static factory method {@link #init init()}, which also
48:          * performs initialization of the package, or returns the registered package, if one already exists. <!--
49:          * begin-user-doc --> <!-- end-user-doc -->
50:          *
51:          * @see org.eclipse.emf.ecore.EPackage.Registry
52:          * @see org.eclipse.emf.ecp.view.spi.horizontal.model.VHorizontalPackage#eNS_URI
53:          * @see #init()
54:          * @generated
55:          */
56:         private VHorizontalPackageImpl() {
57:                 super(eNS_URI, VHorizontalFactory.eINSTANCE);
58:         }
59:
60:         /**
61:          * <!-- begin-user-doc -->
62:          * <!-- end-user-doc -->
63:          *
64:          * @generated
65:          */
66:         private static boolean isInited = false;
67:
68:         /**
69:          * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
70:          *
71:          * <p>
72:          * This method is used to initialize {@link VHorizontalPackage#eINSTANCE} when that field is accessed. Clients
73:          * should not invoke it directly. Instead, they should simply access that field to obtain the package. <!--
74:          * begin-user-doc --> <!-- end-user-doc -->
75:          *
76:          * @see #eNS_URI
77:          * @see #createPackageContents()
78:          * @see #initializePackageContents()
79:          * @generated
80:          */
81:         public static VHorizontalPackage init() {
82:•                if (isInited) {
83:                         return (VHorizontalPackage) EPackage.Registry.INSTANCE.getEPackage(VHorizontalPackage.eNS_URI);
84:                 }
85:
86:                 // Obtain or create and register package
87:                 final VHorizontalPackageImpl theHorizontalPackage = (VHorizontalPackageImpl) (EPackage.Registry.INSTANCE
88:•                        .get(eNS_URI) instanceof VHorizontalPackageImpl ? EPackage.Registry.INSTANCE
89:                                 .get(eNS_URI)
90:                                 : new VHorizontalPackageImpl());
91:
92:                 isInited = true;
93:
94:                 // Initialize simple dependencies
95:                 VViewPackage.eINSTANCE.eClass();
96:
97:                 // Create package meta-data objects
98:                 theHorizontalPackage.createPackageContents();
99:
100:                 // Initialize created meta-data
101:                 theHorizontalPackage.initializePackageContents();
102:
103:                 // Mark meta-data to indicate it can't be changed
104:                 theHorizontalPackage.freeze();
105:
106:                 // Update the registry and return the package
107:                 EPackage.Registry.INSTANCE.put(VHorizontalPackage.eNS_URI, theHorizontalPackage);
108:                 return theHorizontalPackage;
109:         }
110:
111:         /**
112:          * <!-- begin-user-doc -->
113:          * <!-- end-user-doc -->
114:          *
115:          * @generated
116:          */
117:         @Override
118:         public EClass getHorizontalLayout() {
119:                 return horizontalLayoutEClass;
120:         }
121:
122:         /**
123:          * <!-- begin-user-doc -->
124:          * <!-- end-user-doc -->
125:          *
126:          * @generated
127:          */
128:         @Override
129:         public VHorizontalFactory getHorizontalFactory() {
130:                 return (VHorizontalFactory) getEFactoryInstance();
131:         }
132:
133:         /**
134:          * <!-- begin-user-doc -->
135:          * <!-- end-user-doc -->
136:          *
137:          * @generated
138:          */
139:         private boolean isCreated = false;
140:
141:         /**
142:          * Creates the meta-model objects for the package. This method is
143:          * guarded to have no affect on any invocation but its first.
144:          * <!-- begin-user-doc -->
145:          * <!-- end-user-doc -->
146:          *
147:          * @generated
148:          */
149:         public void createPackageContents() {
150:•                if (isCreated) {
151:                         return;
152:                 }
153:                 isCreated = true;
154:
155:                 // Create classes and their features
156:                 horizontalLayoutEClass = createEClass(HORIZONTAL_LAYOUT);
157:         }
158:
159:         /**
160:          * <!-- begin-user-doc -->
161:          * <!-- end-user-doc -->
162:          *
163:          * @generated
164:          */
165:         private boolean isInitialized = false;
166:
167:         /**
168:          * Complete the initialization of the package and its meta-model. This
169:          * method is guarded to have no affect on any invocation but its first.
170:          * <!-- begin-user-doc -->
171:          * <!-- end-user-doc -->
172:          *
173:          * @generated
174:          */
175:         public void initializePackageContents() {
176:•                if (isInitialized) {
177:                         return;
178:                 }
179:                 isInitialized = true;
180:
181:                 // Initialize package
182:                 setName(eNAME);
183:                 setNsPrefix(eNS_PREFIX);
184:                 setNsURI(eNS_URI);
185:
186:                 // Obtain other dependent packages
187:                 final VViewPackage theViewPackage = (VViewPackage) EPackage.Registry.INSTANCE.getEPackage(VViewPackage.eNS_URI);
188:
189:                 // Create type parameters
190:
191:                 // Set bounds for type parameters
192:
193:                 // Add supertypes to classes
194:                 horizontalLayoutEClass.getESuperTypes().add(theViewPackage.getContainedContainer());
195:
196:                 // Initialize classes and features; add operations and parameters
197:                 initEClass(horizontalLayoutEClass, VHorizontalLayout.class,
198:                         "HorizontalLayout", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
199:
200:                 // Create resource
201:                 createResource(eNS_URI);
202:         }
203:
204: } // VHorizontalPackageImpl