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

Bug 14827

Summary: quick fix: offer marking strings as non-nls [quick fix]
Product: [Eclipse Project] JDT Reporter: Adam Kiezun <akiezun>
Component: UIAssignee: Martin Aeschlimann <martinae>
Status: VERIFIED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: daniel_megert
Version: 2.0   
Target Milestone: 2.1 M3   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Adam Kiezun CLA 2002-04-29 06:23:08 EDT
in addition to offerring to open the nls wizard qf should also offer 
marking a string as non-nls (very often, i do not want to open the wizard - 
just want to mark as non-nls)

it should figure out which tag to put: non-nls-x (value of x should be 
determined - reuse nls scanner stuff)
Comment 1 Martin Aeschlimann CLA 2002-04-29 16:38:18 EDT
can you help me on this one (maybe refactor the method that evaluates position 
and text for a nls-string to an edit?!)
Comment 2 Erich Gamma CLA 2002-05-31 04:35:50 EDT
workaround define a non-nls macro
Comment 3 Dani Megert CLA 2002-10-01 05:46:22 EDT
Adam, I would also like NON-NLS to code assist for single line comments and
therefore support Martin's wish for getting access (internal API) to the NLS
scanner e.g.
getNonNlsString(int offset, int length)
or
getNonNlsString(String line)
Comment 4 Martin Aeschlimann CLA 2002-10-05 11:25:48 EDT
*** Bug 20201 has been marked as a duplicate of this bug. ***
Comment 5 Adam Kiezun CLA 2002-10-11 10:56:02 EDT
added NLSScanner.scanCurrentLine(ICompilationUnit, int)
it gives you back an obhect that has the information that you need to create 
a 'non-nls' string and position it correctly
Comment 6 Martin Aeschlimann CLA 2002-10-14 10:36:29 EDT
Could I have util method?

TextEdit getNonNlsString(int strigStart, int stringLength)

returns null if string is NLS'd already or the edit that appends a NON-NLS 
string
Comment 7 Adam Kiezun CLA 2002-10-16 08:35:17 EDT
see NLSUtil.createNLSEdit(ICompilationUnit cu, int position) 
Comment 8 Martin Aeschlimann CLA 2002-10-22 10:11:24 EDT
new quick fix added > 20021022