[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.emf] Re: EDate property. input format not Locale.ENGLISH

Urs,

Comments below.

Urs Frei wrote:
Hello

I have an EDate member in my ecore model. In the property view I have to input a date in the format like this:

new SafeSimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'.'SSSZ"),
new SafeSimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'.'SSS"),
new SafeSimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"),
new SafeSimpleDateFormat("yyyy-MM-dd'T'HH:mm"),
new SafeSimpleDateFormat("yyyy-MM-dd")

But I would like to have a German format. Is there a way to change the configuration? The definition for the format is in the class
org.eclipse.emf.ecore.impl.EFactoryImpl


And the SaveSimpleDateFormat is configured to
public SafeSimpleDateFormat(String pattern){
    super(pattern, Locale.ENGLISH);
}

The only way I found is to replace the element in the member EDATE_FORMATS. But I think it is not the perfect solution.
That's a terrible solution because it will definitely break other clients of EMF. Best to create your own EDataType and then you can do whatever you want with it in terms of converting it between a string and a value.
Have you any other ideas?

Thank you

Urs