Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » externalized strings : conver to 'eclipse mechanism'
externalized strings : conver to 'eclipse mechanism' [message #259317] Fri, 03 April 2009 13:18 Go to next message
Eclipse UserFriend
Hi

is there a recommended way to change already externalized strings to use
the 'eclipse mechanism' (i.e. Messages extends NLS ...) rather than the
default one ?

I think that the "eclipse mechanism" is better due to not having
literals left in code (hence far fewer //$NON-NLS-1$) and easy junit
testability for broken keys.

cheers
Edoardo
Re: externalized strings : conver to 'eclipse mechanism' [message #259321 is a reply to message #259317] Fri, 03 April 2009 13:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

On 4/3/2009 1:18 PM, Edoardo Comar wrote:
> Hi
>
> is there a recommended way to change already externalized strings to use
> the 'eclipse mechanism' (i.e. Messages extends NLS ...) rather than the
> default one ?
>
> I think that the "eclipse mechanism" is better due to not having
> literals left in code (hence far fewer //$NON-NLS-1$) and easy junit
> testability for broken keys.

A follow-up question: why is the default in the Externalize Strings
wizard still to NOT use the "Eclipse mechanism" (at least as of 3.4.2)?
Is there a bug report about that already?

Eric
Re: externalized strings : conver to 'eclipse mechanism' [message #259334 is a reply to message #259321] Sun, 05 April 2009 06:12 Go to previous messageGo to next message
Eclipse UserFriend
Eric Rizzo wrote:
> On 4/3/2009 1:18 PM, Edoardo Comar wrote:
>> Hi
>>
>> is there a recommended way to change already externalized strings to use
>> the 'eclipse mechanism' (i.e. Messages extends NLS ...) rather than the
>> default one ?
>>
>> I think that the "eclipse mechanism" is better due to not having
>> literals left in code (hence far fewer //$NON-NLS-1$) and easy junit
>> testability for broken keys.
>
> A follow-up question: why is the default in the Externalize Strings
> wizard still to NOT use the "Eclipse mechanism" (at least as of
> 3.4.2)? Is there a bug report about that already?
It should definitely remember your last choice which it currently
doesn't and given we already test whether org.eclipse.osgi is on the
build path we could also change the default. Can you file a bug against
JDT UI?

Thanks,

Dani
>
> Eric
Re: externalized strings : conver to 'eclipse mechanism' [message #259353 is a reply to message #259317] Mon, 06 April 2009 06:11 Go to previous messageGo to next message
Eclipse UserFriend
Edoardo Comar wrote:
> Hi
>
> is there a recommended way to change already externalized strings to
> use the 'eclipse mechanism' (i.e. Messages extends NLS ...) rather
> than the default one ?
When this was introduced we had a tool to convert to the new Eclipse
mechanism:
http://www.eclipse.org/eclipse/platform-core/downloads/tools /message_bundles/com.ibm.zrh.eclipse.nls_1.0.0.zip

This might no longer work with latest versions of Eclipse but it also
contains the source.

Dani
>
> I think that the "eclipse mechanism" is better due to not having
> literals left in code (hence far fewer //$NON-NLS-1$) and easy junit
> testability for broken keys.
>
> cheers
> Edoardo
Re: externalized strings : conver to 'eclipse mechanism' [message #259376 is a reply to message #259334] Mon, 06 April 2009 16:16 Go to previous message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

On 4/5/2009 6:12 AM, Daniel Megert wrote:
> Eric Rizzo wrote:
>> A follow-up question: why is the default in the Externalize Strings
>> wizard still to NOT use the "Eclipse mechanism" (at least as of
>> 3.4.2)? Is there a bug report about that already?
> It should definitely remember your last choice which it currently
> doesn't and given we already test whether org.eclipse.osgi is on the
> build path we could also change the default. Can you file a bug against
> JDT UI?

Done:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=271375

I might even find time to submit a patch for it later this week, but no
promises.

Eric
Previous Topic:Stdout and Stderr when debugging remotely?
Next Topic:Increase the Eclipse content assist size
Goto Forum:
  


Current Time: Sat Apr 19 11:40:07 EDT 2025

Powered by FUDForum. Page generated in 0.03093 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top