Skip to content

Package: VTTextControlEnablementStylePropertyImpl

VTTextControlEnablementStylePropertyImpl

nameinstructionbranchcomplexitylinemethod
VTTextControlEnablementStylePropertyImpl()
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: 9 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
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%
isRenderDisableAsEditable()
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%
setRenderDisableAsEditable(boolean)
M: 11 C: 10
48%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 3 C: 4
57%
M: 0 C: 1
100%
toString()
M: 28 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 7 C: 0
0%
M: 1 C: 0
0%

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