Package org.eclipse.emf.cdo.etypes.provider.annotation

# Class AnnotationItemProviderAdapterFactory.ModeledItemPropertyDescriptorDecorator

java.lang.Object
org.eclipse.emf.edit.provider.ItemPropertyDescriptorDecorator
org.eclipse.emf.cdo.etypes.provider.annotation.AnnotationItemProviderAdapterFactory.ModeledItemPropertyDescriptorDecorator

All Implemented Interfaces:
  `IItemPropertyDescriptor`, `IItemPropertyDescriptor.ValueHandlerProvider`, `IPropertyEditorFactory.Provider`

Enclosing class:
  `AnnotationItemProviderAdapterFactory`

public static class AnnotationItemProviderAdapterFactory.ModeledItemPropertyDescriptorDecorator extends ItemPropertyDescriptorDecorator
An item property descriptor decorator implementation used by `AnnotationItemProviderAdapterFactory.createPropertyDescriptorDecorator` to create an `assistant`-aware decorator. It is reusable in overrides of AnnotationItemProviderAdapterFactory.createPropertyDescriptorDecorator.

## Nested Class Summary

## Nested classes/interfaces inherited from interface org.eclipse.emf.edit.provider.IItemPropertyDescriptor

`IItemPropertyDescriptor.OverrideableCommandOwner, IItemPropertyDescriptor.ValueHandler, IItemPropertyDescriptor.ValueHandlerProvider`

## Field Summary

Fields
Modifier and Type
Field
Description
`protected final Annotation`
`annotation`
The annotation modeled by the modeled object.
`protected final BasicAnnotationValidator.Assistant`
`assistant`
The assistant used for `value conversion`.
`protected final EditingDomain`
`domain`
The editing domain of the annotation.
`protected final EStructuralFeature`
`eStructuralFeature`
The `feature` of a property of the modeled object.
`protected final String`
`key`
The `key` of a property of the modeled object.

### Fields inherited from class org.eclipse.emf.edit.provider.ItemPropertyDescriptorDecorator

`itemPropertyDescriptor, object`

## Constructor Summary

Constructors
Constructor
Description
`ModeledItemPropertyDescriptorDecorator(IItemPropertyDescriptor propertyDescriptor, EObject eObject, String key, EStructuralFeature eStructuralFeature, Annotation annotation, ResourceLocator resourceLocator, EditingDomain domain, BasicAnnotationValidator.Assistant assistant)`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`canSetProperty(Object object)`
`boolean`
`isPropertySet(Object thisObject)`
`boolean`
`isPropertyUnsettable(Object object)`
`void`
`resetPropertyValue(Object thisObject)`
`void`
`setPropertyValue(Object object, Object value)`

### Methods inherited from class org.eclipse.emf.edit.provider.ItemPropertyDescriptorDecorator

`getCategory, getChoiceOfValues, getDecoratedItemPropertyDescriptor, getDecoratedObject, getDescription, getDisplayName, getEditorFactory, getFeature, getFilterFlags, getHelpContextIds, getId, getLabelProvider, getPropertyValue, getValueHandler, isChoiceArbitrary, isCompatibleWith, isMany, isMultiLine, isSortChoices`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### key

protected final String key
The `key` of a property of the modeled object.

### eStructuralFeature

protected final EStructuralFeature eStructuralFeature
The `feature` of a property of the modeled object.

### annotation

protected final Annotation annotation
The annotation modeled by the modeled object.

### domain

protected final EditingDomain domain
The editing domain of the annotation.

### assistant

protected final BasicAnnotationValidator.Assistant assistant
The assistant used for `value conversion`.

## Constructor Details

### ModeledItemPropertyDescriptorDecorator

public ModeledItemPropertyDescriptorDecorator(IItemPropertyDescriptor propertyDescriptor, EObject eObject, String key, EStructuralFeature eStructuralFeature, Annotation annotation, ResourceLocator resourceLocator, EditingDomain domain, BasicAnnotationValidator.Assistant assistant)

## Method Details

### canSetProperty

public boolean canSetProperty(Object object)

This implementation checks whether the resource of the `annotation` is `read-only` in `domain`.

Specified by:
  `canSetProperty` in interface `IItemPropertyDescriptor`
Overrides:
  `canSetProperty` in class `ItemPropertyDescriptorDecorator`

### isPropertySet

public boolean isPropertySet(Object thisObject)

This implementation checks if the key has a non-null value in the `annotation` details.

Specified by:
  `isPropertySet` in interface `IItemPropertyDescriptor`
Overrides:
  `isPropertySet` in class `ItemPropertyDescriptorDecorator`

### isPropertyUnsettable

public boolean isPropertyUnsettable(Object object)

This implementation checks if the key has a `null` value in the `annotation` details and the `value of the property` is non-null. Returning `true` for this allows the properties view to set the implicit value explicitly via the tool bar button.

Specified by:
  `isPropertyUnsettable` in interface `IItemPropertyDescriptor.ValueHandlerProvider`
Overrides:
  `isPropertyUnsettable` in class `ItemPropertyDescriptorDecorator`

### resetPropertyValue

public void resetPropertyValue(Object thisObject)

This implementation removes the detail corresponding to the `key` from the `annotation`.

Specified by:
  `resetPropertyValue` in interface `IItemPropertyDescriptor`
Overrides:
  `resetPropertyValue` in class `ItemPropertyDescriptorDecorator`

### setPropertyValue

public void setPropertyValue(Object object, Object value)

This implementation `converts` the value to a literal and either updates the key's existing entry's value or create a new entry for the key and value.

Specified by:
  `setPropertyValue` in interface `IItemPropertyDescriptor`
Overrides:
  `setPropertyValue` in class `ItemPropertyDescriptorDecorator`