Re: The former is better if Greg's suggestion is adopted; the latter one is good for Daniel's
- Will we use a getString (or similar) method to read the string for a given key? Or will we use the "public class Messages extends NLS" as adopted by Eclipse Platform (each message is a static property in the Messages class that extends NLS, and all are strings automatically read from the properties file once the class is referenced for the first time)?
Best Regards,
------
Hongchang Lin
Daniel Felix Ferber <dfferber@xxxxxxxxxxxxxxxxxx>
Daniel Felix Ferber <dfferber@xxxxxxxxxxxxxxxxxx>
Sent by: ptp-dev-bounces@xxxxxxxxxxx
09/03/2008 09:03 PM
Please respond to
Parallel Tools Platform general developers <ptp-dev@xxxxxxxxxxx> |
|
|
I still prefer using Eclipse tool to externalize strings. (right clicking over the package or source file and then Source->Externalize Strings).
By default, it externalizes strings into a messages.properties and a Messages.java file inside the same package.
Fortunately, it is also possible to change setting of the externalize dialog to put messages into a messages.properties and a Messages.java from another package. That would fit the approach described by Greg.
However, the dialog needs to be re-configured for every java file that it analyses. Unfortunately, the dialog does not remember the settings, nor are there preferences.
Therefore, Gregs suggestion would be fine for me, since it also works with the automatic externalization tool, although in a more cumbersome way.
I think there are other decisions to be taken:
- Will we use a getString (or similar) method to read the string for a given key? Or will we use the "public class Messages extends NLS" as adopted by Eclipse Platform (each message is a static property in the Messages class that extends NLS, and all are strings automatically read from the properties file once the class is referenced for the first time)?
- Are we going to use a prefix for the keys that identify the strings? By default, the externalization dialog uses the class name as prefix, other other (including none) prefixes are possible.
Best regards,
Daniel Felix Ferber
Greg Watson wrote:
_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev
|