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.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
-
Method Summary
Modifier and TypeMethodDescriptionprotected Object
createPropertyValueWrapper
(Object object, Object propertyValue) Creates a property value wrapper for the given object's property value.Collection<?>
getChoiceOfValues
(Object object) 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
-
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
assistant
is available, if the assistant considers the annotationvalid at this location
, and if the assistant returnsone or more modeled annotation classes
. In that case, itcreates
the modeled object of each class,optionally including
it in the tree, and if the property descriptors arecategorized
, it creates an additional tree nesting per category. Otherwise it simply creates simply delegates tosuper
.- Overrides:
createPropertyValueWrapper
in classItemPropertyDescriptor
- Parameters:
object
- the object.propertyValue
- the property value of that object.
-
setPropertyValue
- Specified by:
setPropertyValue
in interfaceIItemPropertyDescriptor
- Overrides:
setPropertyValue
in classItemPropertyDescriptor
-
getChoiceOfValues
This implementation collects all the existing
annotation sources
in the containing model, adds to that the annotation source of anyregistered
annotation validator that returnstrue
forAnnotationValidator.isValidLocation(Annotation)
, removing the annotation source for any annotation validator that returnsfalse
.- Specified by:
getChoiceOfValues
in interfaceIItemPropertyDescriptor
- Overrides:
getChoiceOfValues
in classItemPropertyDescriptor
-
isChoiceArbitrary
This implementation is specialized to always return
true
.- Specified by:
isChoiceArbitrary
in interfaceIItemPropertyDescriptor.ValueHandlerProvider
- Overrides:
isChoiceArbitrary
in classItemPropertyDescriptor
-
getValueHandler
This is specialized to do additional validation checking to ensure that the source URI is
well-formed
.- Specified by:
getValueHandler
in interfaceIItemPropertyDescriptor.ValueHandlerProvider
- Overrides:
getValueHandler
in classItemPropertyDescriptor
-