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.- Since:
- 4.6
-
Nested Class Summary
Nested classes/interfaces inherited from interface IItemPropertyDescriptor
IItemPropertyDescriptor.OverrideableCommandOwner, IItemPropertyDescriptor.ValueHandler, IItemPropertyDescriptor.ValueHandlerProvider -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final AnnotationThe annotation modeled by the modeled object.protected final BasicAnnotationValidator.AssistantThe assistant used forvalue conversion.protected final EditingDomainThe editing domain of the annotation.protected final EStructuralFeatureThefeatureof a property of the modeled object.protected final StringThekeyof a property of the modeled object.Fields inherited from class ItemPropertyDescriptorDecorator
itemPropertyDescriptor, object -
Constructor Summary
ConstructorsConstructorDescriptionModeledItemPropertyDescriptorDecorator(IItemPropertyDescriptor propertyDescriptor, EObject eObject, String key, EStructuralFeature eStructuralFeature, Annotation annotation, ResourceLocator resourceLocator, EditingDomain domain, BasicAnnotationValidator.Assistant assistant) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanSetProperty(Object object) booleanisPropertySet(Object thisObject) booleanisPropertyUnsettable(Object object) voidresetPropertyValue(Object thisObject) voidsetPropertyValue(Object object, Object value) Methods inherited from class ItemPropertyDescriptorDecorator
getCategory, getChoiceOfValues, getDecoratedItemPropertyDescriptor, getDecoratedObject, getDescription, getDisplayName, getEditorFactory, getFeature, getFilterFlags, getHelpContextIds, getId, getLabelProvider, getPropertyValue, getValueHandler, isChoiceArbitrary, isCompatibleWith, isMany, isMultiLine, isSortChoices
-
Field Details
-
key
-
eStructuralFeature
Thefeatureof a property of the modeled object. -
annotation
The annotation modeled by the modeled object. -
domain
The editing domain of the annotation. -
assistant
The assistant used forvalue 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
This implementation checks whether the resource of the
annotationisread-onlyindomain.- Specified by:
canSetPropertyin interfaceIItemPropertyDescriptor- Overrides:
canSetPropertyin classItemPropertyDescriptorDecorator
-
isPropertySet
This implementation checks if the key has a non-null value in the
annotationdetails.- Specified by:
isPropertySetin interfaceIItemPropertyDescriptor- Overrides:
isPropertySetin classItemPropertyDescriptorDecorator
-
isPropertyUnsettable
This implementation checks if the key has a
nullvalue in theannotationdetails and thevalue of the propertyis non-null. Returningtruefor this allows the properties view to set the implicit value explicitly via the tool bar button.- Specified by:
isPropertyUnsettablein interfaceIItemPropertyDescriptor.ValueHandlerProvider- Overrides:
isPropertyUnsettablein classItemPropertyDescriptorDecorator
-
resetPropertyValue
This implementation removes the detail corresponding to the
keyfrom theannotation.- Specified by:
resetPropertyValuein interfaceIItemPropertyDescriptor- Overrides:
resetPropertyValuein classItemPropertyDescriptorDecorator
-
setPropertyValue
This implementation
convertsthe 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:
setPropertyValuein interfaceIItemPropertyDescriptor- Overrides:
setPropertyValuein classItemPropertyDescriptorDecorator
-