Class AnnotationItemProvider.SourcePropertyDescriptor
- All Implemented Interfaces:
IItemPropertyDescriptor,IItemPropertyDescriptor.OverrideableCommandOwner,IItemPropertyDescriptor.ValueHandlerProvider,IPropertyEditorFactory.Provider
- Enclosing class:
AnnotationItemProvider
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.PropertyValueWrapperNested 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 -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectcreatePropertyValueWrapper(Object object, Object propertyValue) Creates a property value wrapper for the given object's property value.Collection<?> getChoiceOfValues(Object object) getValueHandler(Object object) booleanisChoiceArbitrary(Object object) voidsetPropertyValue(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
-
Constructor Details
-
SourcePropertyDescriptor
public SourcePropertyDescriptor()
-
-
Method Details
-
createPropertyValueWrapper
Creates a property value wrapper for the given object's property value.This implementation creates a hierarchy of property descriptors if the
assistantis available, if the assistant considers the annotation, and if the assistant returnsinvalid reference
valid at this location. In that case, itinvalid reference
one or more modeled annotation classesthe modeled object of each class,invalid reference
createsoptionally includingit in the tree, and if the property descriptors are, it creates an additional tree nesting per category. Otherwise it simply creates simply delegates toinvalid reference
categorizedsuper.- Overrides:
createPropertyValueWrapperin classItemPropertyDescriptor- Parameters:
object- the object.propertyValue- the property value of that object.
-
setPropertyValue
- Specified by:
setPropertyValuein interfaceIItemPropertyDescriptor- Overrides:
setPropertyValuein classItemPropertyDescriptor
-
getChoiceOfValues
This implementation collects all the existing
annotation sourcesin the containing model, adds to that the annotation source of anyregisteredannotation validator that returnstrueforAnnotationValidator.isValidLocation(Annotation), removing the annotation source for any annotation validator that returnsfalse.- Specified by:
getChoiceOfValuesin interfaceIItemPropertyDescriptor- Overrides:
getChoiceOfValuesin classItemPropertyDescriptor
-
isChoiceArbitrary
This implementation is specialized to always return
true.- Specified by:
isChoiceArbitraryin interfaceIItemPropertyDescriptor.ValueHandlerProvider- Overrides:
isChoiceArbitraryin classItemPropertyDescriptor
-
getValueHandler
This is specialized to do additional validation checking to ensure that the source URI is
well-formed.- Specified by:
getValueHandlerin interfaceIItemPropertyDescriptor.ValueHandlerProvider- Overrides:
getValueHandlerin classItemPropertyDescriptor
-