{
final String style = part.definition().getStyle().content();
if( style != null && style.startsWith( "Sapphire.PropertyEditor.PopUpListField" ) )
{
final Property property = part.property();
if( property.definition() instanceof ValueProperty && property.service( PossibleValuesService.class ) != null )
{
PopUpListFieldStyle popUpListFieldPresentationStyle = null;
if( style.equals( "Sapphire.PropertyEditor.PopUpListField" ) )
{
if( Enum.class.isAssignableFrom( property.definition().getTypeClass() ) )
{
popUpListFieldPresentationStyle = PopUpListFieldStyle.STRICT;
}
else
{
final PossibleValues possibleValuesAnnotation = property.definition().getAnnotation( PossibleValues.class );
if( possibleValuesAnnotation != null )
{
popUpListFieldPresentationStyle
= ( possibleValuesAnnotation.invalidValueSeverity() == Severity.ERROR