Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sapphire-dev] Best way to model enum

Thanks I will take the simple solution of using validation.

On 3/29/2012 11:56 AM, Konstantin Komissarchik wrote:
A simple solution would be to use validation. We have no means to restrict
enum items from being presented.

- Konstantin

-----Original Message-----
From: sapphire-dev-bounces@xxxxxxxxxxx
[mailto:sapphire-dev-bounces@xxxxxxxxxxx] On Behalf Of Ling Hao
Sent: Thursday, March 29, 2012 11:40 AM
To: Sapphire project
Subject: [sapphire-dev] Best way to model enum

One of the schema that I'm trying to model is an element named "destination"
in which the valid values are "stdout", "stderr", "jdk", "log4j", or a file
name.  I have modeled this element by an enum with CustomXmlValueBinding as
a switch panel, with a file name. Now in a later version, a new valid value
"slf4j" is introduced. What is the best way to model this change?  Obviously
I would like to avoid big if blocks.

Thanks,
Ling
_______________________________________________
sapphire-dev mailing list
sapphire-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/sapphire-dev

_______________________________________________
sapphire-dev mailing list
sapphire-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/sapphire-dev


Back to the top