Skip to content

Package: ConditionItemProvider

ConditionItemProvider

nameinstructionbranchcomplexitylinemethod
ConditionItemProvider(AdapterFactory)
M: 0 C: 4
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
collectNewChildDescriptors(Collection, Object)
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%
getPropertyDescriptors(Object)
M: 0 C: 10
100%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 0 C: 3
100%
M: 0 C: 1
100%
getResourceLocator()
M: 0 C: 5
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
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: 0 C: 7
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%

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.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.IChildCreationExtender;
23: import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
24: import org.eclipse.emf.edit.provider.IItemLabelProvider;
25: import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
26: import org.eclipse.emf.edit.provider.IItemPropertySource;
27: import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
28: import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
29: import org.eclipse.emf.edit.provider.ItemProviderAdapter;
30:
31: /**
32: * This is the item provider adapter for a {@link org.eclipse.emf.ecp.view.spi.rule.model.Condition} object.
33: * <!-- begin-user-doc -->
34: *
35: * @since 1.2
36: * <!-- end-user-doc -->
37: * @generated
38: */
39: @SuppressWarnings("unused")
40: public class ConditionItemProvider extends ItemProviderAdapter implements
41:         IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider,
42:         IItemPropertySource {
43:         /**
44:          * This constructs an instance from a factory and a notifier.
45:          * <!-- begin-user-doc -->
46:          * <!-- end-user-doc -->
47:          *
48:          * @generated
49:          */
50:         public ConditionItemProvider(AdapterFactory adapterFactory) {
51:                 super(adapterFactory);
52:         }
53:
54:         /**
55:          * This returns the property descriptors for the adapted class.
56:          * <!-- begin-user-doc -->
57:          * <!-- end-user-doc -->
58:          *
59:          * @generated
60:          */
61:         @Override
62:         public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
63:•                if (itemPropertyDescriptors == null) {
64:                         super.getPropertyDescriptors(object);
65:
66:                 }
67:                 return itemPropertyDescriptors;
68:         }
69:
70:         /**
71:          * This returns the label text for the adapted class.
72:          * <!-- begin-user-doc -->
73:          * <!-- end-user-doc -->
74:          *
75:          * @generated
76:          */
77:         @Override
78:         public String getText(Object object) {
79:                 return getString("_UI_Condition_type"); //$NON-NLS-1$
80:         }
81:
82:         /**
83:          * This handles model notifications by calling {@link #updateChildren} to update any cached
84:          * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
85:          * <!-- begin-user-doc -->
86:          * <!-- end-user-doc -->
87:          *
88:          * @generated
89:          */
90:         @Override
91:         public void notifyChanged(Notification notification) {
92:                 updateChildren(notification);
93:                 super.notifyChanged(notification);
94:         }
95:
96:         /**
97:          * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
98:          * that can be created under this object.
99:          * <!-- begin-user-doc -->
100:          * <!-- end-user-doc -->
101:          *
102:          * @generated
103:          */
104:         @Override
105:         protected void collectNewChildDescriptors(
106:                 Collection<Object> newChildDescriptors, Object object) {
107:                 super.collectNewChildDescriptors(newChildDescriptors, object);
108:         }
109:
110:         /**
111:          * Return the resource locator for this item provider's resources.
112:          * <!-- begin-user-doc -->
113:          * <!-- end-user-doc -->
114:          *
115:          * @generated
116:          */
117:         @Override
118:         public ResourceLocator getResourceLocator() {
119:                 return ((IChildCreationExtender) adapterFactory).getResourceLocator();
120:         }
121:
122: }