Skip to content

Package: VViewproxyPackageImpl

VViewproxyPackageImpl

nameinstructionbranchcomplexitylinemethod
VViewproxyPackageImpl()
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%
getViewProxy()
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%
getViewProxy_Id()
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%
getViewproxyFactory()
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: 2 C: 11
85%
M: 0 C: 1
100%
initializePackageContents()
M: 1 C: 67
99%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 1 C: 18
95%
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.viewproxy.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.EcorePackage;
20: import org.eclipse.emf.ecore.impl.EPackageImpl;
21: import org.eclipse.emf.ecp.view.spi.model.VViewPackage;
22: import org.eclipse.emf.ecp.view.spi.viewproxy.model.VViewProxy;
23: import org.eclipse.emf.ecp.view.spi.viewproxy.model.VViewproxyFactory;
24: import org.eclipse.emf.ecp.view.spi.viewproxy.model.VViewproxyPackage;
25:
26: /**
27: * <!-- begin-user-doc -->
28: * An implementation of the model <b>Package</b>.
29: * <!-- end-user-doc -->
30: *
31: * @generated
32: */
33: public class VViewproxyPackageImpl extends EPackageImpl implements VViewproxyPackage {
34:         /**
35:          * <!-- begin-user-doc -->
36:          * <!-- end-user-doc -->
37:          *
38:          * @generated
39:          */
40:         private EClass viewProxyEClass = 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.viewproxy.model.VViewproxyPackage#eNS_URI
53:          * @see #init()
54:          * @generated
55:          */
56:         private VViewproxyPackageImpl() {
57:                 super(eNS_URI, VViewproxyFactory.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 VViewproxyPackage#eINSTANCE} when that field is accessed. Clients should
73:          * not invoke it directly. Instead, they should simply access that field to obtain the package. <!-- begin-user-doc
74:          * --> <!-- end-user-doc -->
75:          *
76:          * @see #eNS_URI
77:          * @see #createPackageContents()
78:          * @see #initializePackageContents()
79:          * @generated
80:          */
81:         public static VViewproxyPackage init() {
82:•                if (isInited) {
83:                         return (VViewproxyPackage) EPackage.Registry.INSTANCE.getEPackage(VViewproxyPackage.eNS_URI);
84:                 }
85:
86:                 // Obtain or create and register package
87:                 final VViewproxyPackageImpl theViewproxyPackage = (VViewproxyPackageImpl) (EPackage.Registry.INSTANCE
88:•                        .get(eNS_URI) instanceof VViewproxyPackageImpl ? EPackage.Registry.INSTANCE
89:                                 .get(eNS_URI)
90:                                 : new VViewproxyPackageImpl());
91:
92:                 isInited = true;
93:
94:                 // Initialize simple dependencies
95:                 VViewPackage.eINSTANCE.eClass();
96:
97:                 // Create package meta-data objects
98:                 theViewproxyPackage.createPackageContents();
99:
100:                 // Initialize created meta-data
101:                 theViewproxyPackage.initializePackageContents();
102:
103:                 // Mark meta-data to indicate it can't be changed
104:                 theViewproxyPackage.freeze();
105:
106:                 // Update the registry and return the package
107:                 EPackage.Registry.INSTANCE.put(VViewproxyPackage.eNS_URI, theViewproxyPackage);
108:                 return theViewproxyPackage;
109:         }
110:
111:         /**
112:          * <!-- begin-user-doc -->
113:          * <!-- end-user-doc -->
114:          *
115:          * @generated
116:          */
117:         @Override
118:         public EClass getViewProxy() {
119:                 return viewProxyEClass;
120:         }
121:
122:         /**
123:          * <!-- begin-user-doc -->
124:          * <!-- end-user-doc -->
125:          *
126:          * @generated
127:          */
128:         @Override
129:         public EAttribute getViewProxy_Id() {
130:                 return (EAttribute) viewProxyEClass.getEStructuralFeatures().get(0);
131:         }
132:
133:         /**
134:          * <!-- begin-user-doc -->
135:          * <!-- end-user-doc -->
136:          *
137:          * @generated
138:          */
139:         @Override
140:         public VViewproxyFactory getViewproxyFactory() {
141:                 return (VViewproxyFactory) getEFactoryInstance();
142:         }
143:
144:         /**
145:          * <!-- begin-user-doc -->
146:          * <!-- end-user-doc -->
147:          *
148:          * @generated
149:          */
150:         private boolean isCreated = false;
151:
152:         /**
153:          * Creates the meta-model objects for the package. This method is
154:          * guarded to have no affect on any invocation but its first.
155:          * <!-- begin-user-doc -->
156:          * <!-- end-user-doc -->
157:          *
158:          * @generated
159:          */
160:         public void createPackageContents() {
161:•                if (isCreated) {
162:                         return;
163:                 }
164:                 isCreated = true;
165:
166:                 // Create classes and their features
167:                 viewProxyEClass = createEClass(VIEW_PROXY);
168:                 createEAttribute(viewProxyEClass, VIEW_PROXY__ID);
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 VViewPackage theViewPackage = (VViewPackage) EPackage.Registry.INSTANCE.getEPackage(VViewPackage.eNS_URI);
200:                 final EcorePackage theEcorePackage = (EcorePackage) EPackage.Registry.INSTANCE
201:                         .getEPackage(EcorePackage.eNS_URI);
202:
203:                 // Create type parameters
204:
205:                 // Set bounds for type parameters
206:
207:                 // Add supertypes to classes
208:                 viewProxyEClass.getESuperTypes().add(theViewPackage.getContainedElement());
209:
210:                 // Initialize classes and features; add operations and parameters
211:                 initEClass(viewProxyEClass, VViewProxy.class,
212:                         "ViewProxy", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
213:                 initEAttribute(
214:                         getViewProxy_Id(),
215:                         theEcorePackage.getEString(),
216:                         "id", null, 1, 1, VViewProxy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, //$NON-NLS-1$
217:                         IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
218:
219:                 // Create resource
220:                 createResource(eNS_URI);
221:         }
222:
223: } // VViewproxyPackageImpl