Skip to content

Package: VTLabelWrapStylePropertyImpl

VTLabelWrapStylePropertyImpl

nameinstructionbranchcomplexitylinemethod
VTLabelWrapStylePropertyImpl()
M: 0 C: 6
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
eGet(int, boolean, boolean)
M: 6 C: 6
50%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 1 C: 2
67%
M: 0 C: 1
100%
eIsSet(int)
M: 4 C: 5
56%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 1 C: 2
67%
M: 0 C: 1
100%
eSet(int, Object)
M: 5 C: 8
62%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 2 C: 3
60%
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%
equalStyles(VTStyleProperty)
M: 0 C: 6
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
isWrapLabel()
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%
setWrapLabel(boolean)
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%
toString()
M: 3 C: 25
89%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 1 C: 6
86%
M: 0 C: 1
100%

Coverage

1: /**
2: * Copyright (c) 2011-2018 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.emf.ecp.view.template.style.wrap.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.emf.ecp.common.spi.EMFUtils;
21: import org.eclipse.emf.ecp.view.template.model.VTStyleProperty;
22: import org.eclipse.emf.ecp.view.template.style.wrap.model.VTLabelWrapStyleProperty;
23: import org.eclipse.emf.ecp.view.template.style.wrap.model.VTWrapPackage;
24:
25: /**
26: * <!-- begin-user-doc -->
27: * An implementation of the model object '<em><b>Label Wrap Style Property</b></em>'.
28: * <!-- end-user-doc -->
29: * <p>
30: * The following features are implemented:
31: * </p>
32: * <ul>
33: * <li>{@link org.eclipse.emf.ecp.view.template.style.wrap.model.impl.VTLabelWrapStylePropertyImpl#isWrapLabel <em>Wrap
34: * Label</em>}</li>
35: * </ul>
36: *
37: * @generated
38: */
39: public class VTLabelWrapStylePropertyImpl extends MinimalEObjectImpl.Container implements VTLabelWrapStyleProperty {
40:         /**
41:          * The default value of the '{@link #isWrapLabel() <em>Wrap Label</em>}' attribute.
42:          * <!-- begin-user-doc -->
43:          * <!-- end-user-doc -->
44:          *
45:          * @see #isWrapLabel()
46:          * @generated
47:          * @ordered
48:          */
49:         protected static final boolean WRAP_LABEL_EDEFAULT = false;
50:
51:         /**
52:          * The cached value of the '{@link #isWrapLabel() <em>Wrap Label</em>}' attribute.
53:          * <!-- begin-user-doc -->
54:          * <!-- end-user-doc -->
55:          *
56:          * @see #isWrapLabel()
57:          * @generated
58:          * @ordered
59:          */
60:         protected boolean wrapLabel = WRAP_LABEL_EDEFAULT;
61:
62:         /**
63:          * <!-- begin-user-doc -->
64:          * <!-- end-user-doc -->
65:          *
66:          * @generated
67:          */
68:         protected VTLabelWrapStylePropertyImpl() {
69:                 super();
70:         }
71:
72:         /**
73:          * <!-- begin-user-doc -->
74:          * <!-- end-user-doc -->
75:          *
76:          * @generated
77:          */
78:         @Override
79:         protected EClass eStaticClass() {
80:                 return VTWrapPackage.Literals.LABEL_WRAP_STYLE_PROPERTY;
81:         }
82:
83:         /**
84:          * <!-- begin-user-doc -->
85:          * <!-- end-user-doc -->
86:          *
87:          * @generated
88:          */
89:         @Override
90:         public boolean isWrapLabel() {
91:                 return wrapLabel;
92:         }
93:
94:         /**
95:          * <!-- begin-user-doc -->
96:          * <!-- end-user-doc -->
97:          *
98:          * @generated
99:          */
100:         @Override
101:         public void setWrapLabel(boolean newWrapLabel) {
102:                 final boolean oldWrapLabel = wrapLabel;
103:                 wrapLabel = newWrapLabel;
104:•                if (eNotificationRequired()) {
105:                         eNotify(new ENotificationImpl(this, Notification.SET, VTWrapPackage.LABEL_WRAP_STYLE_PROPERTY__WRAP_LABEL,
106:                                 oldWrapLabel, wrapLabel));
107:                 }
108:         }
109:
110:         /**
111:          * <!-- begin-user-doc -->
112:          * <!-- end-user-doc -->
113:          *
114:          * @generated
115:          */
116:         @Override
117:         public Object eGet(int featureID, boolean resolve, boolean coreType) {
118:•                switch (featureID) {
119:                 case VTWrapPackage.LABEL_WRAP_STYLE_PROPERTY__WRAP_LABEL:
120:                         return isWrapLabel();
121:                 }
122:                 return super.eGet(featureID, resolve, coreType);
123:         }
124:
125:         /**
126:          * <!-- begin-user-doc -->
127:          * <!-- end-user-doc -->
128:          *
129:          * @generated
130:          */
131:         @Override
132:         public void eSet(int featureID, Object newValue) {
133:•                switch (featureID) {
134:                 case VTWrapPackage.LABEL_WRAP_STYLE_PROPERTY__WRAP_LABEL:
135:                         setWrapLabel((Boolean) newValue);
136:                         return;
137:                 }
138:                 super.eSet(featureID, newValue);
139:         }
140:
141:         /**
142:          * <!-- begin-user-doc -->
143:          * <!-- end-user-doc -->
144:          *
145:          * @generated
146:          */
147:         @Override
148:         public void eUnset(int featureID) {
149:•                switch (featureID) {
150:                 case VTWrapPackage.LABEL_WRAP_STYLE_PROPERTY__WRAP_LABEL:
151:                         setWrapLabel(WRAP_LABEL_EDEFAULT);
152:                         return;
153:                 }
154:                 super.eUnset(featureID);
155:         }
156:
157:         /**
158:          * <!-- begin-user-doc -->
159:          * <!-- end-user-doc -->
160:          *
161:          * @generated
162:          */
163:         @Override
164:         public boolean eIsSet(int featureID) {
165:•                switch (featureID) {
166:                 case VTWrapPackage.LABEL_WRAP_STYLE_PROPERTY__WRAP_LABEL:
167:                         return wrapLabel != WRAP_LABEL_EDEFAULT;
168:                 }
169:                 return super.eIsSet(featureID);
170:         }
171:
172:         /**
173:          * <!-- begin-user-doc -->
174:          * <!-- end-user-doc -->
175:          *
176:          * @generated
177:          */
178:         @Override
179:         public String toString() {
180:•                if (eIsProxy()) {
181:                         return super.toString();
182:                 }
183:
184:                 final StringBuffer result = new StringBuffer(super.toString());
185:                 result.append(" (wrapLabel: "); //$NON-NLS-1$
186:                 result.append(wrapLabel);
187:                 result.append(')');
188:                 return result.toString();
189:         }
190:
191:         @Override
192:         public boolean equalStyles(VTStyleProperty styleProperty) {
193:                 return EMFUtils.filteredEquals(this, styleProperty);
194:         }
195:
196: } // VTLabelWrapStylePropertyImpl