Skip to content

Package: VViewProxyImpl

VViewProxyImpl

nameinstructionbranchcomplexitylinemethod
VViewProxyImpl()
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: 11 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: 18 C: 6
25%
M: 7 C: 1
13%
M: 4 C: 1
20%
M: 1 C: 2
67%
M: 0 C: 1
100%
eSet(int, Object)
M: 12 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 5 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: 10 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 5 C: 0
0%
M: 1 C: 0
0%
getId()
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%
setId(String)
M: 11 C: 10
48%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 1 C: 4
80%
M: 0 C: 1
100%
static {...}
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%
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: * Johannes Faltermeier - initial API and implementation
13: */
14: package org.eclipse.emf.ecp.view.spi.viewproxy.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.model.impl.VContainedElementImpl;
20: import org.eclipse.emf.ecp.view.spi.viewproxy.model.VViewProxy;
21: import org.eclipse.emf.ecp.view.spi.viewproxy.model.VViewproxyPackage;
22:
23: /**
24: * <!-- begin-user-doc -->
25: * An implementation of the model object '<em><b>View Proxy</b></em>'.
26: * <!-- end-user-doc -->
27: * <p>
28: * The following features are implemented:
29: * <ul>
30: * <li>{@link org.eclipse.emf.ecp.view.spi.viewproxy.model.impl.VViewProxyImpl#getId <em>Id</em>}</li>
31: * </ul>
32: * </p>
33: *
34: * @generated
35: */
36: public class VViewProxyImpl extends VContainedElementImpl implements VViewProxy {
37:         /**
38:          * The default value of the '{@link #getId() <em>Id</em>}' attribute.
39:          * <!-- begin-user-doc -->
40:          * <!-- end-user-doc -->
41:          *
42:          * @see #getId()
43:          * @generated
44:          * @ordered
45:          */
46:         protected static final String ID_EDEFAULT = null;
47:
48:         /**
49:          * The cached value of the '{@link #getId() <em>Id</em>}' attribute.
50:          * <!-- begin-user-doc -->
51:          * <!-- end-user-doc -->
52:          *
53:          * @see #getId()
54:          * @generated
55:          * @ordered
56:          */
57:         protected String id = ID_EDEFAULT;
58:
59:         /**
60:          * <!-- begin-user-doc -->
61:          * <!-- end-user-doc -->
62:          *
63:          * @generated
64:          */
65:         protected VViewProxyImpl() {
66:                 super();
67:         }
68:
69:         /**
70:          * <!-- begin-user-doc -->
71:          * <!-- end-user-doc -->
72:          *
73:          * @generated
74:          */
75:         @Override
76:         protected EClass eStaticClass() {
77:                 return VViewproxyPackage.Literals.VIEW_PROXY;
78:         }
79:
80:         /**
81:          * <!-- begin-user-doc -->
82:          * <!-- end-user-doc -->
83:          *
84:          * @generated
85:          */
86:         @Override
87:         public String getId() {
88:                 return id;
89:         }
90:
91:         /**
92:          * <!-- begin-user-doc -->
93:          * <!-- end-user-doc -->
94:          *
95:          * @generated
96:          */
97:         @Override
98:         public void setId(String newId) {
99:                 final String oldId = id;
100:                 id = newId;
101:•                if (eNotificationRequired()) {
102:                         eNotify(new ENotificationImpl(this, Notification.SET, VViewproxyPackage.VIEW_PROXY__ID, oldId, id));
103:                 }
104:         }
105:
106:         /**
107:          * <!-- begin-user-doc -->
108:          * <!-- end-user-doc -->
109:          *
110:          * @generated
111:          */
112:         @Override
113:         public Object eGet(int featureID, boolean resolve, boolean coreType) {
114:•                switch (featureID) {
115:                 case VViewproxyPackage.VIEW_PROXY__ID:
116:                         return getId();
117:                 }
118:                 return super.eGet(featureID, resolve, coreType);
119:         }
120:
121:         /**
122:          * <!-- begin-user-doc -->
123:          * <!-- end-user-doc -->
124:          *
125:          * @generated
126:          */
127:         @Override
128:         public void eSet(int featureID, Object newValue) {
129:•                switch (featureID) {
130:                 case VViewproxyPackage.VIEW_PROXY__ID:
131:                         setId((String) 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 VViewproxyPackage.VIEW_PROXY__ID:
147:                         setId(ID_EDEFAULT);
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 VViewproxyPackage.VIEW_PROXY__ID:
163:•                        return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id);
164:                 }
165:                 return super.eIsSet(featureID);
166:         }
167:
168:         /**
169:          * <!-- begin-user-doc -->
170:          * <!-- end-user-doc -->
171:          *
172:          * @generated
173:          */
174:         @Override
175:         public String toString() {
176:•                if (eIsProxy()) {
177:                         return super.toString();
178:                 }
179:
180:                 final StringBuffer result = new StringBuffer(super.toString());
181:                 result.append(" (id: "); //$NON-NLS-1$
182:                 result.append(id);
183:                 result.append(')');
184:                 return result.toString();
185:         }
186:
187: } // VViewProxyImpl