Skip to content

Package: VCustomControlImpl

VCustomControlImpl

nameinstructionbranchcomplexitylinemethod
VCustomControlImpl()
M: 0 C: 9
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
eGet(int, boolean, boolean)
M: 6 C: 8
57%
M: 2 C: 1
33%
M: 2 C: 1
33%
M: 2 C: 2
50%
M: 0 C: 1
100%
eIsSet(int)
M: 36 C: 6
14%
M: 14 C: 1
7%
M: 8 C: 1
11%
M: 2 C: 2
50%
M: 0 C: 1
100%
eSet(int, Object)
M: 17 C: 0
0%
M: 3 C: 0
0%
M: 3 C: 0
0%
M: 7 C: 0
0%
M: 1 C: 0
0%
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: 14 C: 0
0%
M: 3 C: 0
0%
M: 3 C: 0
0%
M: 7 C: 0
0%
M: 1 C: 0
0%
getBundleName()
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%
getClassName()
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%
setBundleName(String)
M: 0 C: 21
100%
M: 0 C: 2
100%
M: 0 C: 2
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
setClassName(String)
M: 0 C: 21
100%
M: 0 C: 2
100%
M: 0 C: 2
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
static {...}
M: 0 C: 5
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
toString()
M: 37 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 9 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: * Eugen Neufeld - initial API and implementation
13: ******************************************************************************/
14: package org.eclipse.emf.ecp.view.spi.custom.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.ecp.view.spi.custom.model.VCustomControl;
20: import org.eclipse.emf.ecp.view.spi.custom.model.VCustomPackage;
21: import org.eclipse.emf.ecp.view.spi.model.impl.VControlImpl;
22:
23: /**
24: * <!-- begin-user-doc -->
25: * An implementation of the model object '<em><b>Control</b></em>'.
26: *
27: * @since 1.3
28: * <!-- end-user-doc -->
29: * <p>
30: * The following features are implemented:
31: * <ul>
32: * <li>{@link org.eclipse.emf.ecp.view.spi.custom.model.impl.VCustomControlImpl#getBundleName <em>Bundle Name
33: * </em>}</li>
34: * <li>{@link org.eclipse.emf.ecp.view.spi.custom.model.impl.VCustomControlImpl#getClassName <em>Class Name</em>}
35: * </li>
36: * </ul>
37: * </p>
38: *
39: * @generated
40: */
41: public class VCustomControlImpl extends VControlImpl implements VCustomControl {
42:         /**
43:          * The default value of the '{@link #getBundleName() <em>Bundle Name</em>}' attribute.
44:          * <!-- begin-user-doc -->
45:          * <!-- end-user-doc -->
46:          *
47:          * @see #getBundleName()
48:          * @generated
49:          * @ordered
50:          */
51:         protected static final String BUNDLE_NAME_EDEFAULT = null;
52:
53:         /**
54:          * The cached value of the '{@link #getBundleName() <em>Bundle Name</em>}' attribute.
55:          * <!-- begin-user-doc -->
56:          * <!-- end-user-doc -->
57:          *
58:          * @see #getBundleName()
59:          * @generated
60:          * @ordered
61:          */
62:         protected String bundleName = BUNDLE_NAME_EDEFAULT;
63:
64:         /**
65:          * The default value of the '{@link #getClassName() <em>Class Name</em>}' attribute.
66:          * <!-- begin-user-doc -->
67:          * <!-- end-user-doc -->
68:          *
69:          * @see #getClassName()
70:          * @generated
71:          * @ordered
72:          */
73:         protected static final String CLASS_NAME_EDEFAULT = null;
74:
75:         /**
76:          * The cached value of the '{@link #getClassName() <em>Class Name</em>}' attribute.
77:          * <!-- begin-user-doc -->
78:          * <!-- end-user-doc -->
79:          *
80:          * @see #getClassName()
81:          * @generated
82:          * @ordered
83:          */
84:         protected String className = CLASS_NAME_EDEFAULT;
85:
86:         /**
87:          * <!-- begin-user-doc -->
88:          * <!-- end-user-doc -->
89:          *
90:          * @generated
91:          */
92:         protected VCustomControlImpl() {
93:                 super();
94:         }
95:
96:         /**
97:          * <!-- begin-user-doc -->
98:          * <!-- end-user-doc -->
99:          *
100:          * @generated
101:          */
102:         @Override
103:         protected EClass eStaticClass() {
104:                 return VCustomPackage.Literals.CUSTOM_CONTROL;
105:         }
106:
107:         /**
108:          * <!-- begin-user-doc -->
109:          * <!-- end-user-doc -->
110:          *
111:          * @generated
112:          */
113:         @Override
114:         public String getBundleName() {
115:                 return bundleName;
116:         }
117:
118:         /**
119:          * <!-- begin-user-doc -->
120:          * <!-- end-user-doc -->
121:          *
122:          * @generated
123:          */
124:         @Override
125:         public void setBundleName(String newBundleName) {
126:                 final String oldBundleName = bundleName;
127:                 bundleName = newBundleName;
128:•                if (eNotificationRequired()) {
129:                         eNotify(new ENotificationImpl(this, Notification.SET, VCustomPackage.CUSTOM_CONTROL__BUNDLE_NAME,
130:                                 oldBundleName, bundleName));
131:                 }
132:         }
133:
134:         /**
135:          * <!-- begin-user-doc -->
136:          * <!-- end-user-doc -->
137:          *
138:          * @generated
139:          */
140:         @Override
141:         public String getClassName() {
142:                 return className;
143:         }
144:
145:         /**
146:          * <!-- begin-user-doc -->
147:          * <!-- end-user-doc -->
148:          *
149:          * @generated
150:          */
151:         @Override
152:         public void setClassName(String newClassName) {
153:                 final String oldClassName = className;
154:                 className = newClassName;
155:•                if (eNotificationRequired()) {
156:                         eNotify(new ENotificationImpl(this, Notification.SET, VCustomPackage.CUSTOM_CONTROL__CLASS_NAME,
157:                                 oldClassName, className));
158:                 }
159:         }
160:
161:         /**
162:          * <!-- begin-user-doc -->
163:          * <!-- end-user-doc -->
164:          *
165:          * @generated
166:          */
167:         @Override
168:         public Object eGet(int featureID, boolean resolve, boolean coreType) {
169:•                switch (featureID) {
170:                 case VCustomPackage.CUSTOM_CONTROL__BUNDLE_NAME:
171:                         return getBundleName();
172:                 case VCustomPackage.CUSTOM_CONTROL__CLASS_NAME:
173:                         return getClassName();
174:                 }
175:                 return super.eGet(featureID, resolve, coreType);
176:         }
177:
178:         /**
179:          * <!-- begin-user-doc -->
180:          * <!-- end-user-doc -->
181:          *
182:          * @generated
183:          */
184:         @Override
185:         public void eSet(int featureID, Object newValue) {
186:•                switch (featureID) {
187:                 case VCustomPackage.CUSTOM_CONTROL__BUNDLE_NAME:
188:                         setBundleName((String) newValue);
189:                         return;
190:                 case VCustomPackage.CUSTOM_CONTROL__CLASS_NAME:
191:                         setClassName((String) newValue);
192:                         return;
193:                 }
194:                 super.eSet(featureID, newValue);
195:         }
196:
197:         /**
198:          * <!-- begin-user-doc -->
199:          * <!-- end-user-doc -->
200:          *
201:          * @generated
202:          */
203:         @Override
204:         public void eUnset(int featureID) {
205:•                switch (featureID) {
206:                 case VCustomPackage.CUSTOM_CONTROL__BUNDLE_NAME:
207:                         setBundleName(BUNDLE_NAME_EDEFAULT);
208:                         return;
209:                 case VCustomPackage.CUSTOM_CONTROL__CLASS_NAME:
210:                         setClassName(CLASS_NAME_EDEFAULT);
211:                         return;
212:                 }
213:                 super.eUnset(featureID);
214:         }
215:
216:         /**
217:          * <!-- begin-user-doc -->
218:          * <!-- end-user-doc -->
219:          *
220:          * @generated
221:          */
222:         @Override
223:         public boolean eIsSet(int featureID) {
224:•                switch (featureID) {
225:                 case VCustomPackage.CUSTOM_CONTROL__BUNDLE_NAME:
226:•                        return BUNDLE_NAME_EDEFAULT == null ? bundleName != null : !BUNDLE_NAME_EDEFAULT.equals(bundleName);
227:                 case VCustomPackage.CUSTOM_CONTROL__CLASS_NAME:
228:•                        return CLASS_NAME_EDEFAULT == null ? className != null : !CLASS_NAME_EDEFAULT.equals(className);
229:                 }
230:                 return super.eIsSet(featureID);
231:         }
232:
233:         /**
234:          * <!-- begin-user-doc -->
235:          * <!-- end-user-doc -->
236:          *
237:          * @generated
238:          */
239:         @Override
240:         public String toString() {
241:•                if (eIsProxy()) {
242:                         return super.toString();
243:                 }
244:
245:                 final StringBuffer result = new StringBuffer(super.toString());
246:                 result.append(" (bundleName: "); //$NON-NLS-1$
247:                 result.append(bundleName);
248:                 result.append(", className: "); //$NON-NLS-1$
249:                 result.append(className);
250:                 result.append(')');
251:                 return result.toString();
252:         }
253:
254: } // VCustomControlImpl