Skip to content

Package: VAbstractCategorizationImpl

VAbstractCategorizationImpl

nameinstructionbranchcomplexitylinemethod
VAbstractCategorizationImpl()
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%
eGet(int, boolean, boolean)
M: 0 C: 11
100%
M: 0 C: 2
100%
M: 0 C: 2
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
eInverseRemove(InternalEObject, int, NotificationChain)
M: 15 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
eIsSet(int)
M: 2 C: 15
88%
M: 1 C: 5
83%
M: 1 C: 3
75%
M: 0 C: 3
100%
M: 0 C: 1
100%
eSet(int, Object)
M: 10 C: 7
41%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 3 C: 3
50%
M: 0 C: 1
100%
eStaticClass()
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%
eUnset(int)
M: 10 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 5 C: 0
0%
M: 1 C: 0
0%
getActions()
M: 0 C: 14
100%
M: 0 C: 2
100%
M: 0 C: 2
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
getECPActions()
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%
getLabelObject()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
setECPActions(List)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%

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: * EclipseSource Munich - initial API and implementation
13: */
14: package org.eclipse.emf.ecp.view.spi.categorization.model.impl;
15:
16: import java.util.Collection;
17: import java.util.List;
18:
19: import org.eclipse.emf.common.notify.NotificationChain;
20: import org.eclipse.emf.common.util.EList;
21: import org.eclipse.emf.ecore.EClass;
22: import org.eclipse.emf.ecore.EObject;
23: import org.eclipse.emf.ecore.InternalEObject;
24: import org.eclipse.emf.ecore.util.EObjectContainmentEList;
25: import org.eclipse.emf.ecore.util.InternalEList;
26: import org.eclipse.emf.ecp.view.spi.categorization.model.ECPAction;
27: import org.eclipse.emf.ecp.view.spi.categorization.model.VAbstractCategorization;
28: import org.eclipse.emf.ecp.view.spi.categorization.model.VAction;
29: import org.eclipse.emf.ecp.view.spi.categorization.model.VCategorizationPackage;
30:
31: /**
32: * <!-- begin-user-doc -->
33: * An implementation of the model object '<em><b>Abstract Categorization</b></em>'.
34: * <!-- end-user-doc -->
35: * <p>
36: * The following features are implemented:
37: * </p>
38: * <ul>
39: * <li>{@link org.eclipse.emf.ecp.view.spi.categorization.model.impl.VAbstractCategorizationImpl#getActions
40: * <em>Actions</em>}</li>
41: * </ul>
42: *
43: * @generated
44: */
45: public abstract class VAbstractCategorizationImpl extends VCategorizableElementImpl implements VAbstractCategorization {
46:         /**
47:          * The cached value of the '{@link #getActions() <em>Actions</em>}' containment reference list.
48:          * <!-- begin-user-doc -->
49:          * <!-- end-user-doc -->
50:          *
51:          * @see #getActions()
52:          * @generated
53:          * @ordered
54:          */
55:         protected EList<VAction> actions;
56:
57:         /**
58:          * <!-- begin-user-doc -->
59:          * <!-- end-user-doc -->
60:          *
61:          * @generated
62:          */
63:         protected VAbstractCategorizationImpl() {
64:                 super();
65:         }
66:
67:         /**
68:          * <!-- begin-user-doc -->
69:          * <!-- end-user-doc -->
70:          *
71:          * @generated
72:          */
73:         @Override
74:         protected EClass eStaticClass() {
75:                 return VCategorizationPackage.Literals.ABSTRACT_CATEGORIZATION;
76:         }
77:
78:         /**
79:          * <!-- begin-user-doc -->
80:          * <!-- end-user-doc -->
81:          *
82:          * @generated
83:          */
84:         @Override
85:         public EList<VAction> getActions() {
86:•                if (actions == null) {
87:                         actions = new EObjectContainmentEList<VAction>(VAction.class, this,
88:                                 VCategorizationPackage.ABSTRACT_CATEGORIZATION__ACTIONS);
89:                 }
90:                 return actions;
91:         }
92:
93:         /**
94:          * <!-- begin-user-doc -->
95:          * <!-- end-user-doc -->
96:          *
97:          * @generated
98:          */
99:         @Override
100:         public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
101:•                switch (featureID) {
102:                 case VCategorizationPackage.ABSTRACT_CATEGORIZATION__ACTIONS:
103:                         return ((InternalEList<?>) getActions()).basicRemove(otherEnd, msgs);
104:                 }
105:                 return super.eInverseRemove(otherEnd, featureID, msgs);
106:         }
107:
108:         /**
109:          * <!-- begin-user-doc -->
110:          * <!-- end-user-doc -->
111:          *
112:          * @generated
113:          */
114:         @Override
115:         public Object eGet(int featureID, boolean resolve, boolean coreType) {
116:•                switch (featureID) {
117:                 case VCategorizationPackage.ABSTRACT_CATEGORIZATION__ACTIONS:
118:                         return getActions();
119:                 }
120:                 return super.eGet(featureID, resolve, coreType);
121:         }
122:
123:         /**
124:          * <!-- begin-user-doc -->
125:          * <!-- end-user-doc -->
126:          *
127:          * @generated
128:          */
129:         @SuppressWarnings("unchecked")
130:         @Override
131:         public void eSet(int featureID, Object newValue) {
132:•                switch (featureID) {
133:                 case VCategorizationPackage.ABSTRACT_CATEGORIZATION__ACTIONS:
134:                         getActions().clear();
135:                         getActions().addAll((Collection<? extends VAction>) newValue);
136:                         return;
137:                 }
138:                 super.eSet(featureID, newValue);
139:         }
140:
141:         /**
142:          * <!-- begin-user-doc -->
143:          * <!-- end-user-doc -->
144:          *
145:          * @generated
146:          */
147:         @Override
148:         public void eUnset(int featureID) {
149:•                switch (featureID) {
150:                 case VCategorizationPackage.ABSTRACT_CATEGORIZATION__ACTIONS:
151:                         getActions().clear();
152:                         return;
153:                 }
154:                 super.eUnset(featureID);
155:         }
156:
157:         /**
158:          * <!-- begin-user-doc -->
159:          * <!-- end-user-doc -->
160:          *
161:          * @generated
162:          */
163:         @Override
164:         public boolean eIsSet(int featureID) {
165:•                switch (featureID) {
166:                 case VCategorizationPackage.ABSTRACT_CATEGORIZATION__ACTIONS:
167:•                        return actions != null && !actions.isEmpty();
168:                 }
169:                 return super.eIsSet(featureID);
170:         }
171:
172:         /**
173:          * {@inheritDoc}
174:          *
175:          * @see org.eclipse.emf.ecp.view.spi.categorization.model.VCategorizableElement#getLabelObject()
176:          */
177:         @Override
178:         public EObject getLabelObject() {
179:                 return this;
180:         }
181:
182:         private List<ECPAction> ecpActions;
183:
184:         /**
185:          * {@inheritDoc}
186:          *
187:          * @see org.eclipse.emf.ecp.view.spi.categorization.model.VCategorizableElement#getECPActions()
188:          */
189:         @Override
190:         public List<ECPAction> getECPActions() {
191:                 return ecpActions;
192:         }
193:
194:         /**
195:          * {@inheritDoc}
196:          *
197:          * @see org.eclipse.emf.ecp.view.spi.categorization.model.VCategorizableElement#setECPActions(java.util.List)
198:          */
199:         @Override
200:         public void setECPActions(List<ECPAction> actions) {
201:                 ecpActions = actions;
202:         }
203:
204: } // VAbstractCategorizationImpl