Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Possible eclipse bug with //$NON-NLS
Possible eclipse bug with //$NON-NLS [message #557735] Wed, 08 September 2010 15:55 Go to next message
simon smith is currently offline simon smith
Messages: 2
Registered: July 2009
Junior Member
Hi,

For our java projects we set the "Non-Externized Strings" option within the Eclipse IDE to "Error".

Every few weeks or so, usually after checking out code from CVS, the following error is reported on every one of our Strings even though all the "//$NON-NLS-<n>" tags are in place:

Quote:
Non-externalized string literal; it should be followed by //$NON-NLS-<n>$


We have found only 2 ways to fix this:

  • Either, go into each and every class, make a change to the file (by pressing space and then delete to remove the space) and then re-save the file. This then seems to make eclipse take a fresh look at the file at which point it realises that all the tags are actually correct. However this is a lot of work (and frankly not feasible) as we would have hundreds of files to edit and re-save.
  • Or, Delete the entire project, close Eclipse, open Eclipse and then check-out the entire project again. This solution end up being very time consuming.

We have tried various things like cleaning the projects, setting the NLS option to "Ignore", rebuilding the project, then setting it back to "Error" and rebuilding again, but none of these solutions work. It also happens to random developers on random days, so it's clearly not an issue with the source code or source control system.

Any idea's guys why this is happening and what the solution would be?

Thanks
Re: Possible eclipse bug with //$NON-NLS [message #558766 is a reply to message #557735] Tue, 14 September 2010 11:16 Go to previous messageGo to next message
Dani Megert is currently offline Dani Megert
Messages: 3801
Registered: July 2009
Senior Member
simon smith wrote:
> Hi,
>
> For our java projects we set the "Non-Externized Strings" option
> within the Eclipse IDE to "Error".
>
> Every few weeks or so, usually after checking out code from CVS, the
> following error is reported on every one of our Strings even though
> all the "//$NON-NLS-<n>" tags are in place:
Sounds strange. I've never seen this. The best thing would be to file a
bug against JDT Core with steps to reproduce or provide a workspace that
shows the problem.

Dani
>
> Quote:
>> Non-externalized string literal; it should be followed by
>> //$NON-NLS-<n>$
>
>
> We have found only 2 ways to fix this:
>
> Either, go into each and every class, make a change to the file (by
> pressing space and then delete to remove the space) and then re-save
> the file. This then seems to make eclipse take a fresh look at the
> file at which point it realises that all the tags are actually
> correct. However this is a lot of work (and frankly not feasible) as
> we would have hundreds of files to edit and re-save.
> Or, Delete the entire project, close Eclipse, open Eclipse and then
> check-out the entire project again. This solution end up being very
> time consuming.
>
> We have tried various things like cleaning the projects, setting the
> NLS option to "Ignore", rebuilding the project, then setting it back
> to "Error" and rebuilding again, but none of these solutions work. It
> also happens to random developers on random days, so it's clearly not
> an issue with the source code or source control system.
>
> Any idea's guys why this is happening and what the solution would be?
>
> Thanks
Re: Possible eclipse bug with //$NON-NLS [message #558790 is a reply to message #558766] Tue, 14 September 2010 13:22 Go to previous messageGo to next message
simon smith is currently offline simon smith
Messages: 2
Registered: July 2009
Junior Member
Quote:

Sounds strange. I've never seen this. The best thing would be to file a
bug against JDT Core with steps to reproduce or provide a workspace that
shows the problem.



Thanks for the advice Dani, as no one seems to have a solution within this forum I think I'll follow your advice. However as this is a sporadic issue which I have no idea how to recreate or solve, I'm not entirely sure I'll have any better response at present.

Thanks
Re: Possible eclipse bug with //$NON-NLS [message #558944 is a reply to message #558790] Wed, 15 September 2010 05:45 Go to previous message
Dani Megert is currently offline Dani Megert
Messages: 3801
Registered: July 2009
Senior Member
simon smith wrote:
> Quote:
>> Sounds strange. I've never seen this. The best thing would be to file
>> a bug against JDT Core with steps to reproduce or provide a workspace
>> that shows the problem.
>
>
> Thanks for the advice Dani, as no one seems to have a solution within
> this forum I think I'll follow your advice. However as this is a
> sporadic issue which I have no idea how to recreate or solve,
You said, that once it happens you can't get rid of it easily. If you
could make that workspace available, then this would allow the team to
debug the issue.

Dani
> I'm not entirely sure I'll have any better response at present.
>
> Thanks
Previous Topic:Unable to install addon in Helios
Next Topic:BreadCrumb
Goto Forum:
  


Current Time: Mon Sep 22 06:18:38 GMT 2014

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

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