001: /**
002: * <copyright>
003: * </copyright>
004: *
005: * $Id$
006: */package newprocess.provider;
007:
008: import java.util.Collection;
009: import java.util.List;
010:
011: import newprocess.NewprocessPackage;
012:
013: import org.eclipse.emf.common.notify.AdapterFactory;
014: import org.eclipse.emf.common.notify.Notification;
015:
016: import org.eclipse.emf.common.util.ResourceLocator;
017:
018: import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
019: import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
020: import org.eclipse.emf.edit.provider.IItemLabelProvider;
021: import org.eclipse.emf.edit.provider.IItemPropertySource;
022: import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
023: import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
024:
025: /**
026: * This is the item provider adapter for a {@link newprocess.ConditionTerm} object.
027: * <!-- begin-user-doc -->
028: * <!-- end-user-doc -->
029: * @generated
030: */
031: public class ConditionTermItemProvider extends TermItemProvider
032: implements IEditingDomainItemProvider,
033: IStructuredItemContentProvider, ITreeItemContentProvider,
034: IItemLabelProvider, IItemPropertySource {
035: /**
036: * This constructs an instance from a factory and a notifier.
037: * <!-- begin-user-doc -->
038: * <!-- end-user-doc -->
039: * @generated
040: */
041: public ConditionTermItemProvider(AdapterFactory adapterFactory) {
042: super (adapterFactory);
043: }
044:
045: /**
046: * This returns the property descriptors for the adapted class.
047: * <!-- begin-user-doc -->
048: * <!-- end-user-doc -->
049: * @generated
050: */
051: public List getPropertyDescriptors(Object object) {
052: if (itemPropertyDescriptors == null) {
053: super .getPropertyDescriptors(object);
054:
055: addConditionProxyPropertyDescriptor(object);
056: }
057: return itemPropertyDescriptors;
058: }
059:
060: /**
061: * This adds a property descriptor for the Condition Proxy feature.
062: * <!-- begin-user-doc -->
063: * <!-- end-user-doc -->
064: * @generated
065: */
066: protected void addConditionProxyPropertyDescriptor(Object object) {
067: itemPropertyDescriptors
068: .add(createItemPropertyDescriptor(
069: ((ComposeableAdapterFactory) adapterFactory)
070: .getRootAdapterFactory(),
071: getResourceLocator(),
072: getString("_UI_ConditionTerm_conditionProxy_feature"),
073: getString(
074: "_UI_PropertyDescriptor_description",
075: "_UI_ConditionTerm_conditionProxy_feature",
076: "_UI_ConditionTerm_type"),
077: NewprocessPackage.Literals.CONDITION_TERM__CONDITION_PROXY,
078: false, false, true, null, null, null));
079: }
080:
081: /**
082: * This returns ConditionTerm.gif.
083: * <!-- begin-user-doc -->
084: * <!-- end-user-doc -->
085: * @generated
086: */
087: public Object getImage(Object object) {
088: return overlayImage(object, getResourceLocator().getImage(
089: "full/obj16/ConditionTerm"));
090: }
091:
092: /**
093: * This returns the label text for the adapted class.
094: * <!-- begin-user-doc -->
095: * <!-- end-user-doc -->
096: * @generated
097: */
098: public String getText(Object object) {
099: return getString("_UI_ConditionTerm_type");
100: }
101:
102: /**
103: * This handles model notifications by calling {@link #updateChildren} to update any cached
104: * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
105: * <!-- begin-user-doc -->
106: * <!-- end-user-doc -->
107: * @generated
108: */
109: public void notifyChanged(Notification notification) {
110: updateChildren(notification);
111: super .notifyChanged(notification);
112: }
113:
114: /**
115: * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
116: * describing all of the children that can be created under this object.
117: * <!-- begin-user-doc -->
118: * <!-- end-user-doc -->
119: * @generated
120: */
121: protected void collectNewChildDescriptors(
122: Collection newChildDescriptors, Object object) {
123: super .collectNewChildDescriptors(newChildDescriptors, object);
124: }
125:
126: /**
127: * Return the resource locator for this item provider's resources.
128: * <!-- begin-user-doc -->
129: * <!-- end-user-doc -->
130: * @generated
131: */
132: public ResourceLocator getResourceLocator() {
133: return New_processEditPlugin.INSTANCE;
134: }
135:
136: }
|