Possible eclipse bug with //$NON-NLS [message #557735] |
Wed, 08 September 2010 15:55  |
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   |
Dani Megert Messages: 3802 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
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02607 seconds