Skip to content

Package: LabelwidthAdapterFactory$1

LabelwidthAdapterFactory$1

nameinstructionbranchcomplexitylinemethod
caseLabelWidthStyleProperty(VTLabelWidthStyleProperty)
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%
caseStyleProperty(VTStyleProperty)
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%
defaultCase(EObject)
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%
{...}
M: 6 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /**
2: * Copyright (c) 2011-2017 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.template.style.labelwidth.model.util;
15:
16: import org.eclipse.emf.common.notify.Adapter;
17: import org.eclipse.emf.common.notify.Notifier;
18: import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
19: import org.eclipse.emf.ecore.EObject;
20: import org.eclipse.emf.ecp.view.template.model.VTStyleProperty;
21: import org.eclipse.emf.ecp.view.template.style.labelwidth.model.VTLabelWidthStyleProperty;
22: import org.eclipse.emf.ecp.view.template.style.labelwidth.model.VTLabelwidthPackage;
23:
24: /**
25: * <!-- begin-user-doc -->
26: * The <b>Adapter Factory</b> for the model.
27: * It provides an adapter <code>createXXX</code> method for each class of the model.
28: * <!-- end-user-doc -->
29: *
30: * @see org.eclipse.emf.ecp.view.template.style.labelwidth.model.VTLabelwidthPackage
31: * @generated
32: */
33: public class LabelwidthAdapterFactory extends AdapterFactoryImpl {
34:         /**
35:          * The cached model package.
36:          * <!-- begin-user-doc -->
37:          * <!-- end-user-doc -->
38:          *
39:          * @generated
40:          */
41:         protected static VTLabelwidthPackage modelPackage;
42:
43:         /**
44:          * Creates an instance of the adapter factory.
45:          * <!-- begin-user-doc -->
46:          * <!-- end-user-doc -->
47:          *
48:          * @generated
49:          */
50:         public LabelwidthAdapterFactory() {
51:                 if (modelPackage == null) {
52:                         modelPackage = VTLabelwidthPackage.eINSTANCE;
53:                 }
54:         }
55:
56:         /**
57:          * Returns whether this factory is applicable for the type of the object.
58:          * <!-- begin-user-doc -->
59:          * This implementation returns <code>true</code> if the object is either the model's package or is an instance
60:          * object of the model.
61:          * <!-- end-user-doc -->
62:          *
63:          * @return whether this factory is applicable for the type of the object.
64:          * @generated
65:          */
66:         @Override
67:         public boolean isFactoryForType(Object object) {
68:                 if (object == modelPackage) {
69:                         return true;
70:                 }
71:                 if (object instanceof EObject) {
72:                         return ((EObject) object).eClass().getEPackage() == modelPackage;
73:                 }
74:                 return false;
75:         }
76:
77:         /**
78:          * The switch that delegates to the <code>createXXX</code> methods.
79:          * <!-- begin-user-doc -->
80:          * <!-- end-user-doc -->
81:          *
82:          * @generated
83:          */
84:         protected LabelwidthSwitch<Adapter> modelSwitch = new LabelwidthSwitch<Adapter>() {
85:                 @Override
86:                 public Adapter caseLabelWidthStyleProperty(VTLabelWidthStyleProperty object) {
87:                         return createLabelWidthStylePropertyAdapter();
88:                 }
89:
90:                 @Override
91:                 public Adapter caseStyleProperty(VTStyleProperty object) {
92:                         return createStylePropertyAdapter();
93:                 }
94:
95:                 @Override
96:                 public Adapter defaultCase(EObject object) {
97:                         return createEObjectAdapter();
98:                 }
99:         };
100:
101:         /**
102:          * Creates an adapter for the <code>target</code>.
103:          * <!-- begin-user-doc -->
104:          * <!-- end-user-doc -->
105:          *
106:          * @param target the object to adapt.
107:          * @return the adapter for the <code>target</code>.
108:          * @generated
109:          */
110:         @Override
111:         public Adapter createAdapter(Notifier target) {
112:                 return modelSwitch.doSwitch((EObject) target);
113:         }
114:
115:         /**
116:          * Creates a new adapter for an object of class
117:          * '{@link org.eclipse.emf.ecp.view.template.style.labelwidth.model.VTLabelWidthStyleProperty <em>Label Width Style
118:          * Property</em>}'.
119:          * <!-- begin-user-doc -->
120:          * This default implementation returns null so that we can easily ignore cases;
121:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
122:          * <!-- end-user-doc -->
123:          *
124:          * @return the new adapter.
125:          * @see org.eclipse.emf.ecp.view.template.style.labelwidth.model.VTLabelWidthStyleProperty
126:          * @generated
127:          */
128:         public Adapter createLabelWidthStylePropertyAdapter() {
129:                 return null;
130:         }
131:
132:         /**
133:          * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.view.template.model.VTStyleProperty
134:          * <em>Style Property</em>}'.
135:          * <!-- begin-user-doc -->
136:          * This default implementation returns null so that we can easily ignore cases;
137:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
138:          * <!-- end-user-doc -->
139:          *
140:          * @return the new adapter.
141:          * @see org.eclipse.emf.ecp.view.template.model.VTStyleProperty
142:          * @generated
143:          */
144:         public Adapter createStylePropertyAdapter() {
145:                 return null;
146:         }
147:
148:         /**
149:          * Creates a new adapter for the default case.
150:          * <!-- begin-user-doc -->
151:          * This default implementation returns null.
152:          * <!-- end-user-doc -->
153:          *
154:          * @return the new adapter.
155:          * @generated
156:          */
157:         public Adapter createEObjectAdapter() {
158:                 return null;
159:         }
160:
161: } // LabelwidthAdapterFactory