Bug 186647 - [compiler] When reporting non-externalized string literals, display the string in the warning
Summary: [compiler] When reporting non-externalized string literals, display the strin...
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-11 16:34 EDT by Simon Archer CLA
Modified: 2008-08-25 06:03 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Archer CLA 2007-05-11 16:34:17 EDT
Using Eclipse 3.3 M6

When reporting that a string is non-externalized it would be very useful if the string in question was placed in the warning that appears in the Problems view.  Without this information, all you see is something like this, which is not very helpful at all.

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

This forces you to select each warning and visually inspect the code for each one before deciding on the necessary action.  Imagine how much easier it would be to use QuickFix if you saw this instead:

  Non-externalized string literal: "Hello"
  Non-externalized string literal: "localhost"
  Non-externalized string literal: "80"

I feel that dropping the "it should be followed by //$NON-NLS-<n>$" bit is acceptable, since this is not the only solution to the problem.  The QuickFix for this warning already presents 3 possible solutions.

On a related note, the QuickFix for this warning should support multi-select.
Comment 1 Martin Aeschlimann CLA 2007-05-14 04:35:30 EDT
Re quick fix: Executing more than one is supported: Read what's on the bottom line after Ctrl + 1.