Skip to content

Package: VCustomFactoryImpl

VCustomFactoryImpl

nameinstructionbranchcomplexitylinemethod
VCustomFactoryImpl()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
create(EClass)
M: 14 C: 9
39%
M: 1 C: 2
67%
M: 1 C: 2
67%
M: 1 C: 3
75%
M: 0 C: 1
100%
createCustomControl()
M: 0 C: 6
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
createCustomDomainModelReference()
M: 0 C: 6
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
getCustomPackage()
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%
getPackage()
M: 2 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: 6 C: 11
65%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 3 C: 4
57%
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.custom.model.impl;
15:
16: import org.eclipse.emf.ecore.EClass;
17: import org.eclipse.emf.ecore.EObject;
18: import org.eclipse.emf.ecore.EPackage;
19: import org.eclipse.emf.ecore.impl.EFactoryImpl;
20: import org.eclipse.emf.ecore.plugin.EcorePlugin;
21: import org.eclipse.emf.ecp.view.spi.custom.model.VCustomControl;
22: import org.eclipse.emf.ecp.view.spi.custom.model.VCustomDomainModelReference;
23: import org.eclipse.emf.ecp.view.spi.custom.model.VCustomFactory;
24: import org.eclipse.emf.ecp.view.spi.custom.model.VCustomPackage;
25:
26: /**
27: * <!-- begin-user-doc -->
28: * An implementation of the model <b>Factory</b>.
29: * <!-- end-user-doc -->
30: *
31: * @generated
32: */
33: public class VCustomFactoryImpl extends EFactoryImpl implements VCustomFactory {
34:         /**
35:          * Creates the default factory implementation.
36:          * <!-- begin-user-doc -->
37:          * <!-- end-user-doc -->
38:          *
39:          * @generated
40:          */
41:         public static VCustomFactory init() {
42:                 try {
43:                         final VCustomFactory theCustomFactory = (VCustomFactory) EPackage.Registry.INSTANCE
44:                                 .getEFactory(VCustomPackage.eNS_URI);
45:•                        if (theCustomFactory != null) {
46:                                 return theCustomFactory;
47:                         }
48:                 } catch (final Exception exception) {
49:                         EcorePlugin.INSTANCE.log(exception);
50:                 }
51:                 return new VCustomFactoryImpl();
52:         }
53:
54:         /**
55:          * Creates an instance of the factory.
56:          * <!-- begin-user-doc -->
57:          * <!-- end-user-doc -->
58:          *
59:          * @generated
60:          */
61:         public VCustomFactoryImpl() {
62:                 super();
63:         }
64:
65:         /**
66:          * <!-- begin-user-doc -->
67:          * <!-- end-user-doc -->
68:          *
69:          * @generated
70:          */
71:         @Override
72:         public EObject create(EClass eClass) {
73:•                switch (eClass.getClassifierID()) {
74:                 case VCustomPackage.CUSTOM_CONTROL:
75:                         return createCustomControl();
76:                 case VCustomPackage.CUSTOM_DOMAIN_MODEL_REFERENCE:
77:                         return createCustomDomainModelReference();
78:                 default:
79:                         throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
80:                 }
81:         }
82:
83:         /**
84:          * <!-- begin-user-doc -->
85:          *
86:          * @since 1.3
87:          * <!-- end-user-doc -->
88:          *
89:          * @generated
90:          */
91:         @Override
92:         public VCustomControl createCustomControl() {
93:                 final VCustomControlImpl customControl = new VCustomControlImpl();
94:                 return customControl;
95:         }
96:
97:         /**
98:          * <!-- begin-user-doc -->
99:          *
100:          * @since 1.3
101:          * <!-- end-user-doc -->
102:          *
103:          * @generated
104:          */
105:         @Override
106:         public VCustomDomainModelReference createCustomDomainModelReference() {
107:                 final VCustomDomainModelReferenceImpl customDomainModelReference = new VCustomDomainModelReferenceImpl();
108:                 return customDomainModelReference;
109:         }
110:
111:         /**
112:          * <!-- begin-user-doc -->
113:          * <!-- end-user-doc -->
114:          *
115:          * @generated
116:          */
117:         @Override
118:         public VCustomPackage getCustomPackage() {
119:                 return (VCustomPackage) getEPackage();
120:         }
121:
122:         /**
123:          * <!-- begin-user-doc -->
124:          * <!-- end-user-doc -->
125:          *
126:          * @deprecated
127:          * @generated
128:          */
129:         @Deprecated
130:         public static VCustomPackage getPackage() {
131:                 return VCustomPackage.eINSTANCE;
132:         }
133:
134: } // VCustomFactoryImpl