Bug 14827 - quick fix: offer marking strings as non-nls [quick fix]
Summary: quick fix: offer marking strings as non-nls [quick fix]
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 enhancement (vote)
Target Milestone: 2.1 M3   Edit
Assignee: Martin Aeschlimann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 20201 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-04-29 06:23 EDT by Adam Kiezun CLA
Modified: 2002-11-14 06:33 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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