Skip to content

Package: VTStyleImpl

VTStyleImpl

nameinstructionbranchcomplexitylinemethod
VTStyleImpl()
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: 0 C: 11
100%
M: 0 C: 2
100%
M: 0 C: 2
100%
M: 0 C: 3
100%
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: 0 C: 17
100%
M: 0 C: 6
100%
M: 0 C: 4
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
eSet(int, Object)
M: 10 C: 7
41%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 3 C: 3
50%
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: 10 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 5 C: 0
0%
M: 1 C: 0
0%
getProperties()
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-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: * 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.util.EObjectContainmentEList;
23: import org.eclipse.emf.ecore.util.InternalEList;
24: import org.eclipse.emf.ecp.view.template.model.VTStyle;
25: import org.eclipse.emf.ecp.view.template.model.VTStyleProperty;
26: import org.eclipse.emf.ecp.view.template.model.VTTemplatePackage;
27:
28: /**
29: * <!-- begin-user-doc -->
30: * An implementation of the model object '<em><b>Style</b></em>'.
31: * <!-- end-user-doc -->
32: * <p>
33: * The following features are implemented:
34: * </p>
35: * <ul>
36: * <li>{@link org.eclipse.emf.ecp.view.template.model.impl.VTStyleImpl#getProperties <em>Properties</em>}</li>
37: * </ul>
38: *
39: * @generated
40: */
41: public class VTStyleImpl extends VTStyleSelectorContainerImpl implements VTStyle {
42:         /**
43:          * The cached value of the '{@link #getProperties() <em>Properties</em>}' containment reference list.
44:          * <!-- begin-user-doc -->
45:          * <!-- end-user-doc -->
46:          *
47:          * @see #getProperties()
48:          * @generated
49:          * @ordered
50:          */
51:         protected EList<VTStyleProperty> properties;
52:
53:         /**
54:          * <!-- begin-user-doc -->
55:          * <!-- end-user-doc -->
56:          *
57:          * @generated
58:          */
59:         protected VTStyleImpl() {
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;
72:         }
73:
74:         /**
75:          * <!-- begin-user-doc -->
76:          * <!-- end-user-doc -->
77:          *
78:          * @generated
79:          */
80:         @Override
81:         public EList<VTStyleProperty> getProperties() {
82:•                if (properties == null) {
83:                         properties = new EObjectContainmentEList<VTStyleProperty>(VTStyleProperty.class, this,
84:                                 VTTemplatePackage.STYLE__PROPERTIES);
85:                 }
86:                 return properties;
87:         }
88:
89:         /**
90:          * <!-- begin-user-doc -->
91:          * <!-- end-user-doc -->
92:          *
93:          * @generated
94:          */
95:         @Override
96:         public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
97:•                switch (featureID) {
98:                 case VTTemplatePackage.STYLE__PROPERTIES:
99:                         return ((InternalEList<?>) getProperties()).basicRemove(otherEnd, msgs);
100:                 }
101:                 return super.eInverseRemove(otherEnd, featureID, msgs);
102:         }
103:
104:         /**
105:          * <!-- begin-user-doc -->
106:          * <!-- end-user-doc -->
107:          *
108:          * @generated
109:          */
110:         @Override
111:         public Object eGet(int featureID, boolean resolve, boolean coreType) {
112:•                switch (featureID) {
113:                 case VTTemplatePackage.STYLE__PROPERTIES:
114:                         return getProperties();
115:                 }
116:                 return super.eGet(featureID, resolve, coreType);
117:         }
118:
119:         /**
120:          * <!-- begin-user-doc -->
121:          * <!-- end-user-doc -->
122:          *
123:          * @generated
124:          */
125:         @SuppressWarnings("unchecked")
126:         @Override
127:         public void eSet(int featureID, Object newValue) {
128:•                switch (featureID) {
129:                 case VTTemplatePackage.STYLE__PROPERTIES:
130:                         getProperties().clear();
131:                         getProperties().addAll((Collection<? extends VTStyleProperty>) newValue);
132:                         return;
133:                 }
134:                 super.eSet(featureID, newValue);
135:         }
136:
137:         /**
138:          * <!-- begin-user-doc -->
139:          * <!-- end-user-doc -->
140:          *
141:          * @generated
142:          */
143:         @Override
144:         public void eUnset(int featureID) {
145:•                switch (featureID) {
146:                 case VTTemplatePackage.STYLE__PROPERTIES:
147:                         getProperties().clear();
148:                         return;
149:                 }
150:                 super.eUnset(featureID);
151:         }
152:
153:         /**
154:          * <!-- begin-user-doc -->
155:          * <!-- end-user-doc -->
156:          *
157:          * @generated
158:          */
159:         @Override
160:         public boolean eIsSet(int featureID) {
161:•                switch (featureID) {
162:                 case VTTemplatePackage.STYLE__PROPERTIES:
163:•                        return properties != null && !properties.isEmpty();
164:                 }
165:                 return super.eIsSet(featureID);
166:         }
167:
168: } // VTStyleImpl