On Feb 6, 2008 11:41 AM, Martin Desruisseaux <[EMAIL PROTECTED]> wrote: > Simone Giannecchini a écrit : > > I have created the utf resource file in my dir which is called > > a.b.c.i18n, now from my code if I do > > System.out.println(Errors.format(ErrorKeys.TEST)); > > where ErrorKeys was defined by me in a.b.c.i18n, I get the error > > message which is instead located into the Errors file in > > org.geotools.resources.i18n. > > If you use Errors from org.geotools.resources.i18n, it is the intented > behavior... I didn't understood that you wanted your own resources. In such > case, you need to creates yours own Errors class in the same package than your > resources. Just copy the Errors class from org.geotools.resources.i18n to your > a.b.c.i18n package (it is very small) and edit.
K, will do that. > > You are right that org.geotools.resources.i18n takes a centralized approach. > At > the begining of GeoTools 2, I was declaring resources on a module-by-module > basis. I centralized later when I realized that the module-by-module approach > leads to a very high level of redundancy - messages like "illegal argument" > occur again and again. In my experience, I found more effective to split on a > purpose basis (errors, loggings, vocabulary... we could add widgets, etc.) > than > on a module basis. >From the user perspective this could be a problem. If I want to develop my own plugin using geotools binaries how can I manage to add my error or logging messages in an easy way? I did not find any besides rebuilding the message file. What would you suggest? I am also curious about what the other developers think... Simone. > > Martin > -- ------------------------------------------------------- Eng. Simone Giannecchini President /CEO GeoSolutions S.A.S. Via Carignoni 51 55041 Camaiore (LU) Italy phone: +39 0584983027 fax: +39 0584983027 mob: +39 333 8128928 http://www.geo-solutions.it ------------------------------------------------------- ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
