Skip to content

Package: VCompoundcontrolPackageImpl

VCompoundcontrolPackageImpl

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