Skip to content

Package: VTStyleSelectorContainerImpl

VTStyleSelectorContainerImpl

nameinstructionbranchcomplexitylinemethod
VTStyleSelectorContainerImpl()
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%
basicSetSelector(VTStyleSelector, NotificationChain)
M: 4 C: 25
86%
M: 1 C: 3
75%
M: 1 C: 2
67%
M: 1 C: 9
90%
M: 0 C: 1
100%
eGet(int, boolean, boolean)
M: 6 C: 5
45%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 1 C: 2
67%
M: 0 C: 1
100%
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: 4 C: 9
69%
M: 1 C: 3
75%
M: 1 C: 2
67%
M: 1 C: 2
67%
M: 0 C: 1
100%
eSet(int, Object)
M: 5 C: 7
58%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 2 C: 3
60%
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%
getSelector()
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%
setSelector(VTStyleSelector)
M: 19 C: 33
63%
M: 3 C: 7
70%
M: 3 C: 3
50%
M: 4 C: 11
73%
M: 0 C: 1
100%

Coverage

1: /**
2: * Copyright (c) 2011-2014 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.template.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.template.model.VTStyleSelector;
23: import org.eclipse.emf.ecp.view.template.model.VTStyleSelectorContainer;
24: import org.eclipse.emf.ecp.view.template.model.VTTemplatePackage;
25:
26: /**
27: * <!-- begin-user-doc -->
28: * An implementation of the model object '<em><b>Style Selector Container</b></em>'.
29: * <!-- end-user-doc -->
30: * <p>
31: * The following features are implemented:
32: * </p>
33: * <ul>
34: * <li>{@link org.eclipse.emf.ecp.view.template.model.impl.VTStyleSelectorContainerImpl#getSelector
35: * <em>Selector</em>}</li>
36: * </ul>
37: *
38: * @generated
39: */
40: public abstract class VTStyleSelectorContainerImpl extends MinimalEObjectImpl.Container
41:         implements VTStyleSelectorContainer {
42:         /**
43:          * The cached value of the '{@link #getSelector() <em>Selector</em>}' containment reference.
44:          * <!-- begin-user-doc -->
45:          * <!-- end-user-doc -->
46:          *
47:          * @see #getSelector()
48:          * @generated
49:          * @ordered
50:          */
51:         protected VTStyleSelector selector;
52:
53:         /**
54:          * <!-- begin-user-doc -->
55:          * <!-- end-user-doc -->
56:          *
57:          * @generated
58:          */
59:         protected VTStyleSelectorContainerImpl() {
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 VTTemplatePackage.Literals.STYLE_SELECTOR_CONTAINER;
72:         }
73:
74:         /**
75:          * <!-- begin-user-doc -->
76:          * <!-- end-user-doc -->
77:          *
78:          * @generated
79:          */
80:         @Override
81:         public VTStyleSelector getSelector() {
82:                 return selector;
83:         }
84:
85:         /**
86:          * <!-- begin-user-doc -->
87:          * <!-- end-user-doc -->
88:          *
89:          * @generated
90:          */
91:         public NotificationChain basicSetSelector(VTStyleSelector newSelector, NotificationChain msgs) {
92:                 final VTStyleSelector oldSelector = selector;
93:                 selector = newSelector;
94:•                if (eNotificationRequired()) {
95:                         final ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
96:                                 VTTemplatePackage.STYLE_SELECTOR_CONTAINER__SELECTOR, oldSelector, newSelector);
97:•                        if (msgs == null) {
98:                                 msgs = notification;
99:                         } else {
100:                                 msgs.add(notification);
101:                         }
102:                 }
103:                 return msgs;
104:         }
105:
106:         /**
107:          * <!-- begin-user-doc -->
108:          * <!-- end-user-doc -->
109:          *
110:          * @generated
111:          */
112:         @Override
113:         public void setSelector(VTStyleSelector newSelector) {
114:•                if (newSelector != selector) {
115:                         NotificationChain msgs = null;
116:•                        if (selector != null) {
117:                                 msgs = ((InternalEObject) selector).eInverseRemove(this,
118:                                         EOPPOSITE_FEATURE_BASE - VTTemplatePackage.STYLE_SELECTOR_CONTAINER__SELECTOR, null, msgs);
119:                         }
120:•                        if (newSelector != null) {
121:                                 msgs = ((InternalEObject) newSelector).eInverseAdd(this,
122:                                         EOPPOSITE_FEATURE_BASE - VTTemplatePackage.STYLE_SELECTOR_CONTAINER__SELECTOR, null, msgs);
123:                         }
124:                         msgs = basicSetSelector(newSelector, msgs);
125:•                        if (msgs != null) {
126:                                 msgs.dispatch();
127:                         }
128:•                } else if (eNotificationRequired()) {
129:                         eNotify(new ENotificationImpl(this, Notification.SET, VTTemplatePackage.STYLE_SELECTOR_CONTAINER__SELECTOR,
130:                                 newSelector, newSelector));
131:                 }
132:         }
133:
134:         /**
135:          * <!-- begin-user-doc -->
136:          * <!-- end-user-doc -->
137:          *
138:          * @generated
139:          */
140:         @Override
141:         public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
142:•                switch (featureID) {
143:                 case VTTemplatePackage.STYLE_SELECTOR_CONTAINER__SELECTOR:
144:                         return basicSetSelector(null, msgs);
145:                 }
146:                 return super.eInverseRemove(otherEnd, featureID, msgs);
147:         }
148:
149:         /**
150:          * <!-- begin-user-doc -->
151:          * <!-- end-user-doc -->
152:          *
153:          * @generated
154:          */
155:         @Override
156:         public Object eGet(int featureID, boolean resolve, boolean coreType) {
157:•                switch (featureID) {
158:                 case VTTemplatePackage.STYLE_SELECTOR_CONTAINER__SELECTOR:
159:                         return getSelector();
160:                 }
161:                 return super.eGet(featureID, resolve, coreType);
162:         }
163:
164:         /**
165:          * <!-- begin-user-doc -->
166:          * <!-- end-user-doc -->
167:          *
168:          * @generated
169:          */
170:         @Override
171:         public void eSet(int featureID, Object newValue) {
172:•                switch (featureID) {
173:                 case VTTemplatePackage.STYLE_SELECTOR_CONTAINER__SELECTOR:
174:                         setSelector((VTStyleSelector) newValue);
175:                         return;
176:                 }
177:                 super.eSet(featureID, newValue);
178:         }
179:
180:         /**
181:          * <!-- begin-user-doc -->
182:          * <!-- end-user-doc -->
183:          *
184:          * @generated
185:          */
186:         @Override
187:         public void eUnset(int featureID) {
188:•                switch (featureID) {
189:                 case VTTemplatePackage.STYLE_SELECTOR_CONTAINER__SELECTOR:
190:                         setSelector((VTStyleSelector) null);
191:                         return;
192:                 }
193:                 super.eUnset(featureID);
194:         }
195:
196:         /**
197:          * <!-- begin-user-doc -->
198:          * <!-- end-user-doc -->
199:          *
200:          * @generated
201:          */
202:         @Override
203:         public boolean eIsSet(int featureID) {
204:•                switch (featureID) {
205:                 case VTTemplatePackage.STYLE_SELECTOR_CONTAINER__SELECTOR:
206:•                        return selector != null;
207:                 }
208:                 return super.eIsSet(featureID);
209:         }
210:
211: } // VTStyleSelectorContainerImpl