Skip to content

Package: SettingLocationItemProvider

SettingLocationItemProvider

nameinstructionbranchcomplexitylinemethod
SettingLocationItemProvider(AdapterFactory)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
addEObjectPropertyDescriptor(Object)
M: 28 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 14 C: 0
0%
M: 1 C: 0
0%
addFeaturePropertyDescriptor(Object)
M: 28 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 14 C: 0
0%
M: 1 C: 0
0%
collectNewChildDescriptors(Collection, Object)
M: 5 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
getImage(Object)
M: 8 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getPropertyDescriptors(Object)
M: 16 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 5 C: 0
0%
M: 1 C: 0
0%
getResourceLocator()
M: 5 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getText(Object)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
notifyChanged(Notification)
M: 7 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /**
2: * Copyright (c) 2011-2015 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.emfforms.spi.spreadsheet.core.error.model.provider;
15:
16: import java.util.Collection;
17: import java.util.List;
18:
19: import org.eclipse.emf.common.notify.AdapterFactory;
20: import org.eclipse.emf.common.notify.Notification;
21: import org.eclipse.emf.common.util.ResourceLocator;
22: import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
23: import org.eclipse.emf.edit.provider.IChildCreationExtender;
24: import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
25: import org.eclipse.emf.edit.provider.IItemLabelProvider;
26: import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
27: import org.eclipse.emf.edit.provider.IItemPropertySource;
28: import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
29: import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
30: import org.eclipse.emf.edit.provider.ItemProviderAdapter;
31: import org.eclipse.emfforms.spi.spreadsheet.core.error.model.ErrorPackage;
32:
33: /**
34: * This is the item provider adapter for a {@link org.eclipse.emfforms.spi.spreadsheet.core.error.model.SettingLocation}
35: * object.
36: * <!-- begin-user-doc -->
37: * <!-- end-user-doc -->
38: *
39: * @generated
40: */
41: public class SettingLocationItemProvider
42:         extends ItemProviderAdapter
43:         implements
44:         IEditingDomainItemProvider,
45:         IStructuredItemContentProvider,
46:         ITreeItemContentProvider,
47:         IItemLabelProvider,
48:         IItemPropertySource {
49:         /**
50:          * This constructs an instance from a factory and a notifier.
51:          * <!-- begin-user-doc -->
52:          * <!-- end-user-doc -->
53:          *
54:          * @generated
55:          */
56:         public SettingLocationItemProvider(AdapterFactory adapterFactory) {
57:                 super(adapterFactory);
58:         }
59:
60:         /**
61:          * This returns the property descriptors for the adapted class.
62:          * <!-- begin-user-doc -->
63:          * <!-- end-user-doc -->
64:          *
65:          * @generated
66:          */
67:         @Override
68:         public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
69:•                if (itemPropertyDescriptors == null) {
70:                         super.getPropertyDescriptors(object);
71:
72:                         addEObjectPropertyDescriptor(object);
73:                         addFeaturePropertyDescriptor(object);
74:                 }
75:                 return itemPropertyDescriptors;
76:         }
77:
78:         /**
79:          * This adds a property descriptor for the EObject feature.
80:          * <!-- begin-user-doc -->
81:          * <!-- end-user-doc -->
82:          *
83:          * @generated
84:          */
85:         protected void addEObjectPropertyDescriptor(Object object) {
86:                 itemPropertyDescriptors
87:                         .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
88:                                 getResourceLocator(),
89:                                 getString("_UI_SettingLocation_eObject_feature"), //$NON-NLS-1$
90:                                 getString("_UI_PropertyDescriptor_description", "_UI_SettingLocation_eObject_feature", //$NON-NLS-1$ //$NON-NLS-2$
91:                                         "_UI_SettingLocation_type"), //$NON-NLS-1$
92:                                 ErrorPackage.Literals.SETTING_LOCATION__EOBJECT,
93:                                 true,
94:                                 false,
95:                                 true,
96:                                 null,
97:                                 null,
98:                                 null));
99:         }
100:
101:         /**
102:          * This adds a property descriptor for the Feature feature.
103:          * <!-- begin-user-doc -->
104:          * <!-- end-user-doc -->
105:          *
106:          * @generated
107:          */
108:         protected void addFeaturePropertyDescriptor(Object object) {
109:                 itemPropertyDescriptors
110:                         .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
111:                                 getResourceLocator(),
112:                                 getString("_UI_SettingLocation_feature_feature"), //$NON-NLS-1$
113:                                 getString("_UI_PropertyDescriptor_description", "_UI_SettingLocation_feature_feature", //$NON-NLS-1$ //$NON-NLS-2$
114:                                         "_UI_SettingLocation_type"), //$NON-NLS-1$
115:                                 ErrorPackage.Literals.SETTING_LOCATION__FEATURE,
116:                                 true,
117:                                 false,
118:                                 true,
119:                                 null,
120:                                 null,
121:                                 null));
122:         }
123:
124:         /**
125:          * This returns SettingLocation.gif.
126:          * <!-- begin-user-doc -->
127:          * <!-- end-user-doc -->
128:          *
129:          * @generated
130:          */
131:         @Override
132:         public Object getImage(Object object) {
133:                 return overlayImage(object, getResourceLocator().getImage("full/obj16/SettingLocation")); //$NON-NLS-1$
134:         }
135:
136:         /**
137:          * This returns the label text for the adapted class.
138:          * <!-- begin-user-doc -->
139:          * <!-- end-user-doc -->
140:          *
141:          * @generated
142:          */
143:         @Override
144:         public String getText(Object object) {
145:                 return getString("_UI_SettingLocation_type"); //$NON-NLS-1$
146:         }
147:
148:         /**
149:          * This handles model notifications by calling {@link #updateChildren} to update any cached
150:          * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
151:          * <!-- begin-user-doc -->
152:          * <!-- end-user-doc -->
153:          *
154:          * @generated
155:          */
156:         @Override
157:         public void notifyChanged(Notification notification) {
158:                 updateChildren(notification);
159:                 super.notifyChanged(notification);
160:         }
161:
162:         /**
163:          * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
164:          * that can be created under this object.
165:          * <!-- begin-user-doc -->
166:          * <!-- end-user-doc -->
167:          *
168:          * @generated
169:          */
170:         @Override
171:         protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
172:                 super.collectNewChildDescriptors(newChildDescriptors, object);
173:         }
174:
175:         /**
176:          * Return the resource locator for this item provider's resources.
177:          * <!-- begin-user-doc -->
178:          * <!-- end-user-doc -->
179:          *
180:          * @generated
181:          */
182:         @Override
183:         public ResourceLocator getResourceLocator() {
184:                 return ((IChildCreationExtender) adapterFactory).getResourceLocator();
185:         }
186:
187: }