org.eclipse.emf.edit.provider
Class ReflectiveItemProvider
java.lang.Object
|
+--org.eclipse.emf.common.notify.impl.AdapterImpl
|
+--org.eclipse.emf.edit.provider.ItemProviderAdapter
|
+--org.eclipse.emf.edit.provider.ReflectiveItemProvider
- All Implemented Interfaces:
- Adapter, CreateChildCommand.Helper, IChangeNotifier, IDisposable, IEditingDomainItemProvider, IItemLabelProvider, IItemPropertySource, IStructuredItemContentProvider, ITreeItemContentProvider, ResourceLocator
- public class ReflectiveItemProvider
- extends ItemProviderAdapter
- implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource
This adapter implementation provides reflective support
that emulates the behaviour of a default generated item provider.
Method Summary |
protected void |
collectNewChildDescriptors(java.util.Collection newChildDescriptors,
java.lang.Object object)
This adds to newChildDescriptors , a collection of CommandParameter s, parameters for
possible children of the specified object , when viewed as
an instance of the type for which this is an item provider. |
protected java.util.List |
getAllConcreteSubclasses(EClass eClass)
|
protected java.util.List |
getAllEClasses(EClass eClass)
|
protected java.util.Collection |
getChildrenReferences(java.lang.Object object)
If this is defined to be something other than an empty list, it is used to implement getChildren
and to deduce the EMF feature in the AddCommand and RemoveCommand in createCommand . |
java.lang.Object |
getCreateChildImage(java.lang.Object owner,
java.lang.Object feature,
java.lang.Object child,
java.util.Collection selection)
This returns the icon image for CreateChildCommand . |
protected java.lang.String |
getFeatureText(java.lang.Object feature)
This looks up the name of the specified feature. |
java.lang.Object |
getImage(java.lang.Object object)
This does the same thing as ILabelProvider.getImage,
it fetches the label image specific to this object instance. |
java.util.List |
getPropertyDescriptors(java.lang.Object object)
This does the same thing as
IPropertySource.getPropertyDescriptors. |
java.lang.String |
getText(java.lang.Object object)
This does the same thing as ILabelProvider.getlText,
it fetches the label text specific to this object instance. |
protected java.lang.String |
getTypeText(java.lang.Object object)
This looks up the name of the type of the specified object. |
void |
notifyChanged(Notification notification)
Does nothing; clients may override so that it does something. |
Methods inherited from class org.eclipse.emf.edit.provider.ItemProviderAdapter |
addListener, createAddCommand, createChildParameter, createCommand, createCopyCommand, createCreateChildCommand, createCreateCopyCommand, createDragAndDropCommand, createInitializeCopyCommand, createMoveCommand, createRemoveCommand, createReplaceCommand, createSetCommand, dispose, factorAddCommand, factorMoveCommand, factorRemoveCommand, fireNotifyChanged, getAdapterFactory, getBaseURL, getChildReference, getChildren, getCreateChildDescription, getCreateChildResult, getCreateChildText, getCreateChildToolTipText, getEditableValue, getElements, getImage, getNewChildDescriptors, getParent, getPropertyDescriptor, getPropertyValue, getReferenceValue, getResourceLocator, getResourceLocator, getSetFeature, getSetFeatures, getString, getString, getString, getString, getUpdateableText, hasChildren, isAdapterForType, isPropertySet, removeListener, resetPropertyValue, setPropertyValue, setTarget |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
allRoots
protected java.util.List allRoots
allEClasses
protected java.util.List allEClasses
ReflectiveItemProvider
public ReflectiveItemProvider(AdapterFactory adapterFactory)
getPropertyDescriptors
public java.util.List getPropertyDescriptors(java.lang.Object object)
- Description copied from interface:
IItemPropertySource
- This does the same thing as
IPropertySource.getPropertyDescriptors.
- Specified by:
getPropertyDescriptors
in interface IItemPropertySource
- Overrides:
getPropertyDescriptors
in class ItemProviderAdapter
getAllEClasses
protected java.util.List getAllEClasses(EClass eClass)
getAllConcreteSubclasses
protected java.util.List getAllConcreteSubclasses(EClass eClass)
getChildrenReferences
protected java.util.Collection getChildrenReferences(java.lang.Object object)
- Description copied from class:
ItemProviderAdapter
- If this is defined to be something other than an empty list, it is used to implement
getChildren
and to deduce the EMF feature in the AddCommand and RemoveCommand in createCommand
.
If you override those, then you don't need to implement this.
- Overrides:
getChildrenReferences
in class ItemProviderAdapter
getImage
public java.lang.Object getImage(java.lang.Object object)
- Description copied from interface:
IItemLabelProvider
- This does the same thing as ILabelProvider.getImage,
it fetches the label image specific to this object instance.
- Specified by:
getImage
in interface IItemLabelProvider
- Overrides:
getImage
in class ItemProviderAdapter
getText
public java.lang.String getText(java.lang.Object object)
- Description copied from interface:
IItemLabelProvider
- This does the same thing as ILabelProvider.getlText,
it fetches the label text specific to this object instance.
- Specified by:
getText
in interface IItemLabelProvider
- Overrides:
getText
in class ItemProviderAdapter
collectNewChildDescriptors
protected void collectNewChildDescriptors(java.util.Collection newChildDescriptors,
java.lang.Object object)
- Description copied from class:
ItemProviderAdapter
- This adds to
newChildDescriptors
, a collection of CommandParameter
s, parameters for
possible children of the specified object
, when viewed as
an instance of the type for which this is an item provider. This
implementation adds nothing to the collection, but derived classes
should override this method, invoking the superclass implementation and
then adding to the collection.
- Overrides:
collectNewChildDescriptors
in class ItemProviderAdapter
getCreateChildImage
public java.lang.Object getCreateChildImage(java.lang.Object owner,
java.lang.Object feature,
java.lang.Object child,
java.util.Collection selection)
- Description copied from class:
ItemProviderAdapter
- This returns the icon image for
CreateChildCommand
.
- Overrides:
getCreateChildImage
in class ItemProviderAdapter
getTypeText
protected java.lang.String getTypeText(java.lang.Object object)
- Description copied from class:
ItemProviderAdapter
- This looks up the name of the type of the specified object.
- Overrides:
getTypeText
in class ItemProviderAdapter
getFeatureText
protected java.lang.String getFeatureText(java.lang.Object feature)
- Description copied from class:
ItemProviderAdapter
- This looks up the name of the specified feature.
- Overrides:
getFeatureText
in class ItemProviderAdapter
notifyChanged
public void notifyChanged(Notification notification)
- Description copied from class:
AdapterImpl
- Does nothing; clients may override so that it does something.
- Overrides:
notifyChanged
in class AdapterImpl
- Following copied from interface:
org.eclipse.emf.common.notify.Adapter
- Parameters:
notification
- a description of the change.