Skip to content

Package: VDiffmergeFactoryImpl

VDiffmergeFactoryImpl

nameinstructionbranchcomplexitylinemethod
VDiffmergeFactoryImpl()
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: 6
30%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 1 C: 2
67%
M: 0 C: 1
100%
createDiffAttachment()
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%
getDiffmergePackage()
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-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: * EclipseSource Munich - initial API and implementation
13: */
14: package org.eclipse.emf.ecp.spi.diffmerge.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.spi.diffmerge.model.VDiffAttachment;
22: import org.eclipse.emf.ecp.spi.diffmerge.model.VDiffmergeFactory;
23: import org.eclipse.emf.ecp.spi.diffmerge.model.VDiffmergePackage;
24:
25: /**
26: * <!-- begin-user-doc --> An implementation of the model <b>Factory</b>. <!--
27: * end-user-doc -->
28: *
29: * @generated
30: */
31: public class VDiffmergeFactoryImpl extends EFactoryImpl implements
32:         VDiffmergeFactory {
33:         /**
34:          * Creates the default factory implementation.
35:          * <!-- begin-user-doc --> <!--
36:          * end-user-doc -->
37:          *
38:          * @generated
39:          */
40:         public static VDiffmergeFactory init() {
41:                 try {
42:                         final VDiffmergeFactory theDiffmergeFactory = (VDiffmergeFactory) EPackage.Registry.INSTANCE
43:                                 .getEFactory(VDiffmergePackage.eNS_URI);
44:•                        if (theDiffmergeFactory != null) {
45:                                 return theDiffmergeFactory;
46:                         }
47:                 } catch (final Exception exception) {
48:                         EcorePlugin.INSTANCE.log(exception);
49:                 }
50:                 return new VDiffmergeFactoryImpl();
51:         }
52:
53:         /**
54:          * Creates an instance of the factory.
55:          * <!-- begin-user-doc --> <!--
56:          * end-user-doc -->
57:          *
58:          * @generated
59:          */
60:         public VDiffmergeFactoryImpl() {
61:                 super();
62:         }
63:
64:         /**
65:          * <!-- begin-user-doc --> <!-- end-user-doc -->
66:          *
67:          * @generated
68:          */
69:         @Override
70:         public EObject create(EClass eClass) {
71:•                switch (eClass.getClassifierID()) {
72:                 case VDiffmergePackage.DIFF_ATTACHMENT:
73:                         return createDiffAttachment();
74:                 default:
75:                         throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
76:                 }
77:         }
78:
79:         /**
80:          * <!-- begin-user-doc --> <!-- end-user-doc -->
81:          *
82:          * @generated
83:          */
84:         @Override
85:         public VDiffAttachment createDiffAttachment() {
86:                 final VDiffAttachmentImpl diffAttachment = new VDiffAttachmentImpl();
87:                 return diffAttachment;
88:         }
89:
90:         /**
91:          * <!-- begin-user-doc --> <!-- end-user-doc -->
92:          *
93:          * @generated
94:          */
95:         @Override
96:         public VDiffmergePackage getDiffmergePackage() {
97:                 return (VDiffmergePackage) getEPackage();
98:         }
99:
100:         /**
101:          * <!-- begin-user-doc --> <!-- end-user-doc -->
102:          *
103:          * @deprecated
104:          * @generated
105:          */
106:         @Deprecated
107:         public static VDiffmergePackage getPackage() {
108:                 return VDiffmergePackage.eINSTANCE;
109:         }
110:
111: } // VDiffmergeFactoryImpl