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
Modifier and TypeFieldDescriptionprotected final Annotation
The annotation modeled by the modeled object.protected final BasicAnnotationValidator.Assistant
The assistant used forvalue conversion
.protected final EditingDomain
The editing domain of the annotation.protected final EStructuralFeature
Thefeature
of a property of the modeled object.protected final String
Thekey
of a property of the modeled object.Fields inherited from class org.eclipse.emf.edit.provider.ItemPropertyDescriptorDecorator
itemPropertyDescriptor, object
-
Constructor Summary
ConstructorDescriptionModeledItemPropertyDescriptorDecorator
(IItemPropertyDescriptor propertyDescriptor, EObject eObject, String key, EStructuralFeature eStructuralFeature, Annotation annotation, ResourceLocator resourceLocator, EditingDomain domain, BasicAnnotationValidator.Assistant assistant) -
Method Summary
Modifier and TypeMethodDescriptionboolean
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
-
Field Details
-
key
Thekey
of a property of the modeled object. -
eStructuralFeature
Thefeature
of 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
annotation
isread-only
indomain
.- Specified by:
canSetProperty
in interfaceIItemPropertyDescriptor
- Overrides:
canSetProperty
in classItemPropertyDescriptorDecorator
-
isPropertySet
This implementation checks if the key has a non-null value in the
annotation
details.- Specified by:
isPropertySet
in interfaceIItemPropertyDescriptor
- Overrides:
isPropertySet
in classItemPropertyDescriptorDecorator
-
isPropertyUnsettable
This implementation checks if the key has a
null
value in theannotation
details and thevalue of the property
is non-null. Returningtrue
for this allows the properties view to set the implicit value explicitly via the tool bar button.- Specified by:
isPropertyUnsettable
in interfaceIItemPropertyDescriptor.ValueHandlerProvider
- Overrides:
isPropertyUnsettable
in classItemPropertyDescriptorDecorator
-
resetPropertyValue
This implementation removes the detail corresponding to the
key
from theannotation
.- Specified by:
resetPropertyValue
in interfaceIItemPropertyDescriptor
- Overrides:
resetPropertyValue
in classItemPropertyDescriptorDecorator
-
setPropertyValue
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 interfaceIItemPropertyDescriptor
- Overrides:
setPropertyValue
in classItemPropertyDescriptorDecorator
-