|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.eclipse.emf.common.notify.impl.AdapterImpl
org.eclipse.emf.edit.provider.ItemProviderAdapter
org.eclipse.emf.edit.provider.ReflectiveItemProvider
This adapter implementation provides reflective support that emulates the behaviour of a default generated item provider.
| Nested Class Summary |
|---|
| Nested classes inherited from class org.eclipse.emf.edit.provider.ItemProviderAdapter |
|---|
ItemProviderAdapter.ChildrenStore, ItemProviderAdapter.ModifiableSingletonEList, ItemProviderAdapter.ResultAndAffectedObjectsWrappingCommand, ItemProviderAdapter.ResultAndAffectedObjectsWrappingCommandActionDelegate |
| Nested classes inherited from class org.eclipse.emf.common.notify.Adapter |
|---|
Adapter.Internal |
| Field Summary | |
|---|---|
protected java.util.List |
allEClasses
|
protected java.util.List |
allEPackages
|
protected java.util.List |
allRoots
|
| Fields inherited from class org.eclipse.emf.edit.provider.ItemProviderAdapter |
|---|
adapterFactory, changeNotifier, childrenFeatures, childrenReferences, childrenStoreMap, itemPropertyDescriptors, targets, wrappers, wrappingNeeded |
| Fields inherited from class org.eclipse.emf.common.notify.impl.AdapterImpl |
|---|
target |
| Constructor Summary | |
|---|---|
ReflectiveItemProvider(AdapterFactory adapterFactory)
|
|
| Method Summary | |
|---|---|
protected java.lang.String |
capName(java.lang.String name)
|
protected void |
collectNewChildDescriptors(java.util.Collection newChildDescriptors,
java.lang.Object object)
This adds to newChildDescriptors, a collection of CommandParameters, parameters for
possible children of the specified object, when viewed as
an instance of the type for which this is an item provider. |
java.lang.String |
format(java.lang.String name,
char separator)
|
protected void |
gatherAllMetaData(EObject eObject)
|
protected void |
gatherMetaData(EModelElement eModelElement)
|
protected java.util.List |
getAllConcreteSubclasses(EClass eClass)
|
protected java.util.List |
getAllDelegatedFeatures(EStructuralFeature feature)
|
protected java.util.List |
getAllEClasses(EClass eClass)
|
protected java.util.List |
getAllEPackages(EClass eClass)
|
protected java.util.Collection |
getChildrenFeatures(java.lang.Object object)
If this is defined to be something other than an empty list, it is used to implement getChildren, including in determining whether to cache children and, if so, in setting up the store. |
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. |
java.lang.String |
getCreateChildText(java.lang.Object owner,
java.lang.Object feature,
java.lang.Object child,
java.util.Collection selection)
This returns the label 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. |
protected EStructuralFeature |
getLabelFeature(EClass eClass)
|
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(EAttribute attribute)
This looks up the name of the type of the specified attribute. |
protected java.lang.String |
getTypeText(java.lang.Object object)
This looks up the name of the type of the specified object. |
protected boolean |
isWrappingNeeded(java.lang.Object object)
Returns whether this item provider may need to use wrappers for some or all of the values it returns as children. |
void |
notifyChanged(Notification notification)
Does nothing; clients may override so that it does something. |
protected java.util.List |
parseName(java.lang.String sourceName,
char sourceSeparator)
|
| Methods inherited from class org.eclipse.emf.common.notify.impl.AdapterImpl |
|---|
getTarget |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.eclipse.emf.edit.provider.IEditingDomainItemProvider |
|---|
createCommand, getChildren, getNewChildDescriptors, getParent |
| Methods inherited from interface org.eclipse.emf.edit.provider.IStructuredItemContentProvider |
|---|
getElements |
| Methods inherited from interface org.eclipse.emf.edit.provider.ITreeItemContentProvider |
|---|
getChildren, getParent, hasChildren |
| Methods inherited from interface org.eclipse.emf.edit.provider.IItemPropertySource |
|---|
getEditableValue, getPropertyDescriptor |
| Field Detail |
protected java.util.List allRoots
protected java.util.List allEPackages
protected java.util.List allEClasses
| Constructor Detail |
public ReflectiveItemProvider(AdapterFactory adapterFactory)
| Method Detail |
public java.util.List getPropertyDescriptors(java.lang.Object object)
IItemPropertySource
getPropertyDescriptors in interface IItemPropertySourcegetPropertyDescriptors in class ItemProviderAdapterprotected void gatherAllMetaData(EObject eObject)
protected java.util.List getAllEClasses(EClass eClass)
protected java.util.List getAllEPackages(EClass eClass)
protected void gatherMetaData(EModelElement eModelElement)
protected java.util.List getAllConcreteSubclasses(EClass eClass)
protected java.util.Collection getChildrenFeatures(java.lang.Object object)
ItemProviderAdaptergetChildren, including in determining whether to cache children and, if so, in setting up the store. It is also
used to deduce the appropriate feature for an AddCommand, RemoveCommand or
MoveCommand in createCommand. If you override those methods, then you don't
need to implement this.
getChildrenFeatures in class ItemProviderAdapterpublic java.lang.Object getImage(java.lang.Object object)
IItemLabelProvider
getImage in interface IItemLabelProvidergetImage in class ItemProviderAdapterpublic java.lang.String getText(java.lang.Object object)
IItemLabelProvider
getText in interface IItemLabelProvidergetText in class ItemProviderAdapterprotected EStructuralFeature getLabelFeature(EClass eClass)
protected java.lang.String capName(java.lang.String name)
public java.lang.String format(java.lang.String name,
char separator)
protected java.util.List parseName(java.lang.String sourceName,
char sourceSeparator)
protected java.util.List getAllDelegatedFeatures(EStructuralFeature feature)
protected void collectNewChildDescriptors(java.util.Collection newChildDescriptors,
java.lang.Object object)
ItemProviderAdapternewChildDescriptors, a collection of CommandParameters, 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.
collectNewChildDescriptors in class ItemProviderAdapter
public java.lang.String getCreateChildText(java.lang.Object owner,
java.lang.Object feature,
java.lang.Object child,
java.util.Collection selection)
ItemProviderAdapterCreateChildCommand.
getCreateChildText in interface CreateChildCommand.HelpergetCreateChildText in class ItemProviderAdapter
public java.lang.Object getCreateChildImage(java.lang.Object owner,
java.lang.Object feature,
java.lang.Object child,
java.util.Collection selection)
ItemProviderAdapterCreateChildCommand.
getCreateChildImage in interface CreateChildCommand.HelpergetCreateChildImage in class ItemProviderAdapterprotected java.lang.String getTypeText(java.lang.Object object)
ItemProviderAdapter
getTypeText in class ItemProviderAdapterprotected java.lang.String getTypeText(EAttribute attribute)
ItemProviderAdapter
getTypeText in class ItemProviderAdapterprotected java.lang.String getFeatureText(java.lang.Object feature)
ItemProviderAdapter
getFeatureText in class ItemProviderAdapterpublic void notifyChanged(Notification notification)
AdapterImpl
notifyChanged in interface AdapternotifyChanged in class AdapterImplprotected boolean isWrappingNeeded(java.lang.Object object)
ItemProviderAdapterchildren. This is used to determine whether to use a store to keep track of children and whether to
use command wrappers that re-wrap results and affected objects. The default implementation of createWrapper also tests this method and will not create any wrappers if it returns
false.
This implementation consults getChildrenFeatures, returning true if any feature
map or simple attributes contribute children. This provides backwards compatibility with pre-2.0 subclasses
and enables the more useful new default behaviour for attributes, which were previously not allowed. Subclasses
may override this to enable wrapping of cross-referenced model objects, or to immediately return true
or false, as desired. This is a convenient way to disable all of the new wrapping features in 2.0.
isWrappingNeeded in class ItemProviderAdapter
|
Copyright 2001-2006 IBM Corporation and others. All Rights Reserved. |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||