[cai18n-dev] Type safe message definition
Ceki Gulcu
ceki at qos.ch
Fri Aug 28 18:24:33 CEST 2009
Takeshi Kondo wrote:
> I agree.
> If there is IDE plugins, I'll fulfill my requirement by it.
> But I don't want to develop IDE plugins, because IDE plugin's
> maintenance is trouble-filled.
Indeed, plug-in are not easy to develop. This makes them all the more valuable. :-)
> If it must need IDE's plugins, I want to make it come true, IMO.
I don't understand. What do you mean by "it" when you write "I want to make it
come true" ?
Also note that even today CAI18N does not need IDE support to be useful. IDE
support would be nice to have but it is not necessary.
> Why don't we develop simple pattern of enum + annotation as message
> definition?
> for instance,
>
> public enum Colors{
> @Value("green")
> GREEN,
>
> @Value("red")
> RED,
>
> @Value("blue")
> BLUE
> }
>
> This syntax is simple.
> @Value annotation is used as default message when there is no property
> file. We can't define localized message by it.
So if there are no resource bundles, i.e. property files, we would use the
message values defined in the enum. OK but what would be the use case for that?
--
Ceki Gülcü
Logback: The reliable, generic, fast and flexible logging framework for Java.
http://logback.qos.ch
More information about the cal10n-dev
mailing list