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.OperatorTerm} object.
027: * <!-- begin-user-doc -->
028: * <!-- end-user-doc -->
029: * @generated
030: */
031: public class OperatorTermItemProvider 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 OperatorTermItemProvider(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: addSubTermPropertyDescriptor(object);
056: }
057: return itemPropertyDescriptors;
058: }
059:
060: /**
061: * This adds a property descriptor for the Sub Term feature.
062: * <!-- begin-user-doc -->
063: * <!-- end-user-doc -->
064: * @generated
065: */
066: protected void addSubTermPropertyDescriptor(Object object) {
067: itemPropertyDescriptors.add(createItemPropertyDescriptor(
068: ((ComposeableAdapterFactory) adapterFactory)
069: .getRootAdapterFactory(), getResourceLocator(),
070: getString("_UI_OperatorTerm_subTerm_feature"),
071: getString("_UI_PropertyDescriptor_description",
072: "_UI_OperatorTerm_subTerm_feature",
073: "_UI_OperatorTerm_type"),
074: NewprocessPackage.Literals.OPERATOR_TERM__SUB_TERM,
075: false, false, true, null, null, null));
076: }
077:
078: /**
079: * This returns OperatorTerm.gif.
080: * <!-- begin-user-doc -->
081: * <!-- end-user-doc -->
082: * @generated
083: */
084: public Object getImage(Object object) {
085: return overlayImage(object, getResourceLocator().getImage(
086: "full/obj16/OperatorTerm"));
087: }
088:
089: /**
090: * This returns the label text for the adapted class.
091: * <!-- begin-user-doc -->
092: * <!-- end-user-doc -->
093: * @generated
094: */
095: public String getText(Object object) {
096: return getString("_UI_OperatorTerm_type");
097: }
098:
099: /**
100: * This handles model notifications by calling {@link #updateChildren} to update any cached
101: * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
102: * <!-- begin-user-doc -->
103: * <!-- end-user-doc -->
104: * @generated
105: */
106: public void notifyChanged(Notification notification) {
107: updateChildren(notification);
108: super .notifyChanged(notification);
109: }
110:
111: /**
112: * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
113: * describing all of the children that can be created under this object.
114: * <!-- begin-user-doc -->
115: * <!-- end-user-doc -->
116: * @generated
117: */
118: protected void collectNewChildDescriptors(
119: Collection newChildDescriptors, Object object) {
120: super .collectNewChildDescriptors(newChildDescriptors, object);
121: }
122:
123: /**
124: * Return the resource locator for this item provider's resources.
125: * <!-- begin-user-doc -->
126: * <!-- end-user-doc -->
127: * @generated
128: */
129: public ResourceLocator getResourceLocator() {
130: return New_processEditPlugin.INSTANCE;
131: }
132:
133: }
|