Bug 560972 - [quick fix] Create NON-NLS comments for multiple strings at once
Summary: [quick fix] Create NON-NLS comments for multiple strings at once
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.14   Edit
Hardware: PC Mac OS X
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-10 08:48 EDT by Juergen Baier CLA
Modified: 2020-03-11 04:18 EDT (History)
1 user (show)

See Also:


Attachments
Screenshot of the quickfix popup for missing NON_NLS tag (83.70 KB, image/png)
2020-03-11 03:28 EDT, Thomas Wolf CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Juergen Baier CLA 2020-03-10 08:48:27 EDT
If you have Java code like:

    Files.createTempFile("prefix", "suffix");

then you have to click on "Add missing '$NON_NLS$' tag" twice. It would be nice if Eclipse would provide "Add all missing '$NON_NLS$' tags".
Comment 1 Thomas Wolf CLA 2020-03-11 03:28:37 EDT
Created attachment 282081 [details]
Screenshot of the quickfix popup for missing NON_NLS tag

But that already exists; see screenshot.
Comment 2 Juergen Baier CLA 2020-03-11 03:49:40 EDT
Is there anything I need to configure? On my system (Eclipse 4.14.0/macOS) the sub-item "Fix 2 problems of the same category in file" does not show up.
Comment 3 Juergen Baier CLA 2020-03-11 04:18:33 EDT
Ah, now I understand. You move the mouse over the first string and then the quickfix popup shown in your screenshot shows up.

I click on the warning symbol at the beginning of the line and there the popup does not show the sub-category. 

But in any case: What I want is an option to fix all NON-NLS warnings _on the current line_, not on the file level.