Skip to content

Package: VGroupedGridImpl

VGroupedGridImpl

nameinstructionbranchcomplexitylinemethod
VGroupedGridImpl()
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: 11 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
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: 6 C: 11
65%
M: 3 C: 3
50%
M: 2 C: 2
50%
M: 0 C: 3
100%
M: 0 C: 1
100%
eSet(int, Object)
M: 17 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 6 C: 0
0%
M: 1 C: 0
0%
eStaticClass()
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%
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%
getGroups()
M: 14 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 3 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: * Eugen Neufeld - initial API and implementation
13: */
14: package org.eclipse.emf.ecp.view.spi.groupedgrid.model.impl;
15:
16: import java.util.Collection;
17:
18: import org.eclipse.emf.common.notify.NotificationChain;
19: import org.eclipse.emf.common.util.EList;
20: import org.eclipse.emf.ecore.EClass;
21: import org.eclipse.emf.ecore.InternalEObject;
22: import org.eclipse.emf.ecore.util.EObjectContainmentEList;
23: import org.eclipse.emf.ecore.util.InternalEList;
24: import org.eclipse.emf.ecp.view.spi.groupedgrid.model.VGroup;
25: import org.eclipse.emf.ecp.view.spi.groupedgrid.model.VGroupedGrid;
26: import org.eclipse.emf.ecp.view.spi.groupedgrid.model.VGroupedGridPackage;
27: import org.eclipse.emf.ecp.view.spi.model.impl.VContainedElementImpl;
28:
29: /**
30: * <!-- begin-user-doc -->
31: * An implementation of the model object '<em><b>Grouped Grid</b></em>'.
32: * <!-- end-user-doc -->
33: * <p>
34: * The following features are implemented:
35: * <ul>
36: * <li>{@link org.eclipse.emf.ecp.view.spi.groupedgrid.model.impl.VGroupedGridImpl#getGroups <em>Groups</em>}</li>
37: * </ul>
38: * </p>
39: *
40: * @generated
41: * @since 1.2
42: */
43: public class VGroupedGridImpl extends VContainedElementImpl implements VGroupedGrid {
44:         /**
45:          * The cached value of the '{@link #getGroups() <em>Groups</em>}' containment reference list.
46:          * <!-- begin-user-doc -->
47:          * <!-- end-user-doc -->
48:          *
49:          * @see #getGroups()
50:          * @generated
51:          * @ordered
52:          */
53:         protected EList<VGroup> groups;
54:
55:         /**
56:          * <!-- begin-user-doc -->
57:          * <!-- end-user-doc -->
58:          *
59:          * @generated
60:          */
61:         protected VGroupedGridImpl() {
62:                 super();
63:         }
64:
65:         /**
66:          * <!-- begin-user-doc -->
67:          * <!-- end-user-doc -->
68:          *
69:          * @generated
70:          */
71:         @Override
72:         protected EClass eStaticClass() {
73:                 return VGroupedGridPackage.Literals.GROUPED_GRID;
74:         }
75:
76:         /**
77:          * <!-- begin-user-doc -->
78:          * <!-- end-user-doc -->
79:          *
80:          * @generated
81:          */
82:         @Override
83:         public EList<VGroup> getGroups() {
84:•                if (groups == null) {
85:                         groups = new EObjectContainmentEList<VGroup>(VGroup.class, this, VGroupedGridPackage.GROUPED_GRID__GROUPS);
86:                 }
87:                 return groups;
88:         }
89:
90:         /**
91:          * <!-- begin-user-doc -->
92:          * <!-- end-user-doc -->
93:          *
94:          * @generated
95:          */
96:         @Override
97:         public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
98:•                switch (featureID) {
99:                 case VGroupedGridPackage.GROUPED_GRID__GROUPS:
100:                         return ((InternalEList<?>) getGroups()).basicRemove(otherEnd, msgs);
101:                 }
102:                 return super.eInverseRemove(otherEnd, featureID, msgs);
103:         }
104:
105:         /**
106:          * <!-- begin-user-doc -->
107:          * <!-- end-user-doc -->
108:          *
109:          * @generated
110:          */
111:         @Override
112:         public Object eGet(int featureID, boolean resolve, boolean coreType) {
113:•                switch (featureID) {
114:                 case VGroupedGridPackage.GROUPED_GRID__GROUPS:
115:                         return getGroups();
116:                 }
117:                 return super.eGet(featureID, resolve, coreType);
118:         }
119:
120:         /**
121:          * <!-- begin-user-doc -->
122:          * <!-- end-user-doc -->
123:          *
124:          * @generated
125:          */
126:         @SuppressWarnings("unchecked")
127:         @Override
128:         public void eSet(int featureID, Object newValue) {
129:•                switch (featureID) {
130:                 case VGroupedGridPackage.GROUPED_GRID__GROUPS:
131:                         getGroups().clear();
132:                         getGroups().addAll((Collection<? extends VGroup>) newValue);
133:                         return;
134:                 }
135:                 super.eSet(featureID, newValue);
136:         }
137:
138:         /**
139:          * <!-- begin-user-doc -->
140:          * <!-- end-user-doc -->
141:          *
142:          * @generated
143:          */
144:         @Override
145:         public void eUnset(int featureID) {
146:•                switch (featureID) {
147:                 case VGroupedGridPackage.GROUPED_GRID__GROUPS:
148:                         getGroups().clear();
149:                         return;
150:                 }
151:                 super.eUnset(featureID);
152:         }
153:
154:         /**
155:          * <!-- begin-user-doc -->
156:          * <!-- end-user-doc -->
157:          *
158:          * @generated
159:          */
160:         @Override
161:         public boolean eIsSet(int featureID) {
162:•                switch (featureID) {
163:                 case VGroupedGridPackage.GROUPED_GRID__GROUPS:
164:•                        return groups != null && !groups.isEmpty();
165:                 }
166:                 return super.eIsSet(featureID);
167:         }
168:
169: } // VGroupedGridImpl