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.Actor;
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.IEditingDomainItemProvider;
019: import org.eclipse.emf.edit.provider.IItemLabelProvider;
020: import org.eclipse.emf.edit.provider.IItemPropertySource;
021: import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
022: import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
023:
024: /**
025: * This is the item provider adapter for a {@link newprocess.Actor} object.
026: * <!-- begin-user-doc -->
027: * <!-- end-user-doc -->
028: * @generated
029: */
030: public class ActorItemProvider extends ElementItemProvider implements
031: IEditingDomainItemProvider, IStructuredItemContentProvider,
032: ITreeItemContentProvider, IItemLabelProvider,
033: IItemPropertySource {
034: /**
035: * This constructs an instance from a factory and a notifier.
036: * <!-- begin-user-doc -->
037: * <!-- end-user-doc -->
038: * @generated
039: */
040: public ActorItemProvider(AdapterFactory adapterFactory) {
041: super (adapterFactory);
042: }
043:
044: /**
045: * This returns the property descriptors for the adapted class.
046: * <!-- begin-user-doc -->
047: * <!-- end-user-doc -->
048: * @generated
049: */
050: public List getPropertyDescriptors(Object object) {
051: if (itemPropertyDescriptors == null) {
052: super .getPropertyDescriptors(object);
053:
054: }
055: return itemPropertyDescriptors;
056: }
057:
058: /**
059: * This returns Actor.gif.
060: * <!-- begin-user-doc -->
061: * <!-- end-user-doc -->
062: * @generated
063: */
064: public Object getImage(Object object) {
065: return overlayImage(object, getResourceLocator().getImage(
066: "full/obj16/Actor"));
067: }
068:
069: /**
070: * This returns the label text for the adapted class.
071: * <!-- begin-user-doc -->
072: * <!-- end-user-doc -->
073: * @generated
074: */
075: public String getText(Object object) {
076: String label = ((Actor) object).getName();
077: return label == null || label.length() == 0 ? getString("_UI_Actor_type")
078: : getString("_UI_Actor_type") + " " + label;
079: }
080:
081: /**
082: * This handles model notifications by calling {@link #updateChildren} to update any cached
083: * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
084: * <!-- begin-user-doc -->
085: * <!-- end-user-doc -->
086: * @generated
087: */
088: public void notifyChanged(Notification notification) {
089: updateChildren(notification);
090: super .notifyChanged(notification);
091: }
092:
093: /**
094: * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
095: * describing all of the children that can be created under this object.
096: * <!-- begin-user-doc -->
097: * <!-- end-user-doc -->
098: * @generated
099: */
100: protected void collectNewChildDescriptors(
101: Collection newChildDescriptors, Object object) {
102: super .collectNewChildDescriptors(newChildDescriptors, object);
103: }
104:
105: /**
106: * Return the resource locator for this item provider's resources.
107: * <!-- begin-user-doc -->
108: * <!-- end-user-doc -->
109: * @generated
110: */
111: public ResourceLocator getResourceLocator() {
112: return New_processEditPlugin.INSTANCE;
113: }
114:
115: }
|