Skip to content

Package: SectionAdapterFactory$1

SectionAdapterFactory$1

nameinstructionbranchcomplexitylinemethod
caseContainedElement(VContainedElement)
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%
caseContainer(VContainer)
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%
caseElement(VElement)
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%
caseHasTooltip(VHasTooltip)
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%
caseSection(VSection)
M: 0 C: 4
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
caseSectionedArea(VSectionedArea)
M: 0 C: 4
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
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: 0 C: 6
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.section.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.spi.model.VContainedElement;
21: import org.eclipse.emf.ecp.view.spi.model.VContainer;
22: import org.eclipse.emf.ecp.view.spi.model.VElement;
23: import org.eclipse.emf.ecp.view.spi.model.VHasTooltip;
24: import org.eclipse.emf.ecp.view.spi.section.model.VSection;
25: import org.eclipse.emf.ecp.view.spi.section.model.VSectionPackage;
26: import org.eclipse.emf.ecp.view.spi.section.model.VSectionedArea;
27:
28: /**
29: * <!-- begin-user-doc -->
30: * The <b>Adapter Factory</b> for the model.
31: * It provides an adapter <code>createXXX</code> method for each class of the model.
32: * <!-- end-user-doc -->
33: *
34: * @see org.eclipse.emf.ecp.view.spi.section.model.VSectionPackage
35: * @generated
36: */
37: public class SectionAdapterFactory extends AdapterFactoryImpl {
38:         /**
39:          * The cached model package.
40:          * <!-- begin-user-doc -->
41:          * <!-- end-user-doc -->
42:          *
43:          * @generated
44:          */
45:         protected static VSectionPackage modelPackage;
46:
47:         /**
48:          * Creates an instance of the adapter factory.
49:          * <!-- begin-user-doc -->
50:          * <!-- end-user-doc -->
51:          *
52:          * @generated
53:          */
54:         public SectionAdapterFactory() {
55:                 if (modelPackage == null) {
56:                         modelPackage = VSectionPackage.eINSTANCE;
57:                 }
58:         }
59:
60:         /**
61:          * Returns whether this factory is applicable for the type of the object.
62:          * <!-- begin-user-doc -->
63:          * This implementation returns <code>true</code> if the object is either the model's package or is an instance
64:          * object of the model.
65:          * <!-- end-user-doc -->
66:          *
67:          * @return whether this factory is applicable for the type of the object.
68:          * @generated
69:          */
70:         @Override
71:         public boolean isFactoryForType(Object object) {
72:                 if (object == modelPackage) {
73:                         return true;
74:                 }
75:                 if (object instanceof EObject) {
76:                         return ((EObject) object).eClass().getEPackage() == modelPackage;
77:                 }
78:                 return false;
79:         }
80:
81:         /**
82:          * The switch that delegates to the <code>createXXX</code> methods.
83:          * <!-- begin-user-doc -->
84:          * <!-- end-user-doc -->
85:          *
86:          * @generated
87:          */
88:         protected SectionSwitch<Adapter> modelSwitch = new SectionSwitch<Adapter>() {
89:                 @Override
90:                 public Adapter caseSectionedArea(VSectionedArea object) {
91:                         return createSectionedAreaAdapter();
92:                 }
93:
94:                 @Override
95:                 public Adapter caseSection(VSection object) {
96:                         return createSectionAdapter();
97:                 }
98:
99:                 @Override
100:                 public Adapter caseElement(VElement object) {
101:                         return createElementAdapter();
102:                 }
103:
104:                 @Override
105:                 public Adapter caseContainedElement(VContainedElement object) {
106:                         return createContainedElementAdapter();
107:                 }
108:
109:                 @Override
110:                 public Adapter caseContainer(VContainer object) {
111:                         return createContainerAdapter();
112:                 }
113:
114:                 @Override
115:                 public Adapter caseHasTooltip(VHasTooltip object) {
116:                         return createHasTooltipAdapter();
117:                 }
118:
119:                 @Override
120:                 public Adapter defaultCase(EObject object) {
121:                         return createEObjectAdapter();
122:                 }
123:         };
124:
125:         /**
126:          * Creates an adapter for the <code>target</code>.
127:          * <!-- begin-user-doc -->
128:          * <!-- end-user-doc -->
129:          *
130:          * @param target the object to adapt.
131:          * @return the adapter for the <code>target</code>.
132:          * @generated
133:          */
134:         @Override
135:         public Adapter createAdapter(Notifier target) {
136:                 return modelSwitch.doSwitch((EObject) target);
137:         }
138:
139:         /**
140:          * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.view.spi.section.model.VSectionedArea
141:          * <em>Sectioned Area</em>}'.
142:          * <!-- begin-user-doc -->
143:          * This default implementation returns null so that we can easily ignore cases;
144:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
145:          * <!-- end-user-doc -->
146:          *
147:          * @return the new adapter.
148:          * @see org.eclipse.emf.ecp.view.spi.section.model.VSectionedArea
149:          * @generated
150:          */
151:         public Adapter createSectionedAreaAdapter() {
152:                 return null;
153:         }
154:
155:         /**
156:          * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.view.spi.section.model.VSection
157:          * <em>Section</em>}'.
158:          * <!-- begin-user-doc -->
159:          * This default implementation returns null so that we can easily ignore cases;
160:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
161:          * <!-- end-user-doc -->
162:          *
163:          * @return the new adapter.
164:          * @see org.eclipse.emf.ecp.view.spi.section.model.VSection
165:          * @generated
166:          */
167:         public Adapter createSectionAdapter() {
168:                 return null;
169:         }
170:
171:         /**
172:          * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.view.spi.model.VElement
173:          * <em>Element</em>}'.
174:          * <!-- begin-user-doc -->
175:          * This default implementation returns null so that we can easily ignore cases;
176:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
177:          * <!-- end-user-doc -->
178:          *
179:          * @return the new adapter.
180:          * @see org.eclipse.emf.ecp.view.spi.model.VElement
181:          * @generated
182:          */
183:         public Adapter createElementAdapter() {
184:                 return null;
185:         }
186:
187:         /**
188:          * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.view.spi.model.VContainedElement
189:          * <em>Contained Element</em>}'.
190:          * <!-- begin-user-doc -->
191:          * This default implementation returns null so that we can easily ignore cases;
192:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
193:          * <!-- end-user-doc -->
194:          *
195:          * @return the new adapter.
196:          * @see org.eclipse.emf.ecp.view.spi.model.VContainedElement
197:          * @generated
198:          */
199:         public Adapter createContainedElementAdapter() {
200:                 return null;
201:         }
202:
203:         /**
204:          * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.view.spi.model.VContainer
205:          * <em>Container</em>}'.
206:          * <!-- begin-user-doc -->
207:          * This default implementation returns null so that we can easily ignore cases;
208:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
209:          * <!-- end-user-doc -->
210:          *
211:          * @return the new adapter.
212:          * @see org.eclipse.emf.ecp.view.spi.model.VContainer
213:          * @generated
214:          */
215:         public Adapter createContainerAdapter() {
216:                 return null;
217:         }
218:
219:         /**
220:          * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecp.view.spi.model.VHasTooltip <em>Has
221:          * Tooltip</em>}'.
222:          * <!-- begin-user-doc -->
223:          * This default implementation returns null so that we can easily ignore cases;
224:          * it's useful to ignore a case when inheritance will catch all the cases anyway.
225:          * <!-- end-user-doc -->
226:          *
227:          * @return the new adapter.
228:          * @see org.eclipse.emf.ecp.view.spi.model.VHasTooltip
229:          * @generated
230:          * @since 1.13
231:          */
232:         public Adapter createHasTooltipAdapter() {
233:                 return null;
234:         }
235:
236:         /**
237:          * Creates a new adapter for the default case.
238:          * <!-- begin-user-doc -->
239:          * This default implementation returns null.
240:          * <!-- end-user-doc -->
241:          *
242:          * @return the new adapter.
243:          * @generated
244:          */
245:         public Adapter createEObjectAdapter() {
246:                 return null;
247:         }
248:
249: } // SectionAdapterFactory