Skip to content

Package: VSpanImpl

VSpanImpl

nameinstructionbranchcomplexitylinemethod
VSpanImpl()
M: 0 C: 6
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
eGet(int, boolean, boolean)
M: 12 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: 13 C: 0
0%
M: 4 C: 0
0%
M: 3 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
eSet(int, Object)
M: 13 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 5 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%
getHorizontalSpan()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
setHorizontalSpan(int)
M: 21 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 6 C: 0
0%
M: 1 C: 0
0%
toString()
M: 28 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 7 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 org.eclipse.emf.common.notify.Notification;
17: import org.eclipse.emf.ecore.EClass;
18: import org.eclipse.emf.ecore.impl.ENotificationImpl;
19: import org.eclipse.emf.ecp.view.spi.groupedgrid.model.VGroupedGridPackage;
20: import org.eclipse.emf.ecp.view.spi.groupedgrid.model.VSpan;
21: import org.eclipse.emf.ecp.view.spi.model.impl.VAttachmentImpl;
22:
23: /**
24: * <!-- begin-user-doc -->
25: * An implementation of the model object '<em><b>Span</b></em>'.
26: * <!-- end-user-doc -->
27: * <p>
28: * The following features are implemented:
29: * <ul>
30: * <li>{@link org.eclipse.emf.ecp.view.spi.groupedgrid.model.impl.VSpanImpl#getHorizontalSpan <em>Horizontal
31: * Span</em>}</li>
32: * </ul>
33: * </p>
34: *
35: * @generated
36: * @since 1.2
37: */
38: public class VSpanImpl extends VAttachmentImpl implements VSpan {
39:         /**
40:          * The default value of the '{@link #getHorizontalSpan() <em>Horizontal Span</em>}' attribute.
41:          * <!-- begin-user-doc -->
42:          * <!-- end-user-doc -->
43:          *
44:          * @see #getHorizontalSpan()
45:          * @generated
46:          * @ordered
47:          */
48:         protected static final int HORIZONTAL_SPAN_EDEFAULT = 0;
49:
50:         /**
51:          * The cached value of the '{@link #getHorizontalSpan() <em>Horizontal Span</em>}' attribute.
52:          * <!-- begin-user-doc -->
53:          * <!-- end-user-doc -->
54:          *
55:          * @see #getHorizontalSpan()
56:          * @generated
57:          * @ordered
58:          */
59:         protected int horizontalSpan = HORIZONTAL_SPAN_EDEFAULT;
60:
61:         /**
62:          * <!-- begin-user-doc -->
63:          * <!-- end-user-doc -->
64:          *
65:          * @generated
66:          */
67:         protected VSpanImpl() {
68:                 super();
69:         }
70:
71:         /**
72:          * <!-- begin-user-doc -->
73:          * <!-- end-user-doc -->
74:          *
75:          * @generated
76:          */
77:         @Override
78:         protected EClass eStaticClass() {
79:                 return VGroupedGridPackage.Literals.SPAN;
80:         }
81:
82:         /**
83:          * <!-- begin-user-doc -->
84:          * <!-- end-user-doc -->
85:          *
86:          * @generated
87:          */
88:         @Override
89:         public int getHorizontalSpan() {
90:                 return horizontalSpan;
91:         }
92:
93:         /**
94:          * <!-- begin-user-doc -->
95:          * <!-- end-user-doc -->
96:          *
97:          * @generated
98:          */
99:         @Override
100:         public void setHorizontalSpan(int newHorizontalSpan) {
101:                 final int oldHorizontalSpan = horizontalSpan;
102:                 horizontalSpan = newHorizontalSpan;
103:•                if (eNotificationRequired()) {
104:                         eNotify(new ENotificationImpl(this, Notification.SET, VGroupedGridPackage.SPAN__HORIZONTAL_SPAN,
105:                                 oldHorizontalSpan, horizontalSpan));
106:                 }
107:         }
108:
109:         /**
110:          * <!-- begin-user-doc -->
111:          * <!-- end-user-doc -->
112:          *
113:          * @generated
114:          */
115:         @Override
116:         public Object eGet(int featureID, boolean resolve, boolean coreType) {
117:•                switch (featureID) {
118:                 case VGroupedGridPackage.SPAN__HORIZONTAL_SPAN:
119:                         return getHorizontalSpan();
120:                 }
121:                 return super.eGet(featureID, resolve, coreType);
122:         }
123:
124:         /**
125:          * <!-- begin-user-doc -->
126:          * <!-- end-user-doc -->
127:          *
128:          * @generated
129:          */
130:         @Override
131:         public void eSet(int featureID, Object newValue) {
132:•                switch (featureID) {
133:                 case VGroupedGridPackage.SPAN__HORIZONTAL_SPAN:
134:                         setHorizontalSpan((Integer) newValue);
135:                         return;
136:                 }
137:                 super.eSet(featureID, newValue);
138:         }
139:
140:         /**
141:          * <!-- begin-user-doc -->
142:          * <!-- end-user-doc -->
143:          *
144:          * @generated
145:          */
146:         @Override
147:         public void eUnset(int featureID) {
148:•                switch (featureID) {
149:                 case VGroupedGridPackage.SPAN__HORIZONTAL_SPAN:
150:                         setHorizontalSpan(HORIZONTAL_SPAN_EDEFAULT);
151:                         return;
152:                 }
153:                 super.eUnset(featureID);
154:         }
155:
156:         /**
157:          * <!-- begin-user-doc -->
158:          * <!-- end-user-doc -->
159:          *
160:          * @generated
161:          */
162:         @Override
163:         public boolean eIsSet(int featureID) {
164:•                switch (featureID) {
165:                 case VGroupedGridPackage.SPAN__HORIZONTAL_SPAN:
166:•                        return horizontalSpan != HORIZONTAL_SPAN_EDEFAULT;
167:                 }
168:                 return super.eIsSet(featureID);
169:         }
170:
171:         /**
172:          * <!-- begin-user-doc -->
173:          * <!-- end-user-doc -->
174:          *
175:          * @generated
176:          */
177:         @Override
178:         public String toString() {
179:•                if (eIsProxy()) {
180:                         return super.toString();
181:                 }
182:
183:                 final StringBuffer result = new StringBuffer(super.toString());
184:                 result.append(" (horizontalSpan: "); //$NON-NLS-1$
185:                 result.append(horizontalSpan);
186:                 result.append(')');
187:                 return result.toString();
188:         }
189:
190: } // VSpanImpl