|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.edit.provider.WrapperItemProvider org.eclipse.emf.edit.provider.DelegatingWrapperItemProvider org.eclipse.emf.edit.provider.FeatureMapEntryWrapperItemProvider
public class FeatureMapEntryWrapperItemProvider
A wrapper for FeatureMap.Entry
s. Feature map entry values can be either simple
attribute values or model objects, so this wrapper provides behaviours appropriate for both, depending on the type
of the entry feature. If it is a reference with a non-null value, an item provider will be obtained for that value,
and most methods will delegate to that item provider. Otherwise, simple attribute-value-like implementations
generally suffice. This wrapper's text and image values reflect the primary use of feature maps: to represent XML
mixed content and choice model groups.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.eclipse.emf.edit.provider.DelegatingWrapperItemProvider |
---|
DelegatingWrapperItemProvider.AffectedObjectsWrappingCommand, DelegatingWrapperItemProvider.AffectedObjectsWrappingCommandActionDelegate, DelegatingWrapperItemProvider.DelegatingWrapperItemPropertyDescriptor |
Nested classes/interfaces inherited from class org.eclipse.emf.edit.provider.WrapperItemProvider |
---|
WrapperItemProvider.ReplacementAffectedObjectCommand, WrapperItemProvider.SimpleCopyCommand, WrapperItemProvider.WrapperItemPropertyDescriptor, WrapperItemProvider.WrappingCopyCommand |
Field Summary | |
---|---|
protected ResourceLocator |
resourceLocator
The resource locator from the owner's item provider. |
Fields inherited from class org.eclipse.emf.edit.provider.DelegatingWrapperItemProvider |
---|
changeNotifier, childrenMap, delegateChildren, delegateItemProvider, propertyDescriptors |
Fields inherited from class org.eclipse.emf.edit.provider.WrapperItemProvider |
---|
adapterFactory, COPY_COMMAND_DESCRIPTION, COPY_COMMAND_LABEL, feature, index, owner, value |
Fields inherited from interface org.eclipse.emf.edit.provider.IItemFontProvider |
---|
BOLD_FONT, BOLD_ITALIC_FONT, ITALIC_FONT, NORMAL_FONT |
Fields inherited from interface org.eclipse.emf.edit.provider.IItemColorProvider |
---|
GRAYED_OUT_COLOR |
Constructor Summary | |
---|---|
FeatureMapEntryWrapperItemProvider(FeatureMap.Entry entry,
EObject owner,
EAttribute attribute,
int index,
AdapterFactory adapterFactory)
Deprecated. As of EMF 2.0.1, replaced by this form . |
|
FeatureMapEntryWrapperItemProvider(FeatureMap.Entry entry,
EObject owner,
EAttribute attribute,
int index,
AdapterFactory adapterFactory,
ResourceLocator resourceLocator)
Creates an instance for the feature map entry. |
Method Summary | |
---|---|
protected java.lang.String |
addEntryFeature(java.lang.String text)
Prepends the entry feature name to the given text and returns the result. |
Command |
createCommand(java.lang.Object object,
EditingDomain domain,
java.lang.Class<? extends Command> commandClass,
CommandParameter commandParameter)
Uses the delegate item provider or the base wrapper implementation to create a command. |
protected Command |
createCopyCommand(EditingDomain domain,
java.lang.Object owner,
CopyCommand.Helper helper)
This is only called for null or attribute values; it returns a WrapperItemProvider.SimpleCopyCommand that copies the wrapper. |
protected Command |
createSetCommand(EditingDomain domain,
java.lang.Object owner,
java.lang.Object feature,
java.lang.Object value,
int index)
Returns a wrapped set command that returns as its affected object the replacement wrapper for the value. |
protected java.lang.String |
decode(java.lang.String s)
Decodes the given string by replacing any occurrences Java escape sequences to actual characters. |
protected java.lang.String |
encode(java.lang.String s)
Encodes the given string by replacing any occurrences of non-printable characters by the corresponding Java escape sequence. |
protected java.lang.Object |
getDelegateValue()
If the entry's feature is a reference, returns its value as the value from which to obtain and which to pass to a delegate item provider. |
java.lang.Object |
getEditableValue(java.lang.Object object)
Uses the delegate item provider for a reference value or returns the attribute value itself. |
protected EStructuralFeature |
getEntryFeature()
Returns the feature of the wrapped feature map entry. |
protected java.lang.Object |
getEntryValue()
Returns the value of the wrapped feature map entry. |
java.lang.Object |
getImage(java.lang.Object object)
Returns the appropriate image for the entry value: the text property icon for text, CDATA, or comment; the generic property icon for an attribute value; the generic item icon for a null reference value; or the icon returned by the delegate item provider for a non-null reference value. |
java.util.List<IItemPropertyDescriptor> |
getPropertyDescriptors(java.lang.Object object)
Uses the delegate item provider for a reference value or creates a single property descriptor for an attribute value. |
protected java.lang.Object |
getPropertyImage()
Calls getPropertyImage to obtain the property image for the
entry attribute's type. |
java.lang.String |
getText(java.lang.Object object)
Returns the appropriate text for the entry value. |
protected boolean |
isEntryAttribute()
Returns whether the feature of the wrapped feature map entry is an attribute. |
protected boolean |
isPropertySettable()
Returns whether the entry attribute is changeable. |
protected Command |
wrapCommand(Command command,
java.lang.Class<? extends Command> commandClass)
For a copy command, creates a WrapperItemProvider.WrappingCopyCommand , which copies the feature map entry
and wrapper along with the entry value; for other commands, the wrapper-substituting command wrapper supplied by
the base implementation is used. |
Methods inherited from class org.eclipse.emf.edit.provider.DelegatingWrapperItemProvider |
---|
addListener, createWrapper, dispose, fireNotifyChanged, getBackground, getBackground, getChildren, getColumnImage, getColumnText, getElements, getFont, getFont, getForeground, getForeground, getNewChildDescriptors, getRefreshElement, hasChildren, notifyChanged, removeListener, updateChildren, wrapNotification |
Methods inherited from class org.eclipse.emf.edit.provider.WrapperItemProvider |
---|
baseCreateCommand, createDragAndDropCommand, getFeature, getIndex, getOwner, getParent, getPropertyCategory, getPropertyDescription, getPropertyDescriptor, getPropertyFilterFlags, getPropertyImage, getPropertyName, getRootAdapterFactory, getUpdateableText, getValue, isPropertyMultiLine, isPropertySortChoices, setIndex |
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.ITreeItemContentProvider |
---|
getParent |
Methods inherited from interface org.eclipse.emf.edit.provider.IItemPropertySource |
---|
getPropertyDescriptor |
Methods inherited from interface org.eclipse.emf.edit.provider.IEditingDomainItemProvider |
---|
getParent |
Field Detail |
---|
protected ResourceLocator resourceLocator
Constructor Detail |
---|
public FeatureMapEntryWrapperItemProvider(FeatureMap.Entry entry, EObject owner, EAttribute attribute, int index, AdapterFactory adapterFactory, ResourceLocator resourceLocator)
java.lang.IllegalArgumentException
- If the specified feature map entry is null.@Deprecated public FeatureMapEntryWrapperItemProvider(FeatureMap.Entry entry, EObject owner, EAttribute attribute, int index, AdapterFactory adapterFactory)
this form
.
java.lang.IllegalArgumentException
- If the specified feature map entry is null.Method Detail |
---|
protected java.lang.Object getEntryValue()
protected EStructuralFeature getEntryFeature()
protected boolean isEntryAttribute()
protected java.lang.Object getDelegateValue()
getDelegateValue
in class DelegatingWrapperItemProvider
public java.lang.String getText(java.lang.Object object)
encoded
to remove non-printable characters. Otherwise, the feature
name is prepended to the text returned by the item provider decorator, for a reference value, or the factory
method, for an attribute value.
getText
in interface IItemLabelProvider
getText
in class DelegatingWrapperItemProvider
protected java.lang.String addEntryFeature(java.lang.String text)
public java.lang.Object getImage(java.lang.Object object)
getImage
in interface IItemLabelProvider
getImage
in class DelegatingWrapperItemProvider
protected java.lang.String encode(java.lang.String s)
protected java.lang.String decode(java.lang.String s)
public java.util.List<IItemPropertyDescriptor> getPropertyDescriptors(java.lang.Object object)
getPropertyDescriptors
in interface IItemPropertySource
getPropertyDescriptors
in class DelegatingWrapperItemProvider
public java.lang.Object getEditableValue(java.lang.Object object)
getEditableValue
in interface IItemPropertySource
getEditableValue
in class DelegatingWrapperItemProvider
protected boolean isPropertySettable()
isPropertySettable
in class WrapperItemProvider
protected java.lang.Object getPropertyImage()
getPropertyImage
to obtain the property image for the
entry attribute's type.
getPropertyImage
in class WrapperItemProvider
public Command createCommand(java.lang.Object object, EditingDomain domain, java.lang.Class<? extends Command> commandClass, CommandParameter commandParameter)
createCommand
in interface IEditingDomainItemProvider
createCommand
in class DelegatingWrapperItemProvider
protected Command wrapCommand(Command command, java.lang.Class<? extends Command> commandClass)
WrapperItemProvider.WrappingCopyCommand
, which copies the feature map entry
and wrapper along with the entry value; for other commands, the wrapper-substituting command wrapper supplied by
the base implementation is used. This method is only called for non-null reference values to wrap a command
returned by the delegate item provider.
wrapCommand
in class DelegatingWrapperItemProvider
protected Command createSetCommand(EditingDomain domain, java.lang.Object owner, java.lang.Object feature, java.lang.Object value, int index)
createSetCommand
in class WrapperItemProvider
protected Command createCopyCommand(EditingDomain domain, java.lang.Object owner, CopyCommand.Helper helper)
WrapperItemProvider.SimpleCopyCommand
that copies the wrapper.
createCopyCommand
in class WrapperItemProvider
|
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 |