protected class WrapperItemProvider.WrapperItemPropertyDescriptor extends ItemPropertyDescriptor
getPropertyValue
. Thus, the owner must be an EObject to use this class. The property's name,
description, settable flag, static image, category, and filter flags are obtained by calling out to various
template methods, so can be easily changed by deriving a subclass.ItemPropertyDescriptor.ItemDelegator, ItemPropertyDescriptor.PropertyValueWrapper
IItemPropertyDescriptor.OverrideableCommandOwner
adapterFactory, BOOLEAN_VALUE_IMAGE, category, commandOwner, description, displayName, ecorePackage, feature, filterFlags, GENERIC_VALUE_IMAGE, INTEGRAL_VALUE_IMAGE, isSettable, itemDelegator, multiLine, parentReferences, REAL_VALUE_IMAGE, resourceLocator, sortChoices, staticImage, TEXT_VALUE_IMAGE
Constructor and Description |
---|
WrapperItemProvider.WrapperItemPropertyDescriptor(ResourceLocator resourceLocator,
EStructuralFeature feature) |
Modifier and Type | Method and Description |
---|---|
boolean |
canSetProperty(java.lang.Object object)
Substitutes the wrapper owner for the selected object and invokes the base implementation.
|
protected Command |
createSetCommand(EditingDomain domain,
java.lang.Object owner,
java.lang.Object feature,
java.lang.Object value)
Returns a command that will set the value on the model object.
|
java.util.Collection<?> |
getChoiceOfValues(java.lang.Object object)
Substitutes the wrapper owner for the selected object and invokes the base implementation.
|
java.lang.Object |
getPropertyValue(java.lang.Object object)
Substitutes the wrapper owner for the selected object and invokes the base implementation.
|
protected java.lang.Object |
getValue(EObject object,
EStructuralFeature feature)
Returns a value from a model object.
|
boolean |
isMany(java.lang.Object object)
Returns
false , as the property only represents a single value, even if the feature is multi-valued. |
boolean |
isPropertySet(java.lang.Object object)
Returns
true , as the property of a value wrapper is always considered to be set. |
void |
resetPropertyValue(java.lang.Object object)
Does nothing, as resetting the property of a value wrapper is not meaningful.
|
void |
setPropertyValue(java.lang.Object object,
java.lang.Object value)
Sets the property value.
|
protected void |
setValue(EObject object,
EStructuralFeature feature,
java.lang.Object value)
Sets a value on a model object.
|
collectReachableObjectsOfType, collectReachableObjectsOfType, createPropertyValueWrapper, getCategory, getComboBoxObjects, getCommandOwner, getCommandOwner, getDefaultId, getDefaultValue, getDescription, getDisplayName, getEditingDomain, getFeature, getFilterFlags, getHelpContextIds, getId, getLabelProvider, getReachableObjectsOfType, getReachableObjectsOfType, isCompatibleWith, isMultiLine, isSortChoices, setCommandOwner
public WrapperItemProvider.WrapperItemPropertyDescriptor(ResourceLocator resourceLocator, EStructuralFeature feature)
public java.lang.Object getPropertyValue(java.lang.Object object)
getValue
.getPropertyValue
in interface IItemPropertyDescriptor
getPropertyValue
in class ItemPropertyDescriptor
public boolean canSetProperty(java.lang.Object object)
canSetProperty
in interface IItemPropertyDescriptor
canSetProperty
in class ItemPropertyDescriptor
public boolean isPropertySet(java.lang.Object object)
true
, as the property of a value wrapper is always considered to be set.isPropertySet
in interface IItemPropertyDescriptor
isPropertySet
in class ItemPropertyDescriptor
public void resetPropertyValue(java.lang.Object object)
resetPropertyValue
in interface IItemPropertyDescriptor
resetPropertyValue
in class ItemPropertyDescriptor
public void setPropertyValue(java.lang.Object object, java.lang.Object value)
createSetcommand
is executed; otherwise, setValue
is called to set the value.setPropertyValue
in interface IItemPropertyDescriptor
setPropertyValue
in class ItemPropertyDescriptor
protected java.lang.Object getValue(EObject object, EStructuralFeature feature)
getValue
in class ItemPropertyDescriptor
protected void setValue(EObject object, EStructuralFeature feature, java.lang.Object value)
protected Command createSetCommand(EditingDomain domain, java.lang.Object owner, java.lang.Object feature, java.lang.Object value)
public boolean isMany(java.lang.Object object)
false
, as the property only represents a single value, even if the feature is multi-valued.isMany
in interface IItemPropertyDescriptor
isMany
in class ItemPropertyDescriptor
public java.util.Collection<?> getChoiceOfValues(java.lang.Object object)
getChoiceOfValues
in interface IItemPropertyDescriptor
getChoiceOfValues
in class ItemPropertyDescriptor