| SetCommand and the XSDSimpleTypeDefinition LexicalFinal attribute [message #62536] | 
Thu, 07 July 2005 17:27   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
I attempted to set the LexicalFinal attribute on a XSDSimpleTypeDefinition  
instance using a SetCommand.  Unfortunately, the command fails preparation  
(SetCommand.prepare() returns false) because the string value does not match  
any of the enumeration literal values for this EAttribute.  The XSDSimpleTypeDefinitionItemProvider  
class creates a specialized ItemPropertyDescriptor for this attribute with  
the choice values representing all the various combinations of {restriction,  
list, union} - "restriction", "restriction list", "restriction list union",  
"restriction union", etc..  The EType for this property is XSD_SIMPLE_FINAL  
which only has the enumeration values of {all, restriction, list, union}  
so many of the choice values will never match the enumeration literal values  
and eType.isInstance(value) checks fail.  Can SetCommand not be used with  
the feature?  Is there a different way to set this feature value within the  
Command framework? 
 
Thanks in advance, 
 
Dennis Fuglsang
 |  
 |  
  | 
| Re: SetCommand and the XSDSimpleTypeDefinition LexicalFinal attribute [message #62561 is a reply to message #62536] | 
Thu, 07 July 2005 17:37   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Originally posted by: merks.ca.ibm.com 
 
Dennis, 
 
You need to create a list of XSDSimpleFinal values, not a String or list  
of Strings, as the value to set. 
 
 
dfuglsang wrote: 
 
> I attempted to set the LexicalFinal attribute on a  
> XSDSimpleTypeDefinition instance using a SetCommand.  Unfortunately,  
> the command fails preparation (SetCommand.prepare() returns false)  
> because the string value does not match any of the enumeration literal  
> values for this EAttribute.  The XSDSimpleTypeDefinitionItemProvider  
> class creates a specialized ItemPropertyDescriptor for this attribute  
> with the choice values representing all the various combinations of  
> {restriction, list, union} - "restriction", "restriction list",  
> "restriction list union", "restriction union", etc..  The EType for  
> this property is XSD_SIMPLE_FINAL which only has the enumeration  
> values of {all, restriction, list, union} so many of the choice values  
> will never match the enumeration literal values and  
> eType.isInstance(value) checks fail.  Can SetCommand not be used with  
> the feature?  Is there a different way to set this feature value  
> within the Command framework? 
> 
> Thanks in advance, 
> 
> Dennis Fuglsang 
> 
>
 |  
 |  
  | 
| Re: SetCommand and the XSDSimpleTypeDefinition LexicalFinal attribute [message #596078 is a reply to message #62536] | 
Thu, 07 July 2005 17:37   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Dennis, 
 
You need to create a list of XSDSimpleFinal values, not a String or list  
of Strings, as the value to set. 
 
 
dfuglsang wrote: 
 
> I attempted to set the LexicalFinal attribute on a  
> XSDSimpleTypeDefinition instance using a SetCommand.  Unfortunately,  
> the command fails preparation (SetCommand.prepare() returns false)  
> because the string value does not match any of the enumeration literal  
> values for this EAttribute.  The XSDSimpleTypeDefinitionItemProvider  
> class creates a specialized ItemPropertyDescriptor for this attribute  
> with the choice values representing all the various combinations of  
> {restriction, list, union} - "restriction", "restriction list",  
> "restriction list union", "restriction union", etc..  The EType for  
> this property is XSD_SIMPLE_FINAL which only has the enumeration  
> values of {all, restriction, list, union} so many of the choice values  
> will never match the enumeration literal values and  
> eType.isInstance(value) checks fail.  Can SetCommand not be used with  
> the feature?  Is there a different way to set this feature value  
> within the Command framework? 
> 
> Thanks in advance, 
> 
> Dennis Fuglsang 
> 
>
 |  
 |  
  | 
Powered by 
FUDForum. Page generated in 0.25538 seconds