Skip to content

Package: VTMultiStyleSelectorContainerImpl

VTMultiStyleSelectorContainerImpl

nameinstructionbranchcomplexitylinemethod
VTMultiStyleSelectorContainerImpl()
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: 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: 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: 4 C: 13
76%
M: 1 C: 5
83%
M: 1 C: 3
75%
M: 1 C: 2
67%
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: 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%
getSelectors()
M: 0 C: 14
100%
M: 0 C: 2
100%
M: 0 C: 2
100%
M: 0 C: 4
100%
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 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.impl.MinimalEObjectImpl;
23: import org.eclipse.emf.ecore.util.EObjectContainmentEList;
24: import org.eclipse.emf.ecore.util.InternalEList;
25: import org.eclipse.emf.ecp.view.template.model.VTMultiStyleSelectorContainer;
26: import org.eclipse.emf.ecp.view.template.model.VTStyleSelector;
27: import org.eclipse.emf.ecp.view.template.model.VTTemplatePackage;
28:
29: /**
30: * <!-- begin-user-doc -->
31: * An implementation of the model object '<em><b>Multi Style Selector Container</b></em>'.
32: * <!-- end-user-doc -->
33: * <p>
34: * The following features are implemented:
35: * </p>
36: * <ul>
37: * <li>{@link org.eclipse.emf.ecp.view.template.model.impl.VTMultiStyleSelectorContainerImpl#getSelectors
38: * <em>Selectors</em>}</li>
39: * </ul>
40: *
41: * @generated
42: */
43: public abstract class VTMultiStyleSelectorContainerImpl extends MinimalEObjectImpl.Container
44:         implements VTMultiStyleSelectorContainer {
45:         /**
46:          * The cached value of the '{@link #getSelectors() <em>Selectors</em>}' containment reference list.
47:          * <!-- begin-user-doc -->
48:          * <!-- end-user-doc -->
49:          *
50:          * @see #getSelectors()
51:          * @generated
52:          * @ordered
53:          */
54:         protected EList<VTStyleSelector> selectors;
55:
56:         /**
57:          * <!-- begin-user-doc -->
58:          * <!-- end-user-doc -->
59:          *
60:          * @generated
61:          */
62:         protected VTMultiStyleSelectorContainerImpl() {
63:                 super();
64:         }
65:
66:         /**
67:          * <!-- begin-user-doc -->
68:          * <!-- end-user-doc -->
69:          *
70:          * @generated
71:          */
72:         @Override
73:         protected EClass eStaticClass() {
74:                 return VTTemplatePackage.Literals.MULTI_STYLE_SELECTOR_CONTAINER;
75:         }
76:
77:         /**
78:          * <!-- begin-user-doc -->
79:          * <!-- end-user-doc -->
80:          *
81:          * @generated
82:          */
83:         @Override
84:         public EList<VTStyleSelector> getSelectors() {
85:•                if (selectors == null) {
86:                         selectors = new EObjectContainmentEList<VTStyleSelector>(VTStyleSelector.class, this,
87:                                 VTTemplatePackage.MULTI_STYLE_SELECTOR_CONTAINER__SELECTORS);
88:                 }
89:                 return selectors;
90:         }
91:
92:         /**
93:          * <!-- begin-user-doc -->
94:          * <!-- end-user-doc -->
95:          *
96:          * @generated
97:          */
98:         @Override
99:         public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
100:•                switch (featureID) {
101:                 case VTTemplatePackage.MULTI_STYLE_SELECTOR_CONTAINER__SELECTORS:
102:                         return ((InternalEList<?>) getSelectors()).basicRemove(otherEnd, msgs);
103:                 }
104:                 return super.eInverseRemove(otherEnd, featureID, msgs);
105:         }
106:
107:         /**
108:          * <!-- begin-user-doc -->
109:          * <!-- end-user-doc -->
110:          *
111:          * @generated
112:          */
113:         @Override
114:         public Object eGet(int featureID, boolean resolve, boolean coreType) {
115:•                switch (featureID) {
116:                 case VTTemplatePackage.MULTI_STYLE_SELECTOR_CONTAINER__SELECTORS:
117:                         return getSelectors();
118:                 }
119:                 return super.eGet(featureID, resolve, coreType);
120:         }
121:
122:         /**
123:          * <!-- begin-user-doc -->
124:          * <!-- end-user-doc -->
125:          *
126:          * @generated
127:          */
128:         @SuppressWarnings("unchecked")
129:         @Override
130:         public void eSet(int featureID, Object newValue) {
131:•                switch (featureID) {
132:                 case VTTemplatePackage.MULTI_STYLE_SELECTOR_CONTAINER__SELECTORS:
133:                         getSelectors().clear();
134:                         getSelectors().addAll((Collection<? extends VTStyleSelector>) 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 VTTemplatePackage.MULTI_STYLE_SELECTOR_CONTAINER__SELECTORS:
150:                         getSelectors().clear();
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 VTTemplatePackage.MULTI_STYLE_SELECTOR_CONTAINER__SELECTORS:
166:•                        return selectors != null && !selectors.isEmpty();
167:                 }
168:                 return super.eIsSet(featureID);
169:         }
170:
171: } // VTMultiStyleSelectorContainerImpl