Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » externalized strings : conver to 'eclipse mechanism'
externalized strings : conver to 'eclipse mechanism' [message #335361] Fri, 03 April 2009 17:18 Go to next message
Edoardo Comar is currently offline Edoardo ComarFriend
Messages: 102
Registered: July 2009
Senior Member
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 #335362 is a reply to message #335361] Fri, 03 April 2009 17: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 #335379 is a reply to message #335362] Sun, 05 April 2009 10:12 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
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 #335393 is a reply to message #335361] Mon, 06 April 2009 10:11 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
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 #335413 is a reply to message #335379] Mon, 06 April 2009 20: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:Showing Views Shortlist?
Next Topic:how to create and install a feature patch
Goto Forum:
  


Current Time: Fri Apr 26 00:39:40 GMT 2024

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

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

Back to the top