org.eclipse.emf.edit.provider
Class ItemPropertyDescriptor

java.lang.Object
  extended byorg.eclipse.emf.edit.provider.ItemPropertyDescriptor
All Implemented Interfaces:
IItemPropertyDescriptor, IItemPropertyDescriptor.OverrideableCommandOwner
Direct Known Subclasses:
GenBaseItemProvider.GenItemPropertyDescriptor, WrapperItemProvider.WrapperItemPropertyDescriptor

public class ItemPropertyDescriptor
extends Object
implements IItemPropertyDescriptor, IItemPropertyDescriptor.OverrideableCommandOwner

This implementation of an item property descriptor supports delegating of the IItemPropertySource interface to the IItemPropertyDescriptor interface.


Nested Class Summary
protected  class ItemPropertyDescriptor.ItemDelegator
          This class uses a static image
static class ItemPropertyDescriptor.PropertyValueWrapper
           
 
Nested classes inherited from class org.eclipse.emf.edit.provider.IItemPropertyDescriptor
IItemPropertyDescriptor.OverrideableCommandOwner
 
Field Summary
protected  AdapterFactory adapterFactory
          For now we need to keep track of the adapter factory, because we need it to provide a correct label provider.
static Object BOOLEAN_VALUE_IMAGE
           
protected  String category
          This represents the group of properties into which this one should be placed.
protected  Object commandOwner
          If non-null, this object will be the owner of commands created to set the property's value.
protected  String description
          This is the description shown in the property sheet when this property is selected.
protected  String displayName
          This is the name that is displayed in the property sheet.
protected static EcorePackage ecorePackage
           
protected  EStructuralFeature feature
          This is the structural feature that provides the values for this property.
protected  String[] filterFlags
          These are the flags used as filters in the property sheet.
static Object GENERIC_VALUE_IMAGE
           
static Object INTEGRAL_VALUE_IMAGE
           
protected  boolean isSettable
          This is returned by canSetProperty(java.lang.Object).
protected  AdapterFactoryItemDelegator itemDelegator
          This is a convenient wrapper of the adapterFactory.
protected  boolean multiLine
          Whether the value of this property consists of multi-line text.
protected  EReference[] parentReferences
          This is the set of single-valued references that act as a parent, only one can have a non null value at a time.
static Object REAL_VALUE_IMAGE
           
protected  ResourceLocator resourceLocator
          This is used to locate resources for translated values like enumeration literals.
protected  boolean sortChoices
          Whether the choices for this property should be sorted for display.
protected  Object staticImage
          This is the image that will be used with the value no matter what type of object it is.
static Object TEXT_VALUE_IMAGE
           
 
Constructor Summary
ItemPropertyDescriptor(AdapterFactory adapterFactory, ResourceLocator resourceLocator, String displayName, String description, EReference[] parentReferences)
          This creates an instance that uses a resource locator and determines the cell editor from the parent references.
ItemPropertyDescriptor(AdapterFactory adapterFactory, ResourceLocator resourceLocator, String displayName, String description, EReference[] parentReferences, boolean isSettable)
          This creates an instance that uses a resource locator and determines the cell editor from the parent references.
ItemPropertyDescriptor(AdapterFactory adapterFactory, ResourceLocator resourceLocator, String displayName, String description, EReference[] parentReferences, boolean isSettable, String category)
          This creates an instance that uses a resource locator, specifies a category, and determines the cell editor from the parent references.
ItemPropertyDescriptor(AdapterFactory adapterFactory, ResourceLocator resourceLocator, String displayName, String description, EReference[] parentReferences, boolean isSettable, String category, String[] filterFlags)
          This creates an instance that uses a resource locator, specifies a category and filter flags, and determines the cell editor from the parent references.
ItemPropertyDescriptor(AdapterFactory adapterFactory, ResourceLocator resourceLocator, String displayName, String description, EStructuralFeature feature)
          This creates an instance that uses a resource locator and determines the cell editor from the type of the structural feature.
ItemPropertyDescriptor(AdapterFactory adapterFactory, ResourceLocator resourceLocator, String displayName, String description, EStructuralFeature feature, boolean isSettable)
          This creates an instance that uses a resource locator and determines the cell editor from the type of the structural feature.
ItemPropertyDescriptor(AdapterFactory adapterFactory, ResourceLocator resourceLocator, String displayName, String description, EStructuralFeature feature, boolean isSettable, boolean multiLine, boolean sortChoices, Object staticImage, String category, String[] filterFlags)
          This creates an instance that uses a resource locator; indicates whether to be mutli-line and to sort choices; specifies a static image, a category, and filter flags; and determines the cell editor from the type of the structural feature.
ItemPropertyDescriptor(AdapterFactory adapterFactory, ResourceLocator resourceLocator, String displayName, String description, EStructuralFeature feature, boolean isSettable, Object staticImage)
          This creates an instance that uses a resource locator, specifies a static image, and determines the cell editor from the type of the structural feature.
ItemPropertyDescriptor(AdapterFactory adapterFactory, ResourceLocator resourceLocator, String displayName, String description, EStructuralFeature feature, boolean isSettable, Object staticImage, String category)
          This creates an instance that uses a resource locator, specifies a static image and category, and determines the cell editor from the type of the structural feature.
ItemPropertyDescriptor(AdapterFactory adapterFactory, ResourceLocator resourceLocator, String displayName, String description, EStructuralFeature feature, boolean isSettable, Object staticImage, String category, String[] filterFlags)
          This creates an instance that uses a resource locator; specifies a static image, a category, and filter flags; and determines the cell editor from the type of the structural feature.
ItemPropertyDescriptor(AdapterFactory adapterFactory, ResourceLocator resourceLocator, String displayName, String description, EStructuralFeature feature, boolean isSettable, String category)
          This creates an instance that uses a resource locator, specifies a category, and determines the cell editor from the type of the structural feature.
ItemPropertyDescriptor(AdapterFactory adapterFactory, ResourceLocator resourceLocator, String displayName, String description, EStructuralFeature feature, boolean isSettable, String category, String[] filterFlags)
          This creates an instance that uses a resource locator, specifies a category and filter flags, and determines the cell editor from the type of the structural feature.
ItemPropertyDescriptor(AdapterFactory adapterFactory, String displayName, String description, EReference[] parentReferences)
          This creates an instance that does not use a resource locator and determines the cell editor from the parent references.
ItemPropertyDescriptor(AdapterFactory adapterFactory, String displayName, String description, EReference[] parentReferences, boolean isSettable)
          This creates an instance that does not use a resource locator and determines the cell editor from the parent references.
ItemPropertyDescriptor(AdapterFactory adapterFactory, String displayName, String description, EReference[] parentReferences, boolean isSettable, String category)
          This creates an instance that does not use a resource locator, specifies a category, and determines the cell editor from the parent references.
ItemPropertyDescriptor(AdapterFactory adapterFactory, String displayName, String description, EReference[] parentReferences, boolean isSettable, String category, String[] filterFlags)
          This creates an instance that does not use a resource locator, specifies a category and filter flags, and determines the cell editor from the parent references.
ItemPropertyDescriptor(AdapterFactory adapterFactory, String displayName, String description, EStructuralFeature feature)
          This creates an instance that does not use a resource locator and determines the cell editor from the type of the structural feature.
ItemPropertyDescriptor(AdapterFactory adapterFactory, String displayName, String description, EStructuralFeature feature, boolean isSettable)
          This creates an instance that does not use a resource locator and determines the cell editor from the type of the structural feature.
ItemPropertyDescriptor(AdapterFactory adapterFactory, String displayName, String description, EStructuralFeature feature, boolean isSettable, Object staticImage)
          This creates an instance that does not use a resource locator, specifies a static image, and determines the cell editor from the type of the structural feature.
ItemPropertyDescriptor(AdapterFactory adapterFactory, String displayName, String description, EStructuralFeature feature, boolean isSettable, Object staticImage, String category)
          This creates an instance that does not use a resource locator, specifies a static image and category, and determines the cell editor from the type of the structural feature.
ItemPropertyDescriptor(AdapterFactory adapterFactory, String displayName, String description, EStructuralFeature feature, boolean isSettable, Object staticImage, String category, String[] filterFlags)
          This creates an instance that does not use a resource locator; specifies a static image, a category, and filter flags; and determines the cell editor from the type of the structural feature.
ItemPropertyDescriptor(AdapterFactory adapterFactory, String displayName, String description, EStructuralFeature feature, boolean isSettable, String category)
          This creates an instance that does not use a resource locator, specifies a category, and determines the cell editor from the type of the structural feature.
ItemPropertyDescriptor(AdapterFactory adapterFactory, String displayName, String description, EStructuralFeature feature, boolean isSettable, String category, String[] filterFlags)
          This creates an instance that does not use a resource locator, specifies a category and filter flags, and determines the cell editor from the type of the structural feature.
 
Method Summary
 boolean canSetProperty(Object object)
          This determines whether this descriptor's property for the object supports set (and reset).
static void collectReachableObjectsOfType(Collection visited, Collection result, EObject object, EClassifier type)
          This will visit all reachable references from object except those in visited; it updates visited and adds to result any object with a meta object that indicates that it is a subtype of type.
protected  Object createPropertyValueWrapper(Object object, Object propertyValue)
           
 String getCategory(Object object)
          This returns the group of propertiesk into which this one should be placed.
 Collection getChoiceOfValues(Object object)
           
protected  Collection getComboBoxObjects(Object object)
          This will be called to populate a list of choices.
 Object getCommandOwner()
          Returns the override command owner set via setCommandOwner.
protected  Object getCommandOwner(Object fallback)
          Returns either the override command owner set via setCommandOwner or, if that is null, the fallback object provided.
static Object getDefaultValue(EClassifier eType)
           
 String getDescription(Object object)
          This returns the description to be displayed in the property sheet when this property is selected.
 String getDisplayName(Object object)
          This returns the name of the property to be displayed in the property sheet.
 EditingDomain getEditingDomain(Object object)
           
 Object getFeature(Object object)
          Returns the feature.
 String[] getFilterFlags(Object object)
          This returns the flags used as filters in the property sheet.
 Object getHelpContextIds(Object object)
           
 String getId(Object object)
          This returns the interface name of this property.
 IItemLabelProvider getLabelProvider(Object object)
          This returns the label provider that will be used to render the value of this property.
 Object getPropertyValue(Object object)
          This does the delegated job of getting the property value from the given object; and it sets object, which is necessary if getComboBoxObjects is called.
static Collection getReachableObjectsOfType(EObject object, EClassifier type)
          This yields all reachable references from object with a meta object which indicates that it is a subtype of type.
protected  Object getValue(EObject object, EStructuralFeature feature)
          This is called by getPropertyValue to reflectively obtain the value of a feature from an object.
 boolean isCompatibleWith(Object object, Object anotherObject, IItemPropertyDescriptor anotherItemPropertyDescriptor)
          This indicates whether these two property descriptors are equal.
 boolean isMany(Object object)
          Returns whether this property represents multiple values.
 boolean isMultiLine(Object object)
          Returns whether this property's value will consist of multi-line text.
 boolean isPropertySet(Object object)
          This does the delegated job of determine whether the property value from the given object is set.
 boolean isSortChoices(Object object)
          Returns whether the choices for this property should be sorted for display.
 void resetPropertyValue(Object object)
          This does the delegated job of resetting property value back to it's default value.
 void setCommandOwner(Object commandOwner)
          Sets the object to use as the owner of commands created to set the property's value.
 void setPropertyValue(Object object, Object value)
          This does the delegated job of setting the property to the given value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BOOLEAN_VALUE_IMAGE

public static final Object BOOLEAN_VALUE_IMAGE

GENERIC_VALUE_IMAGE

public static final Object GENERIC_VALUE_IMAGE

INTEGRAL_VALUE_IMAGE

public static final Object INTEGRAL_VALUE_IMAGE

REAL_VALUE_IMAGE

public static final Object REAL_VALUE_IMAGE

TEXT_VALUE_IMAGE

public static final Object TEXT_VALUE_IMAGE

adapterFactory

protected AdapterFactory adapterFactory
For now we need to keep track of the adapter factory, because we need it to provide a correct label provider.


resourceLocator

protected ResourceLocator resourceLocator
This is used to locate resources for translated values like enumeration literals.


itemDelegator

protected AdapterFactoryItemDelegator itemDelegator
This is a convenient wrapper of the adapterFactory.


isSettable

protected boolean isSettable
This is returned by canSetProperty(java.lang.Object).


displayName

protected String displayName
This is the name that is displayed in the property sheet.


description

protected String description
This is the description shown in the property sheet when this property is selected.


feature

protected EStructuralFeature feature
This is the structural feature that provides the values for this property. This is mutually exclusive with parentReferences.


parentReferences

protected EReference[] parentReferences
This is the set of single-valued references that act as a parent, only one can have a non null value at a time. This is mutually exclusive with feature.


multiLine

protected boolean multiLine
Whether the value of this property consists of multi-line text.

Since:
2.2.0

sortChoices

protected boolean sortChoices
Whether the choices for this property should be sorted for display.

Since:
2.2.0

category

protected String category
This represents the group of properties into which this one should be placed.


filterFlags

protected String[] filterFlags
These are the flags used as filters in the property sheet.


staticImage

protected Object staticImage
This is the image that will be used with the value no matter what type of object it is.


commandOwner

protected Object commandOwner
If non-null, this object will be the owner of commands created to set the property's value.


ecorePackage

protected static final EcorePackage ecorePackage
Constructor Detail

ItemPropertyDescriptor

public ItemPropertyDescriptor(AdapterFactory adapterFactory,
                              String displayName,
                              String description,
                              EStructuralFeature feature)
This creates an instance that does not use a resource locator and determines the cell editor from the type of the structural feature. It assumed that the feature should be setable from this property.

To reduce the number of constructors for this class, this one will soon be deprecated. For new code, please use this form, instead.


ItemPropertyDescriptor

public ItemPropertyDescriptor(AdapterFactory adapterFactory,
                              ResourceLocator resourceLocator,
                              String displayName,
                              String description,
                              EStructuralFeature feature)
This creates an instance that uses a resource locator and determines the cell editor from the type of the structural feature. It assumed that the feature should be setable from this property.

To reduce the number of constructors for this class, this one will soon be deprecated. For new code, please use this form, instead.


ItemPropertyDescriptor

public ItemPropertyDescriptor(AdapterFactory adapterFactory,
                              String displayName,
                              String description,
                              EStructuralFeature feature,
                              boolean isSettable)
This creates an instance that does not use a resource locator and determines the cell editor from the type of the structural feature.

To reduce the number of constructors for this class, this ony may be deprecated in the future. For new code, please use this form, instead.


ItemPropertyDescriptor

public ItemPropertyDescriptor(AdapterFactory adapterFactory,
                              ResourceLocator resourceLocator,
                              String displayName,
                              String description,
                              EStructuralFeature feature,
                              boolean isSettable)
This creates an instance that uses a resource locator and determines the cell editor from the type of the structural feature.


ItemPropertyDescriptor

public ItemPropertyDescriptor(AdapterFactory adapterFactory,
                              String displayName,
                              String description,
                              EStructuralFeature feature,
                              boolean isSettable,
                              Object staticImage)
This creates an instance that does not use a resource locator, specifies a static image, and determines the cell editor from the type of the structural feature.

To reduce the number of constructors for this class, this one may be deprecated in the future. For new code, please use this form, instead.


ItemPropertyDescriptor

public ItemPropertyDescriptor(AdapterFactory adapterFactory,
                              ResourceLocator resourceLocator,
                              String displayName,
                              String description,
                              EStructuralFeature feature,
                              boolean isSettable,
                              Object staticImage)
This creates an instance that uses a resource locator, specifies a static image, and determines the cell editor from the type of the structural feature.


ItemPropertyDescriptor

public ItemPropertyDescriptor(AdapterFactory adapterFactory,
                              String displayName,
                              String description,
                              EStructuralFeature feature,
                              boolean isSettable,
                              String category)
This creates an instance that does not use a resource locator, specifies a category, and determines the cell editor from the type of the structural feature.

To reduce the number of constructors for this class, this one will soon be deprecated. For new code, please use this form, instead.


ItemPropertyDescriptor

public ItemPropertyDescriptor(AdapterFactory adapterFactory,
                              ResourceLocator resourceLocator,
                              String displayName,
                              String description,
                              EStructuralFeature feature,
                              boolean isSettable,
                              String category)
This creates an instance that uses a resource locator, specifies a category, and determines the cell editor from the type of the structural feature.

To reduce the number of constructors for this class, this one will soon be deprecated. For new code, please use this form, instead.


ItemPropertyDescriptor

public ItemPropertyDescriptor(AdapterFactory adapterFactory,
                              String displayName,
                              String description,
                              EStructuralFeature feature,
                              boolean isSettable,
                              Object staticImage,
                              String category)
This creates an instance that does not use a resource locator, specifies a static image and category, and determines the cell editor from the type of the structural feature.

To reduce the number of constructors for this class, this one will soon be deprecated. For new code, please use this form, instead.


ItemPropertyDescriptor

public ItemPropertyDescriptor(AdapterFactory adapterFactory,
                              ResourceLocator resourceLocator,
                              String displayName,
                              String description,
                              EStructuralFeature feature,
                              boolean isSettable,
                              Object staticImage,
                              String category)
This creates an instance that uses a resource locator, specifies a static image and category, and determines the cell editor from the type of the structural feature.

To reduce the number of constructors for this class, this one will soon be deprecated. For new code, please use this form, instead.


ItemPropertyDescriptor

public ItemPropertyDescriptor(AdapterFactory adapterFactory,
                              String displayName,
                              String description,
                              EStructuralFeature feature,
                              boolean isSettable,
                              String category,
                              String[] filterFlags)
This creates an instance that does not use a resource locator, specifies a category and filter flags, and determines the cell editor from the type of the structural feature.

To reduce the number of constructors for this class, this one may be deprecated in the future. For new code, please use this form, instead.


ItemPropertyDescriptor

public ItemPropertyDescriptor(AdapterFactory adapterFactory,
                              ResourceLocator resourceLocator,
                              String displayName,
                              String description,
                              EStructuralFeature feature,
                              boolean isSettable,
                              String category,
                              String[] filterFlags)
This creates an instance that uses a resource locator, specifies a category and filter flags, and determines the cell editor from the type of the structural feature.


ItemPropertyDescriptor

public ItemPropertyDescriptor(AdapterFactory adapterFactory,
                              String displayName,
                              String description,
                              EStructuralFeature feature,
                              boolean isSettable,
                              Object staticImage,
                              String category,
                              String[] filterFlags)
This creates an instance that does not use a resource locator; specifies a static image, a category, and filter flags; and determines the cell editor from the type of the structural feature.

To reduce the number of constructors for this class, this one may be deprecated in the future. For new code, please use this form, instead.


ItemPropertyDescriptor

public ItemPropertyDescriptor(AdapterFactory adapterFactory,
                              ResourceLocator resourceLocator,
                              String displayName,
                              String description,
                              EStructuralFeature feature,
                              boolean isSettable,
                              Object staticImage,
                              String category,
                              String[] filterFlags)
This creates an instance that uses a resource locator; specifies a static image, a category, and filter flags; and determines the cell editor from the type of the structural feature.


ItemPropertyDescriptor

public ItemPropertyDescriptor(AdapterFactory adapterFactory,
                              ResourceLocator resourceLocator,
                              String displayName,
                              String description,
                              EStructuralFeature feature,
                              boolean isSettable,
                              boolean multiLine,
                              boolean sortChoices,
                              Object staticImage,
                              String category,
                              String[] filterFlags)
This creates an instance that uses a resource locator; indicates whether to be mutli-line and to sort choices; specifies a static image, a category, and filter flags; and determines the cell editor from the type of the structural feature.

Since:
2.2.0

ItemPropertyDescriptor

public ItemPropertyDescriptor(AdapterFactory adapterFactory,
                              String displayName,
                              String description,
                              EReference[] parentReferences)
This creates an instance that does not use a resource locator and determines the cell editor from the parent references. It assumed that the feature should be setable from this property.

To reduce the number of constructors for this class, this one will soon be deprecated. For new code, please use this form, instead.


ItemPropertyDescriptor

public ItemPropertyDescriptor(AdapterFactory adapterFactory,
                              ResourceLocator resourceLocator,
                              String displayName,
                              String description,
                              EReference[] parentReferences)
This creates an instance that uses a resource locator and determines the cell editor from the parent references. It assumed that the feature should be setable from this property.

To reduce the number of constructors for this class, this one will soon be deprecated. For new code, please use this form, instead.


ItemPropertyDescriptor

public ItemPropertyDescriptor(AdapterFactory adapterFactory,
                              String displayName,
                              String description,
                              EReference[] parentReferences,
                              boolean isSettable)
This creates an instance that does not use a resource locator and determines the cell editor from the parent references.

To reduce the number of constructors for this class, this one may be deprecated in the future. For new code, please use this form, instead.


ItemPropertyDescriptor

public ItemPropertyDescriptor(AdapterFactory adapterFactory,
                              ResourceLocator resourceLocator,
                              String displayName,
                              String description,
                              EReference[] parentReferences,
                              boolean isSettable)
This creates an instance that uses a resource locator and determines the cell editor from the parent references.


ItemPropertyDescriptor

public ItemPropertyDescriptor(AdapterFactory adapterFactory,
                              String displayName,
                              String description,
                              EReference[] parentReferences,
                              boolean isSettable,
                              String category)
This creates an instance that does not use a resource locator, specifies a category, and determines the cell editor from the parent references.

To reduce the number of constructors for this class, this one will soon be deprecated. For new code, please use this form, instead.


ItemPropertyDescriptor

public ItemPropertyDescriptor(AdapterFactory adapterFactory,
                              ResourceLocator resourceLocator,
                              String displayName,
                              String description,
                              EReference[] parentReferences,
                              boolean isSettable,
                              String category)
This creates an instance that uses a resource locator, specifies a category, and determines the cell editor from the parent references.

To reduce the number of constructors for this class, this one will soon be deprecated. For new code, please use this form, instead.


ItemPropertyDescriptor

public ItemPropertyDescriptor(AdapterFactory adapterFactory,
                              String displayName,
                              String description,
                              EReference[] parentReferences,
                              boolean isSettable,
                              String category,
                              String[] filterFlags)
This creates an instance that does not use a resource locator, specifies a category and filter flags, and determines the cell editor from the parent references.

To reduce the number of constructors for this class, this one may be deprecated in the future. For new code, please use this form, instead.


ItemPropertyDescriptor

public ItemPropertyDescriptor(AdapterFactory adapterFactory,
                              ResourceLocator resourceLocator,
                              String displayName,
                              String description,
                              EReference[] parentReferences,
                              boolean isSettable,
                              String category,
                              String[] filterFlags)
This creates an instance that uses a resource locator, specifies a category and filter flags, and determines the cell editor from the parent references.

Method Detail

getCategory

public String getCategory(Object object)
This returns the group of propertiesk into which this one should be placed.

Specified by:
getCategory in interface IItemPropertyDescriptor

getDescription

public String getDescription(Object object)
This returns the description to be displayed in the property sheet when this property is selected.

Specified by:
getDescription in interface IItemPropertyDescriptor

getDisplayName

public String getDisplayName(Object object)
This returns the name of the property to be displayed in the property sheet.

Specified by:
getDisplayName in interface IItemPropertyDescriptor

getFilterFlags

public String[] getFilterFlags(Object object)
This returns the flags used as filters in the property sheet.

Specified by:
getFilterFlags in interface IItemPropertyDescriptor

getId

public String getId(Object object)
This returns the interface name of this property. This is the key that is passed around and must uniquely identifiy this descriptor.

Specified by:
getId in interface IItemPropertyDescriptor

getHelpContextIds

public Object getHelpContextIds(Object object)
Specified by:
getHelpContextIds in interface IItemPropertyDescriptor

getComboBoxObjects

protected Collection getComboBoxObjects(Object object)
This will be called to populate a list of choices. The label provider will be used to determine the labels for the objects this returns. This default implementation uses getReachableObjectsOfType.


getReachableObjectsOfType

public static Collection getReachableObjectsOfType(EObject object,
                                                   EClassifier type)
This yields all reachable references from object with a meta object which indicates that it is a subtype of type.


collectReachableObjectsOfType

public static void collectReachableObjectsOfType(Collection visited,
                                                 Collection result,
                                                 EObject object,
                                                 EClassifier type)
This will visit all reachable references from object except those in visited; it updates visited and adds to result any object with a meta object that indicates that it is a subtype of type.


getLabelProvider

public IItemLabelProvider getLabelProvider(Object object)
This returns the label provider that will be used to render the value of this property. The implementation here just creates an AdapterFactoryItemDelegator.

Specified by:
getLabelProvider in interface IItemPropertyDescriptor

isCompatibleWith

public boolean isCompatibleWith(Object object,
                                Object anotherObject,
                                IItemPropertyDescriptor anotherItemPropertyDescriptor)
This indicates whether these two property descriptors are equal. It's not really clear to me how this is meant to be used, but it's a little bit like an equals test.

Specified by:
isCompatibleWith in interface IItemPropertyDescriptor

createPropertyValueWrapper

protected Object createPropertyValueWrapper(Object object,
                                            Object propertyValue)

getDefaultValue

public static Object getDefaultValue(EClassifier eType)

getValue

protected Object getValue(EObject object,
                          EStructuralFeature feature)
This is called by getPropertyValue to reflectively obtain the value of a feature from an object. It can be overridden by a subclass to provide additional processing of the value.


getPropertyValue

public Object getPropertyValue(Object object)
This does the delegated job of getting the property value from the given object; and it sets object, which is necessary if getComboBoxObjects is called. It is implemented in a generic way using the structural feature or parent references.

Specified by:
getPropertyValue in interface IItemPropertyDescriptor

isPropertySet

public boolean isPropertySet(Object object)
This does the delegated job of determine whether the property value from the given object is set. It is implemented in a generic way using the structural feature.

Specified by:
isPropertySet in interface IItemPropertyDescriptor

canSetProperty

public boolean canSetProperty(Object object)
This determines whether this descriptor's property for the object supports set (and reset).

Specified by:
canSetProperty in interface IItemPropertyDescriptor

setCommandOwner

public void setCommandOwner(Object commandOwner)
Sets the object to use as the owner of commands created to set the property's value.

Specified by:
setCommandOwner in interface IItemPropertyDescriptor.OverrideableCommandOwner

getCommandOwner

public Object getCommandOwner()
Returns the override command owner set via setCommandOwner.

Specified by:
getCommandOwner in interface IItemPropertyDescriptor.OverrideableCommandOwner

getCommandOwner

protected Object getCommandOwner(Object fallback)
Returns either the override command owner set via setCommandOwner or, if that is null, the fallback object provided.


resetPropertyValue

public void resetPropertyValue(Object object)
This does the delegated job of resetting property value back to it's default value.

Specified by:
resetPropertyValue in interface IItemPropertyDescriptor

getEditingDomain

public EditingDomain getEditingDomain(Object object)

setPropertyValue

public void setPropertyValue(Object object,
                             Object value)
This does the delegated job of setting the property to the given value. It is implemented in a generic way using the structural feature.

Specified by:
setPropertyValue in interface IItemPropertyDescriptor

getFeature

public Object getFeature(Object object)
Description copied from interface: IItemPropertyDescriptor
Returns the feature.

Specified by:
getFeature in interface IItemPropertyDescriptor

isMany

public boolean isMany(Object object)
Returns whether this property represents multiple values. This is true only if we're using a structural feature to provide the values for this property, and if that feature is multi-valued.

Specified by:
isMany in interface IItemPropertyDescriptor

getChoiceOfValues

public Collection getChoiceOfValues(Object object)
Specified by:
getChoiceOfValues in interface IItemPropertyDescriptor

isMultiLine

public boolean isMultiLine(Object object)
Description copied from interface: IItemPropertyDescriptor
Returns whether this property's value will consist of multi-line text.

Specified by:
isMultiLine in interface IItemPropertyDescriptor

isSortChoices

public boolean isSortChoices(Object object)
Description copied from interface: IItemPropertyDescriptor
Returns whether the choices for this property should be sorted for display.

Specified by:
isSortChoices in interface IItemPropertyDescriptor

Copyright 2001-2006 IBM Corporation and others.
All Rights Reserved.