Skip to content

Package: SheetLocationImpl

SheetLocationImpl

nameinstructionbranchcomplexitylinemethod
SheetLocationImpl()
M: 0 C: 18
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 7
100%
M: 0 C: 1
100%
eGet(int, boolean, boolean)
M: 10 C: 16
62%
M: 2 C: 4
67%
M: 2 C: 4
67%
M: 2 C: 5
71%
M: 0 C: 1
100%
eIsSet(int)
M: 30 C: 33
52%
M: 12 C: 12
50%
M: 10 C: 5
33%
M: 1 C: 6
86%
M: 0 C: 1
100%
eSet(int, Object)
M: 11 C: 24
69%
M: 2 C: 4
67%
M: 2 C: 4
67%
M: 4 C: 9
69%
M: 0 C: 1
100%
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: 26 C: 0
0%
M: 6 C: 0
0%
M: 6 C: 0
0%
M: 13 C: 0
0%
M: 1 C: 0
0%
getColumn()
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%
getColumnName()
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%
getRow()
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%
getSheet()
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%
isValid()
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%
setColumn(int)
M: 11 C: 10
48%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 2 C: 4
67%
M: 0 C: 1
100%
setColumnName(String)
M: 11 C: 10
48%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 2 C: 4
67%
M: 0 C: 1
100%
setRow(int)
M: 11 C: 10
48%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 1 C: 4
80%
M: 0 C: 1
100%
setSheet(String)
M: 11 C: 10
48%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 1 C: 4
80%
M: 0 C: 1
100%
setValid(boolean)
M: 11 C: 10
48%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 1 C: 4
80%
M: 0 C: 1
100%
static {...}
M: 0 C: 5
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
toString()
M: 64 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 15 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /**
2: * Copyright (c) 2011-2015 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.emfforms.spi.spreadsheet.core.error.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.ecore.impl.MinimalEObjectImpl;
20: import org.eclipse.emfforms.spi.spreadsheet.core.error.model.ErrorPackage;
21: import org.eclipse.emfforms.spi.spreadsheet.core.error.model.SheetLocation;
22:
23: /**
24: * <!-- begin-user-doc -->
25: * An implementation of the model object '<em><b>Excel Location</b></em>'.
26: * <!-- end-user-doc -->
27: * <p>
28: * The following features are implemented:
29: * </p>
30: * <ul>
31: * <li>{@link org.eclipse.emfforms.spi.spreadsheet.core.error.model.impl.SheetLocationImpl#getSheet <em>Sheet</em>}</li>
32: * <li>{@link org.eclipse.emfforms.spi.spreadsheet.core.error.model.impl.SheetLocationImpl#getColumn <em>Column</em>}
33: * </li>
34: * <li>{@link org.eclipse.emfforms.spi.spreadsheet.core.error.model.impl.SheetLocationImpl#getRow <em>Row</em>}</li>
35: * <li>{@link org.eclipse.emfforms.spi.spreadsheet.core.error.model.impl.SheetLocationImpl#getColumnName
36: * <em>Column Name</em>}</li>
37: * <li>{@link org.eclipse.emfforms.spi.spreadsheet.core.error.model.impl.SheetLocationImpl#isValid <em>Valid</em>}</li>
38: * </ul>
39: *
40: * @generated
41: */
42: public class SheetLocationImpl extends MinimalEObjectImpl.Container implements SheetLocation {
43:         /**
44:          * The default value of the '{@link #getSheet() <em>Sheet</em>}' attribute.
45:          * <!-- begin-user-doc -->
46:          * <!-- end-user-doc -->
47:          *
48:          * @see #getSheet()
49:          * @generated
50:          * @ordered
51:          */
52:         protected static final String SHEET_EDEFAULT = null;
53:
54:         /**
55:          * The cached value of the '{@link #getSheet() <em>Sheet</em>}' attribute.
56:          * <!-- begin-user-doc -->
57:          * <!-- end-user-doc -->
58:          *
59:          * @see #getSheet()
60:          * @generated
61:          * @ordered
62:          */
63:         protected String sheet = SHEET_EDEFAULT;
64:
65:         /**
66:          * The default value of the '{@link #getColumn() <em>Column</em>}' attribute.
67:          * <!-- begin-user-doc -->
68:          * <!-- end-user-doc -->
69:          *
70:          * @see #getColumn()
71:          * @generated
72:          * @ordered
73:          */
74:         protected static final int COLUMN_EDEFAULT = 0;
75:
76:         /**
77:          * The cached value of the '{@link #getColumn() <em>Column</em>}' attribute.
78:          * <!-- begin-user-doc -->
79:          * <!-- end-user-doc -->
80:          *
81:          * @see #getColumn()
82:          * @generated
83:          * @ordered
84:          */
85:         protected int column = COLUMN_EDEFAULT;
86:
87:         /**
88:          * The default value of the '{@link #getRow() <em>Row</em>}' attribute.
89:          * <!-- begin-user-doc -->
90:          * <!-- end-user-doc -->
91:          *
92:          * @see #getRow()
93:          * @generated
94:          * @ordered
95:          */
96:         protected static final int ROW_EDEFAULT = 0;
97:
98:         /**
99:          * The cached value of the '{@link #getRow() <em>Row</em>}' attribute.
100:          * <!-- begin-user-doc -->
101:          * <!-- end-user-doc -->
102:          *
103:          * @see #getRow()
104:          * @generated
105:          * @ordered
106:          */
107:         protected int row = ROW_EDEFAULT;
108:
109:         /**
110:          * The default value of the '{@link #getColumnName() <em>Column Name</em>}' attribute.
111:          * <!-- begin-user-doc -->
112:          * <!-- end-user-doc -->
113:          *
114:          * @see #getColumnName()
115:          * @generated
116:          * @ordered
117:          */
118:         protected static final String COLUMN_NAME_EDEFAULT = null;
119:
120:         /**
121:          * The cached value of the '{@link #getColumnName() <em>Column Name</em>}' attribute.
122:          * <!-- begin-user-doc -->
123:          * <!-- end-user-doc -->
124:          *
125:          * @see #getColumnName()
126:          * @generated
127:          * @ordered
128:          */
129:         protected String columnName = COLUMN_NAME_EDEFAULT;
130:
131:         /**
132:          * The default value of the '{@link #isValid() <em>Valid</em>}' attribute.
133:          * <!-- begin-user-doc -->
134:          * <!-- end-user-doc -->
135:          *
136:          * @see #isValid()
137:          * @generated
138:          * @ordered
139:          */
140:         protected static final boolean VALID_EDEFAULT = true;
141:
142:         /**
143:          * The cached value of the '{@link #isValid() <em>Valid</em>}' attribute.
144:          * <!-- begin-user-doc -->
145:          * <!-- end-user-doc -->
146:          *
147:          * @see #isValid()
148:          * @generated
149:          * @ordered
150:          */
151:         protected boolean valid = VALID_EDEFAULT;
152:
153:         /**
154:          * <!-- begin-user-doc -->
155:          * <!-- end-user-doc -->
156:          *
157:          * @generated
158:          */
159:         protected SheetLocationImpl() {
160:                 super();
161:         }
162:
163:         /**
164:          * <!-- begin-user-doc -->
165:          * <!-- end-user-doc -->
166:          *
167:          * @generated
168:          */
169:         @Override
170:         protected EClass eStaticClass() {
171:                 return ErrorPackage.Literals.SHEET_LOCATION;
172:         }
173:
174:         /**
175:          * <!-- begin-user-doc -->
176:          * <!-- end-user-doc -->
177:          *
178:          * @generated
179:          */
180:         @Override
181:         public String getSheet() {
182:                 return sheet;
183:         }
184:
185:         /**
186:          * <!-- begin-user-doc -->
187:          * <!-- end-user-doc -->
188:          *
189:          * @generated
190:          */
191:         @Override
192:         public void setSheet(String newSheet) {
193:                 final String oldSheet = sheet;
194:                 sheet = newSheet;
195:•                if (eNotificationRequired()) {
196:                         eNotify(new ENotificationImpl(this, Notification.SET, ErrorPackage.SHEET_LOCATION__SHEET, oldSheet, sheet));
197:                 }
198:         }
199:
200:         /**
201:          * <!-- begin-user-doc -->
202:          * <!-- end-user-doc -->
203:          *
204:          * @generated
205:          */
206:         @Override
207:         public int getColumn() {
208:                 return column;
209:         }
210:
211:         /**
212:          * <!-- begin-user-doc -->
213:          * <!-- end-user-doc -->
214:          *
215:          * @generated
216:          */
217:         @Override
218:         public void setColumn(int newColumn) {
219:                 final int oldColumn = column;
220:                 column = newColumn;
221:•                if (eNotificationRequired()) {
222:                         eNotify(
223:                                 new ENotificationImpl(this, Notification.SET, ErrorPackage.SHEET_LOCATION__COLUMN, oldColumn, column));
224:                 }
225:         }
226:
227:         /**
228:          * <!-- begin-user-doc -->
229:          * <!-- end-user-doc -->
230:          *
231:          * @generated
232:          */
233:         @Override
234:         public int getRow() {
235:                 return row;
236:         }
237:
238:         /**
239:          * <!-- begin-user-doc -->
240:          * <!-- end-user-doc -->
241:          *
242:          * @generated
243:          */
244:         @Override
245:         public void setRow(int newRow) {
246:                 final int oldRow = row;
247:                 row = newRow;
248:•                if (eNotificationRequired()) {
249:                         eNotify(new ENotificationImpl(this, Notification.SET, ErrorPackage.SHEET_LOCATION__ROW, oldRow, row));
250:                 }
251:         }
252:
253:         /**
254:          * <!-- begin-user-doc -->
255:          * <!-- end-user-doc -->
256:          *
257:          * @generated
258:          */
259:         @Override
260:         public String getColumnName() {
261:                 return columnName;
262:         }
263:
264:         /**
265:          * <!-- begin-user-doc -->
266:          * <!-- end-user-doc -->
267:          *
268:          * @generated
269:          */
270:         @Override
271:         public void setColumnName(String newColumnName) {
272:                 final String oldColumnName = columnName;
273:                 columnName = newColumnName;
274:•                if (eNotificationRequired()) {
275:                         eNotify(new ENotificationImpl(this, Notification.SET, ErrorPackage.SHEET_LOCATION__COLUMN_NAME,
276:                                 oldColumnName, columnName));
277:                 }
278:         }
279:
280:         /**
281:          * <!-- begin-user-doc -->
282:          * <!-- end-user-doc -->
283:          *
284:          * @generated
285:          */
286:         @Override
287:         public boolean isValid() {
288:                 return valid;
289:         }
290:
291:         /**
292:          * <!-- begin-user-doc -->
293:          * <!-- end-user-doc -->
294:          *
295:          * @generated
296:          */
297:         @Override
298:         public void setValid(boolean newValid) {
299:                 final boolean oldValid = valid;
300:                 valid = newValid;
301:•                if (eNotificationRequired()) {
302:                         eNotify(new ENotificationImpl(this, Notification.SET, ErrorPackage.SHEET_LOCATION__VALID, oldValid, valid));
303:                 }
304:         }
305:
306:         /**
307:          * <!-- begin-user-doc -->
308:          * <!-- end-user-doc -->
309:          *
310:          * @generated
311:          */
312:         @Override
313:         public Object eGet(int featureID, boolean resolve, boolean coreType) {
314:•                switch (featureID) {
315:                 case ErrorPackage.SHEET_LOCATION__SHEET:
316:                         return getSheet();
317:                 case ErrorPackage.SHEET_LOCATION__COLUMN:
318:                         return getColumn();
319:                 case ErrorPackage.SHEET_LOCATION__ROW:
320:                         return getRow();
321:                 case ErrorPackage.SHEET_LOCATION__COLUMN_NAME:
322:                         return getColumnName();
323:                 case ErrorPackage.SHEET_LOCATION__VALID:
324:                         return isValid();
325:                 }
326:                 return super.eGet(featureID, resolve, coreType);
327:         }
328:
329:         /**
330:          * <!-- begin-user-doc -->
331:          * <!-- end-user-doc -->
332:          *
333:          * @generated
334:          */
335:         @Override
336:         public void eSet(int featureID, Object newValue) {
337:•                switch (featureID) {
338:                 case ErrorPackage.SHEET_LOCATION__SHEET:
339:                         setSheet((String) newValue);
340:                         return;
341:                 case ErrorPackage.SHEET_LOCATION__COLUMN:
342:                         setColumn((Integer) newValue);
343:                         return;
344:                 case ErrorPackage.SHEET_LOCATION__ROW:
345:                         setRow((Integer) newValue);
346:                         return;
347:                 case ErrorPackage.SHEET_LOCATION__COLUMN_NAME:
348:                         setColumnName((String) newValue);
349:                         return;
350:                 case ErrorPackage.SHEET_LOCATION__VALID:
351:                         setValid((Boolean) newValue);
352:                         return;
353:                 }
354:                 super.eSet(featureID, newValue);
355:         }
356:
357:         /**
358:          * <!-- begin-user-doc -->
359:          * <!-- end-user-doc -->
360:          *
361:          * @generated
362:          */
363:         @Override
364:         public void eUnset(int featureID) {
365:•                switch (featureID) {
366:                 case ErrorPackage.SHEET_LOCATION__SHEET:
367:                         setSheet(SHEET_EDEFAULT);
368:                         return;
369:                 case ErrorPackage.SHEET_LOCATION__COLUMN:
370:                         setColumn(COLUMN_EDEFAULT);
371:                         return;
372:                 case ErrorPackage.SHEET_LOCATION__ROW:
373:                         setRow(ROW_EDEFAULT);
374:                         return;
375:                 case ErrorPackage.SHEET_LOCATION__COLUMN_NAME:
376:                         setColumnName(COLUMN_NAME_EDEFAULT);
377:                         return;
378:                 case ErrorPackage.SHEET_LOCATION__VALID:
379:                         setValid(VALID_EDEFAULT);
380:                         return;
381:                 }
382:                 super.eUnset(featureID);
383:         }
384:
385:         /**
386:          * <!-- begin-user-doc -->
387:          * <!-- end-user-doc -->
388:          *
389:          * @generated
390:          */
391:         @Override
392:         public boolean eIsSet(int featureID) {
393:•                switch (featureID) {
394:                 case ErrorPackage.SHEET_LOCATION__SHEET:
395:•                        return SHEET_EDEFAULT == null ? sheet != null : !SHEET_EDEFAULT.equals(sheet);
396:                 case ErrorPackage.SHEET_LOCATION__COLUMN:
397:•                        return column != COLUMN_EDEFAULT;
398:                 case ErrorPackage.SHEET_LOCATION__ROW:
399:•                        return row != ROW_EDEFAULT;
400:                 case ErrorPackage.SHEET_LOCATION__COLUMN_NAME:
401:•                        return COLUMN_NAME_EDEFAULT == null ? columnName != null : !COLUMN_NAME_EDEFAULT.equals(columnName);
402:                 case ErrorPackage.SHEET_LOCATION__VALID:
403:•                        return valid != VALID_EDEFAULT;
404:                 }
405:                 return super.eIsSet(featureID);
406:         }
407:
408:         /**
409:          * <!-- begin-user-doc -->
410:          * <!-- end-user-doc -->
411:          *
412:          * @generated
413:          */
414:         @Override
415:         public String toString() {
416:•                if (eIsProxy()) {
417:                         return super.toString();
418:                 }
419:
420:                 final StringBuffer result = new StringBuffer(super.toString());
421:                 result.append(" (sheet: "); //$NON-NLS-1$
422:                 result.append(sheet);
423:                 result.append(", column: "); //$NON-NLS-1$
424:                 result.append(column);
425:                 result.append(", row: "); //$NON-NLS-1$
426:                 result.append(row);
427:                 result.append(", columnName: "); //$NON-NLS-1$
428:                 result.append(columnName);
429:                 result.append(", valid: "); //$NON-NLS-1$
430:                 result.append(valid);
431:                 result.append(')');
432:                 return result.toString();
433:         }
434:
435: } // ExcelLocationImpl