Skip to content

Package: ShowRuleImpl

ShowRuleImpl

nameinstructionbranchcomplexitylinemethod
ShowRuleImpl()
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: 4 C: 8
67%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 1 C: 2
67%
M: 0 C: 1
100%
eIsSet(int)
M: 3 C: 6
67%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 1 C: 2
67%
M: 0 C: 1
100%
eSet(int, Object)
M: 0 C: 13
100%
M: 0 C: 2
100%
M: 0 C: 2
100%
M: 0 C: 5
100%
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%
isHide()
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%
setHide(boolean)
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%
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-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 GmbH - initial API and implementation
13: ******************************************************************************/
14: package org.eclipse.emf.ecp.view.spi.rule.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.rule.model.RulePackage;
20: import org.eclipse.emf.ecp.view.spi.rule.model.ShowRule;
21:
22: /**
23: * <!-- begin-user-doc -->
24: * An implementation of the model object '<em><b>Show Rule</b></em>'.
25: *
26: * @since 1.2
27: * <!-- end-user-doc -->
28: * <p>
29: * The following features are implemented:
30: * </p>
31: * <ul>
32: * <li>{@link org.eclipse.emf.ecp.view.spi.rule.model.impl.ShowRuleImpl#isHide <em>Hide</em>}</li>
33: * </ul>
34: *
35: * @generated
36: */
37: public class ShowRuleImpl extends RuleImpl implements ShowRule {
38:         /**
39:          * The default value of the '{@link #isHide() <em>Hide</em>}' attribute.
40:          * <!-- begin-user-doc -->
41:          * <!-- end-user-doc -->
42:          *
43:          * @see #isHide()
44:          * @generated
45:          * @ordered
46:          */
47:         protected static final boolean HIDE_EDEFAULT = false;
48:
49:         /**
50:          * The cached value of the '{@link #isHide() <em>Hide</em>}' attribute.
51:          * <!-- begin-user-doc -->
52:          * <!-- end-user-doc -->
53:          *
54:          * @see #isHide()
55:          * @generated
56:          * @ordered
57:          */
58:         protected boolean hide = HIDE_EDEFAULT;
59:
60:         /**
61:          * <!-- begin-user-doc -->
62:          * <!-- end-user-doc -->
63:          *
64:          * @generated
65:          */
66:         protected ShowRuleImpl() {
67:                 super();
68:         }
69:
70:         /**
71:          * <!-- begin-user-doc -->
72:          * <!-- end-user-doc -->
73:          *
74:          * @generated
75:          */
76:         @Override
77:         protected EClass eStaticClass() {
78:                 return RulePackage.Literals.SHOW_RULE;
79:         }
80:
81:         /**
82:          * <!-- begin-user-doc -->
83:          * <!-- end-user-doc -->
84:          *
85:          * @generated
86:          */
87:         @Override
88:         public boolean isHide() {
89:                 return hide;
90:         }
91:
92:         /**
93:          * <!-- begin-user-doc -->
94:          * <!-- end-user-doc -->
95:          *
96:          * @generated
97:          */
98:         @Override
99:         public void setHide(boolean newHide) {
100:                 final boolean oldHide = hide;
101:                 hide = newHide;
102:•                if (eNotificationRequired()) {
103:                         eNotify(new ENotificationImpl(this, Notification.SET, RulePackage.SHOW_RULE__HIDE, oldHide, hide));
104:                 }
105:         }
106:
107:         /**
108:          * <!-- begin-user-doc -->
109:          * <!-- end-user-doc -->
110:          *
111:          * @generated
112:          */
113:         @Override
114:         public Object eGet(int featureID, boolean resolve, boolean coreType) {
115:•                switch (featureID) {
116:                 case RulePackage.SHOW_RULE__HIDE:
117:                         return isHide();
118:                 }
119:                 return super.eGet(featureID, resolve, coreType);
120:         }
121:
122:         /**
123:          * <!-- begin-user-doc -->
124:          * <!-- end-user-doc -->
125:          *
126:          * @generated
127:          */
128:         @Override
129:         public void eSet(int featureID, Object newValue) {
130:•                switch (featureID) {
131:                 case RulePackage.SHOW_RULE__HIDE:
132:                         setHide((Boolean) newValue);
133:                         return;
134:                 }
135:                 super.eSet(featureID, newValue);
136:         }
137:
138:         /**
139:          * <!-- begin-user-doc -->
140:          * <!-- end-user-doc -->
141:          *
142:          * @generated
143:          */
144:         @Override
145:         public void eUnset(int featureID) {
146:•                switch (featureID) {
147:                 case RulePackage.SHOW_RULE__HIDE:
148:                         setHide(HIDE_EDEFAULT);
149:                         return;
150:                 }
151:                 super.eUnset(featureID);
152:         }
153:
154:         /**
155:          * <!-- begin-user-doc -->
156:          * <!-- end-user-doc -->
157:          *
158:          * @generated
159:          */
160:         @Override
161:         public boolean eIsSet(int featureID) {
162:•                switch (featureID) {
163:                 case RulePackage.SHOW_RULE__HIDE:
164:                         return hide != HIDE_EDEFAULT;
165:                 }
166:                 return super.eIsSet(featureID);
167:         }
168:
169:         /**
170:          * <!-- begin-user-doc -->
171:          * <!-- end-user-doc -->
172:          *
173:          * @generated
174:          */
175:         @Override
176:         public String toString() {
177:•                if (eIsProxy()) {
178:                         return super.toString();
179:                 }
180:
181:                 final StringBuffer result = new StringBuffer(super.toString());
182:                 result.append(" (hide: "); //$NON-NLS-1$
183:                 result.append(hide);
184:                 result.append(')');
185:                 return result.toString();
186:         }
187:
188: } // ShowRuleImpl