Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 83000

Summary: Warnings should be given for unused Strings in .properties [nls] [4]
Product: [Eclipse Project] JDT Reporter: Aaron Luchko <aaron>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3 CC: thatnitind
Version: 3.1   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:

Description Aaron Luchko CLA 2005-01-17 13:53:18 EST
Currently there is nothing to indicate that a String in .properties file is not
being utilized anywhere, if such a String exists some indication should be
given, possibly a compiler warning (although the file technically isn't source
code so there might be semantic problems with doing this)
Comment 1 Wassim Melhem CLA 2005-01-17 14:48:47 EST
We plan on doing this for plugin.properties as it is the only properties file 
in the PDE domain.

If you are referring to arbitrary *.properties files then JDT is the place to 
enter such a feature request.
Comment 2 Aaron Luchko CLA 2005-01-17 15:47:28 EST
*** Bug 83026 has been marked as a duplicate of this bug. ***
Comment 3 Aaron Luchko CLA 2005-01-17 15:48:25 EST
Moving to JDT
Comment 4 Aaron Luchko CLA 2005-01-17 16:07:12 EST
Searches for Duplicate Strings would be useful as well.
Comment 5 Dirk Baeumer CLA 2005-01-18 04:39:53 EST
Doing this all the time can be time consuming since it requires inspecting all
files using a certain message bundle. The compiler doesn't warn about unused non
private methods either since this would require a reference search as well.

The functionality you are asking for exists via search. Open Search dialog-> NLS
Keys (you may need to enable this first via the custimize dialog).

Enter your accessor class and the bundle. The search will inform you about
missing and unused keys.

For 3.1 no action is planned to add this as a warning to the properties editor.
Comment 6 Aaron Luchko CLA 2005-01-18 16:30:14 EST
I haven't been able to find Open Search dialog-> NLS Keys so I can't really
comment on that but I don't think this is a comparable situation to unused non
private methods since unused non-private methods may still be called by other
projects (ie libraries) so are still quite valid to have in a class.  I assume
this search method will inform me of cases where the same identifier is used
twice?  
i
e 
Foo.this_string
Bar.that_string
Foo.this_string
Comment 7 Dirk Baeumer CLA 2005-01-19 05:52:11 EST
The function finds unused keys and duplicate keys.

To enable this search page, open the search dialog, press Custimize button,
check "NLS Keys".

This gives you a new search page.
Comment 8 Eclipse Webmaster CLA 2009-08-30 02:42:42 EDT
As of now 'LATER' and 'REMIND' resolutions are no longer supported.
Please reopen this bug if it is still valid for you.