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

# Class AnnotationItemProvider.SourcePropertyDescriptor

java.lang.Object
org.eclipse.emf.edit.provider.ItemPropertyDescriptor
org.eclipse.emf.cdo.etypes.provider.AnnotationItemProvider.SourcePropertyDescriptor

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

Enclosing class:
  AnnotationItemProvider

protected class AnnotationItemProvider.SourcePropertyDescriptor extends ItemPropertyDescriptor
A specialized property descriptor for the `annotation source` feature.

This implementation that is `AnnotationItemProviderAdapterFactory`-aware, using its `assistant` when available. It specializes `property value wrapper creation` to provide assistant-driven nested property descriptors.

Since:
  4.6

## Nested Class Summary

## Nested classes/interfaces inherited from class org.eclipse.emf.edit.provider.ItemPropertyDescriptor

`ItemPropertyDescriptor.DataTypeValueHandler, ItemPropertyDescriptor.ItemDelegator, ItemPropertyDescriptor.PropertyValueWrapper`

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

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

## Field Summary

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

`adapterFactory, BOOLEAN_VALUE_IMAGE, category, commandOwner, description, displayName, ecorePackage, editorFactory, feature, filterFlags, GENERIC_VALUE_IMAGE, INTEGRAL_VALUE_IMAGE, isSettable, itemDelegator, multiLine, NO_VALUE_IMAGE, parentReferences, REAL_VALUE_IMAGE, resourceLocator, sortChoices, staticImage, TEXT_VALUE_IMAGE`

## Constructor Summary

Constructors
Constructor
Description
`SourcePropertyDescriptor()`

## Method Summary

Modifier and Type
Method
Description
`protected Object`
`createPropertyValueWrapper(Object object, Object propertyValue)`
Creates a property value wrapper for the given object's property value.
`Collection<?>`
`getChoiceOfValues(Object object)`
`IItemPropertyDescriptor.ValueHandler`
`getValueHandler(Object object)`
`boolean`
`isChoiceArbitrary(Object object)`
`void`
`setPropertyValue(Object object, Object value)`

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

`canSetProperty, collectReachableObjectsOfType, collectReachableObjectsOfType, getCategory, getComboBoxObjects, getCommandOwner, getCommandOwner, getDefaultId, getDefaultValue, getDescription, getDisplayName, getEditingDomain, getEditorFactory, getFeature, getFilterFlags, getHelpContextIds, getId, getLabelProvider, getPropertyValue, getReachableObjectsOfType, getReachableObjectsOfType, getValue, isCompatibleWith, isMany, isMultiLine, isPropertySet, isPropertyUnsettable, isSortChoices, resetPropertyValue, setCommandOwner`

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

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

## Constructor Details

### SourcePropertyDescriptor

public SourcePropertyDescriptor()

## Method Details

### createPropertyValueWrapper

protected Object createPropertyValueWrapper(Object object, Object propertyValue)
Creates a property value wrapper for the given object's property value.

This implementation creates a hierarchy of property descriptors if the `assistant` is available, if the assistant considers the annotation `valid at this location`, and if the assistant returns `one or more modeled annotation classes`. In that case, it `creates` the modeled object of each class, `optionally including` it in the tree, and if the property descriptors are `categorized`, it creates an additional tree nesting per category. Otherwise it simply creates simply delegates to `super`.

Overrides:
  `createPropertyValueWrapper` in class `ItemPropertyDescriptor`
Parameters:
  `object` - the object.
  `propertyValue` - the property value of that object.

### setPropertyValue

public void setPropertyValue(Object object, Object value)

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

### getChoiceOfValues

public Collection<?> getChoiceOfValues(Object object)

This implementation collects all the existing `annotation sources` in the containing model, adds to that the annotation source of any `registered` annotation validator that returns `true` for `AnnotationValidator.isValidLocation(Annotation)`, removing the annotation source for any annotation validator that returns `false`.

Specified by:
  `getChoiceOfValues` in interface `IItemPropertyDescriptor`
Overrides:
  `getChoiceOfValues` in class `ItemPropertyDescriptor`

### isChoiceArbitrary

public boolean isChoiceArbitrary(Object object)

This implementation is specialized to always return `true`.

Specified by:
  `isChoiceArbitrary` in interface `IItemPropertyDescriptor.ValueHandlerProvider`
Overrides:
  `isChoiceArbitrary` in class `ItemPropertyDescriptor`

### getValueHandler

public IItemPropertyDescriptor.ValueHandler getValueHandler(Object object)

This is specialized to do additional validation checking to ensure that the source URI is `well-formed`.

Specified by:
  `getValueHandler` in interface `IItemPropertyDescriptor.ValueHandlerProvider`
Overrides:
  `getValueHandler` in class `ItemPropertyDescriptor`