[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [ptp-dev] Externalized messages on PTP
|
> 1. Having an independent plugin to centralize all the externalized
> strings for whole PTP project.
> --For this approach, I think getString() is better choice
I would veto this anyway, as this would mean none of the plugins would work standalone.
===========================
Chris Recoskie
Team Lead, IBM CDT Team
IBM Toronto
http://www.eclipse.org/cdt
Hong Chang Lin <linhongc@xxxxxxxxxx>
Hong Chang Lin <linhongc@xxxxxxxxxx>
Sent by: ptp-dev-bounces@xxxxxxxxxxx
09/03/2008 09:36 PM
Please respond to
Parallel Tools Platform general developers <ptp-dev@xxxxxxxxxxx> |
|
|
I found I made mistake, let me clear my thoughts:
1. Having an independent plugin to centralize all the externalized strings for whole PTP project.
--For this approach, I think getString() is better choice
2. Let each plugin to have its own package to contain Messages.java and messages.properties. This is Greg's opinion, I misunderstood it as the 1st one.
--For this approach, static properties in Messages is better
Since many PTP plugins already follow the 2nd approach, it' easier to make it as the PTP guideline.
Best Regards,
------
Hongchang Lin
Greg Watson <g.watson@xxxxxxxxxxxx>
Greg Watson <g.watson@xxxxxxxxxxxx>
Sent by: ptp-dev-bounces@xxxxxxxxxxx
09/04/2008 12:48 AM
Please respond to
Parallel Tools Platform general developers <ptp-dev@xxxxxxxxxxx> |
|
|
I prefer the static properties in the Messages class unless anyone feels strongly about getString.
Greg
On Sep 3, 2008, at 11:03 AM, Hong Chang Lin wrote:
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
<graycol.gif>Daniel Felix Ferber <dfferber@xxxxxxxxxxxxxxxxxx>
|
<ecblank.gif> To | <ecblank.gif>
Parallel Tools Platform general developers <ptp-dev@xxxxxxxxxxx> |
<ecblank.gif> cc | <ecblank.gif> |
<ecblank.gif> Subject | <ecblank.gif>
Re: [ptp-dev] Externalized messages on PTP |
<ecblank.gif> | <ecblank.gif> |
|
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
_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev
_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev
_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev





