Skip to content

Package: DMRLocationImpl

DMRLocationImpl

nameinstructionbranchcomplexitylinemethod
DMRLocationImpl()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
basicSetDomainModelReference(VDomainModelReference, NotificationChain)
M: 29 C: 0
0%
M: 4 C: 0
0%
M: 3 C: 0
0%
M: 10 C: 0
0%
M: 1 C: 0
0%
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: 13 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: 12 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: 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%
getDomainModelReference()
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%
setDomainModelReference(VDomainModelReference)
M: 52 C: 0
0%
M: 10 C: 0
0%
M: 6 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.common.notify.NotificationChain;
18: import org.eclipse.emf.ecore.EClass;
19: import org.eclipse.emf.ecore.InternalEObject;
20: import org.eclipse.emf.ecore.impl.ENotificationImpl;
21: import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
22: import org.eclipse.emf.ecp.view.spi.model.VDomainModelReference;
23: import org.eclipse.emfforms.spi.spreadsheet.core.error.model.DMRLocation;
24: import org.eclipse.emfforms.spi.spreadsheet.core.error.model.ErrorPackage;
25:
26: /**
27: * <!-- begin-user-doc -->
28: * An implementation of the model object '<em><b>DMR Location</b></em>'.
29: * <!-- end-user-doc -->
30: * <p>
31: * The following features are implemented:
32: * </p>
33: * <ul>
34: * <li>{@link org.eclipse.emfforms.spi.spreadsheet.core.error.model.impl.DMRLocationImpl#getDomainModelReference
35: * <em>Domain Model Reference</em>}</li>
36: * </ul>
37: *
38: * @generated
39: */
40: public class DMRLocationImpl extends MinimalEObjectImpl.Container implements DMRLocation {
41:         /**
42:          * The cached value of the '{@link #getDomainModelReference() <em>Domain Model Reference</em>}' containment
43:          * reference.
44:          * <!-- begin-user-doc -->
45:          * <!-- end-user-doc -->
46:          *
47:          * @see #getDomainModelReference()
48:          * @generated
49:          * @ordered
50:          */
51:         protected VDomainModelReference domainModelReference;
52:
53:         /**
54:          * <!-- begin-user-doc -->
55:          * <!-- end-user-doc -->
56:          *
57:          * @generated
58:          */
59:         protected DMRLocationImpl() {
60:                 super();
61:         }
62:
63:         /**
64:          * <!-- begin-user-doc -->
65:          * <!-- end-user-doc -->
66:          *
67:          * @generated
68:          */
69:         @Override
70:         protected EClass eStaticClass() {
71:                 return ErrorPackage.Literals.DMR_LOCATION;
72:         }
73:
74:         /**
75:          * <!-- begin-user-doc -->
76:          * <!-- end-user-doc -->
77:          *
78:          * @generated
79:          */
80:         @Override
81:         public VDomainModelReference getDomainModelReference() {
82:                 return domainModelReference;
83:         }
84:
85:         /**
86:          * <!-- begin-user-doc -->
87:          * <!-- end-user-doc -->
88:          *
89:          * @generated
90:          */
91:         public NotificationChain basicSetDomainModelReference(VDomainModelReference newDomainModelReference,
92:                 NotificationChain msgs) {
93:                 final VDomainModelReference oldDomainModelReference = domainModelReference;
94:                 domainModelReference = newDomainModelReference;
95:•                if (eNotificationRequired()) {
96:                         final ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
97:                                 ErrorPackage.DMR_LOCATION__DOMAIN_MODEL_REFERENCE, oldDomainModelReference, newDomainModelReference);
98:•                        if (msgs == null) {
99:                                 msgs = notification;
100:                         } else {
101:                                 msgs.add(notification);
102:                         }
103:                 }
104:                 return msgs;
105:         }
106:
107:         /**
108:          * <!-- begin-user-doc -->
109:          * <!-- end-user-doc -->
110:          *
111:          * @generated
112:          */
113:         @Override
114:         public void setDomainModelReference(VDomainModelReference newDomainModelReference) {
115:•                if (newDomainModelReference != domainModelReference) {
116:                         NotificationChain msgs = null;
117:•                        if (domainModelReference != null) {
118:                                 msgs = ((InternalEObject) domainModelReference).eInverseRemove(this,
119:                                         EOPPOSITE_FEATURE_BASE - ErrorPackage.DMR_LOCATION__DOMAIN_MODEL_REFERENCE, null, msgs);
120:                         }
121:•                        if (newDomainModelReference != null) {
122:                                 msgs = ((InternalEObject) newDomainModelReference).eInverseAdd(this,
123:                                         EOPPOSITE_FEATURE_BASE - ErrorPackage.DMR_LOCATION__DOMAIN_MODEL_REFERENCE, null, msgs);
124:                         }
125:                         msgs = basicSetDomainModelReference(newDomainModelReference, msgs);
126:•                        if (msgs != null) {
127:                                 msgs.dispatch();
128:                         }
129:•                } else if (eNotificationRequired()) {
130:                         eNotify(new ENotificationImpl(this, Notification.SET, ErrorPackage.DMR_LOCATION__DOMAIN_MODEL_REFERENCE,
131:                                 newDomainModelReference, newDomainModelReference));
132:                 }
133:         }
134:
135:         /**
136:          * <!-- begin-user-doc -->
137:          * <!-- end-user-doc -->
138:          *
139:          * @generated
140:          */
141:         @Override
142:         public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
143:•                switch (featureID) {
144:                 case ErrorPackage.DMR_LOCATION__DOMAIN_MODEL_REFERENCE:
145:                         return basicSetDomainModelReference(null, msgs);
146:                 }
147:                 return super.eInverseRemove(otherEnd, featureID, msgs);
148:         }
149:
150:         /**
151:          * <!-- begin-user-doc -->
152:          * <!-- end-user-doc -->
153:          *
154:          * @generated
155:          */
156:         @Override
157:         public Object eGet(int featureID, boolean resolve, boolean coreType) {
158:•                switch (featureID) {
159:                 case ErrorPackage.DMR_LOCATION__DOMAIN_MODEL_REFERENCE:
160:                         return getDomainModelReference();
161:                 }
162:                 return super.eGet(featureID, resolve, coreType);
163:         }
164:
165:         /**
166:          * <!-- begin-user-doc -->
167:          * <!-- end-user-doc -->
168:          *
169:          * @generated
170:          */
171:         @Override
172:         public void eSet(int featureID, Object newValue) {
173:•                switch (featureID) {
174:                 case ErrorPackage.DMR_LOCATION__DOMAIN_MODEL_REFERENCE:
175:                         setDomainModelReference((VDomainModelReference) newValue);
176:                         return;
177:                 }
178:                 super.eSet(featureID, newValue);
179:         }
180:
181:         /**
182:          * <!-- begin-user-doc -->
183:          * <!-- end-user-doc -->
184:          *
185:          * @generated
186:          */
187:         @Override
188:         public void eUnset(int featureID) {
189:•                switch (featureID) {
190:                 case ErrorPackage.DMR_LOCATION__DOMAIN_MODEL_REFERENCE:
191:                         setDomainModelReference((VDomainModelReference) null);
192:                         return;
193:                 }
194:                 super.eUnset(featureID);
195:         }
196:
197:         /**
198:          * <!-- begin-user-doc -->
199:          * <!-- end-user-doc -->
200:          *
201:          * @generated
202:          */
203:         @Override
204:         public boolean eIsSet(int featureID) {
205:•                switch (featureID) {
206:                 case ErrorPackage.DMR_LOCATION__DOMAIN_MODEL_REFERENCE:
207:•                        return domainModelReference != null;
208:                 }
209:                 return super.eIsSet(featureID);
210:         }
211:
212: } // DMRLocationImpl