|
|||||||||||
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.mapping.provider.MappingItemProviderAdapter
org.eclipse.emf.mapping.provider.MappingItemProvider
This is the item provider adpater for a Mapping
object.
Nested Class Summary | |
static class |
MappingItemProvider.TypeMappingHelperWrapper
|
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 static String |
DIVIDER
|
protected ArrayList |
mappedObjectItemProviderList
|
protected static String |
SEPARATOR
|
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 | |
MappingItemProvider(AdapterFactory adapterFactory)
This constructs an instance from a factory and a notifier. |
Method Summary | |
protected Command |
createAddCommand(EditingDomain domain,
EObject owner,
EStructuralFeature feature,
Collection collection,
int index)
This creates a primitive AddCommand . |
Command |
createCommand(Object object,
EditingDomain editingDomain,
Class commandClass,
CommandParameter commandParameter)
This does the same thing as EditingDomain.createCommand ,
i.e., it creates commands for a domain's model objects. |
protected Command |
createMoveCommand(EditingDomain domain,
EObject owner,
EStructuralFeature feature,
EObject value,
int index)
This creates a primitive MoveCommand . |
protected Command |
createNameMatchMappingCommand(MappingDomain domain,
Mapping mapping)
This creates a primitive NameMatchMappingCommand . |
protected Command |
createRemoveCommand(EditingDomain domain,
EObject owner,
EStructuralFeature feature,
Collection collection)
This creates a primitive RemoveCommand . |
protected Command |
createSetCommand(EditingDomain domain,
EObject owner,
EStructuralFeature feature,
Object value)
This creates a primitive SetCommand . |
protected Command |
createTypeMatchMappingCommand(MappingDomain domain,
Mapping mapping)
This creates a primitive TypeMatchMappingCommand . |
static Iterator |
createValueIterator(Object object)
|
void |
dispose()
This will remove this adapter from all its the targets and dispose any remainging children wrappers in the children store. |
protected Command |
factorAddCommand(EditingDomain domain,
CommandParameter commandParameter)
This method factors an AddCommand for a collection of objects
into one or more primitive add command,
i.e., one per unique feature. |
protected EStructuralFeature |
getChildFeature(Object object,
Object child)
This returns the most appropriate feature of the object into which the given child could be added. |
Collection |
getChildren(Object object)
This does the same thing as EditingDomain.getChildren ,
i.e., it imposes a hierarchical relation on a domain's model objects. |
Collection |
getChildrenFeatures(Object object)
This specifies how to implement getChildren(java.lang.Object) and is used to deduce an appropriate feature for an
AddCommand , RemoveCommand or
MoveCommand in createCommand(java.lang.Object, org.eclipse.emf.edit.domain.EditingDomain, java.lang.Class, org.eclipse.emf.edit.command.CommandParameter) . |
static Object |
getImage(MappingRoot mappingRoot,
String prefix,
Collection collection)
|
static Object |
getImage(MappingRoot mappingRoot,
String prefix,
Collection collection,
boolean supportNone)
|
Object |
getImage(Object object)
This returns Mapping.gif. |
static Object |
getImage(String prefix,
Collection tops,
Collection bottoms)
|
static Object |
getImage(String prefix,
Collection tops,
Collection bottoms,
boolean supportNone)
|
static Object |
getImage(String prefix,
int topsSize,
int bottomsSize,
boolean supportNone)
|
protected MappedObjectItemProvider |
getMappedObjectItemProvider(Mapping mapping,
Object mappedObject)
|
Object |
getParent(Object object)
This returns the nestedIn of the Mapping. |
List |
getPropertyDescriptors(Object object)
This returns the property descriptors for the adapted class. |
void |
getPropertyDescriptorsForHelper(Mapping mapping)
|
ResourceLocator |
getResourceLocator()
Return the resource locator for this item provider's resources |
EStructuralFeature |
getSetFeature(Object object,
Object value)
This returns the most appropriate feature of the object into which the value be set. |
static String |
getText(MappingRoot mappingRoot,
AdapterFactory adapterFactory,
Collection collection)
|
static String |
getText(MappingRoot mappingRoot,
AdapterFactory adapterFactory,
Collection inputs,
Collection outputs)
|
static String |
getText(MappingRoot mappingRoot,
AdapterFactory adapterFactory,
Collection inputs,
Collection outputs,
String objectSeparator,
String divider)
|
static String |
getText(MappingRoot mappingRoot,
AdapterFactory adapterFactory,
Collection collection,
String pathSeparator)
|
static String |
getText(MappingRoot mappingRoot,
AdapterFactory adapterFactory,
Collection collection,
String pathSeparator,
String objectSeparator,
String divider)
|
String |
getText(Object object)
This does the same thing as ILabelProvider.getlText, it fetches the label text specific to this object instance. |
boolean |
hasChildren(Object object)
This does the same thing as ITreeContentProvider.hasChildren. |
void |
notifyChanged(Notification msg)
This handles notification by delegating to fireNotifyChanged . |
protected Object |
substituteMappedObject(Mapping mapping,
Object object)
|
protected Object |
substituteMappedObjectItemProvider(Mapping mapping,
Object object)
|
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 |
getNewChildDescriptors |
Methods inherited from interface org.eclipse.emf.edit.provider.IStructuredItemContentProvider |
getElements |
Methods inherited from interface org.eclipse.emf.edit.provider.IItemPropertySource |
getEditableValue, getPropertyDescriptor |
Field Detail |
protected ArrayList mappedObjectItemProviderList
protected static final String DIVIDER
protected static final String SEPARATOR
Constructor Detail |
public MappingItemProvider(AdapterFactory adapterFactory)
Method Detail |
public void getPropertyDescriptorsForHelper(Mapping mapping)
public List getPropertyDescriptors(Object object)
getPropertyDescriptors
in interface IItemPropertySource
getPropertyDescriptors
in class ItemProviderAdapter
public Collection getChildrenFeatures(Object object)
getChildren(java.lang.Object)
and is used to deduce an appropriate feature for an
AddCommand
, RemoveCommand
or
MoveCommand
in createCommand(java.lang.Object, org.eclipse.emf.edit.domain.EditingDomain, java.lang.Class, org.eclipse.emf.edit.command.CommandParameter)
.
getChildrenFeatures
in class ItemProviderAdapter
protected EStructuralFeature getChildFeature(Object object, Object child)
ItemProviderAdapter
getChildReference
, for backwards
compatibility. If that does not yield a non-null result, it returns the first feature returned by getChildrenFeatures
that has a type compatible with the child. You can override this to
return a better result or to compute it more efficiently.
getChildFeature
in class ItemProviderAdapter
public EStructuralFeature getSetFeature(Object object, Object value)
ItemProviderAdapter
getSetFeatures
that has a type compatible with the value.
You can override this to return a better result or to compute it more efficiently.
getSetFeature
in class ItemProviderAdapter
protected MappedObjectItemProvider getMappedObjectItemProvider(Mapping mapping, Object mappedObject)
protected Object substituteMappedObjectItemProvider(Mapping mapping, Object object)
protected Object substituteMappedObject(Mapping mapping, Object object)
public static Iterator createValueIterator(Object object)
public Collection getChildren(Object object)
IEditingDomainItemProvider
EditingDomain.getChildren
,
i.e., it imposes a hierarchical relation on a domain's model objects.
getChildren
in interface IEditingDomainItemProvider
getChildren
in class ItemProviderAdapter
public boolean hasChildren(Object object)
ITreeItemContentProvider
hasChildren
in interface ITreeItemContentProvider
hasChildren
in class ItemProviderAdapter
public Object getParent(Object object)
getParent
in interface IEditingDomainItemProvider
getParent
in class ItemProviderAdapter
public static Object getImage(MappingRoot mappingRoot, String prefix, Collection collection)
public static Object getImage(MappingRoot mappingRoot, String prefix, Collection collection, boolean supportNone)
public static Object getImage(String prefix, Collection tops, Collection bottoms)
public static Object getImage(String prefix, Collection tops, Collection bottoms, boolean supportNone)
public static Object getImage(String prefix, int topsSize, int bottomsSize, boolean supportNone)
public Object getImage(Object object)
getImage
in interface IItemLabelProvider
getImage
in class ItemProviderAdapter
public static String getText(MappingRoot mappingRoot, AdapterFactory adapterFactory, Collection collection)
public static String getText(MappingRoot mappingRoot, AdapterFactory adapterFactory, Collection collection, String pathSeparator)
public static String getText(MappingRoot mappingRoot, AdapterFactory adapterFactory, Collection collection, String pathSeparator, String objectSeparator, String divider)
public static String getText(MappingRoot mappingRoot, AdapterFactory adapterFactory, Collection inputs, Collection outputs)
public static String getText(MappingRoot mappingRoot, AdapterFactory adapterFactory, Collection inputs, Collection outputs, String objectSeparator, String divider)
public String getText(Object object)
IItemLabelProvider
getText
in interface IItemLabelProvider
getText
in class ItemProviderAdapter
public void notifyChanged(Notification msg)
fireNotifyChanged
.
notifyChanged
in interface Adapter
notifyChanged
in class AdapterImpl
public Command createCommand(Object object, EditingDomain editingDomain, Class commandClass, CommandParameter commandParameter)
IEditingDomainItemProvider
EditingDomain.createCommand
,
i.e., it creates commands for a domain's model objects.
createCommand
in interface IEditingDomainItemProvider
createCommand
in class ItemProviderAdapter
protected Command createNameMatchMappingCommand(MappingDomain domain, Mapping mapping)
NameMatchMappingCommand
.
protected Command createTypeMatchMappingCommand(MappingDomain domain, Mapping mapping)
TypeMatchMappingCommand
.
protected Command createRemoveCommand(EditingDomain domain, EObject owner, EStructuralFeature feature, Collection collection)
ItemProviderAdapter
RemoveCommand
.
createRemoveCommand
in class ItemProviderAdapter
protected Command factorAddCommand(EditingDomain domain, CommandParameter commandParameter)
ItemProviderAdapter
AddCommand
for a collection of objects
into one or more primitive add command,
i.e., one per unique feature.
factorAddCommand
in class ItemProviderAdapter
protected Command createAddCommand(EditingDomain domain, EObject owner, EStructuralFeature feature, Collection collection, int index)
ItemProviderAdapter
AddCommand
.
createAddCommand
in class ItemProviderAdapter
protected Command createMoveCommand(EditingDomain domain, EObject owner, EStructuralFeature feature, EObject value, int index)
MoveCommand
.
protected Command createSetCommand(EditingDomain domain, EObject owner, EStructuralFeature feature, Object value)
SetCommand
.
createSetCommand
in class ItemProviderAdapter
public void dispose()
ItemProviderAdapter
dispose
in interface IDisposable
dispose
in class ItemProviderAdapter
public ResourceLocator getResourceLocator()
getResourceLocator
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 |