Bug 179951

Summary: [nls tooling] Java expressions for generating key name in string externalization
Product: [Eclipse Project] JDT Reporter: NoName <utilisateur_182>
Component: TextAssignee: JDT-Text-Inbox <jdt-text-inbox>
Status: ASSIGNED --- QA Contact:
Severity: enhancement    
Priority: P5 CC: deepakazad
Version: 3.3   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description NoName CLA 2007-03-29 05:31:10 EDT
In "Externalize Strings" wizard, Instead of having a fixed common prefix, it would be cool to use a java expression , like for example:

source code:
System.err.println("You shouldn't have done that!!!");

key generation expression:
string.replaceAll("[^a-zA-Z]", "_").substring(0, 15)

key name:
You_shouldn_t_h

If it's too complicated to add, maybe accepting a regexp and doing the replaceAll in the background would still be great.
Comment 1 Dani Megert CLA 2007-03-29 05:57:34 EDT
You shouldn't create such long keys as they impact memory consumption and dictionary access.
Comment 2 NoName CLA 2007-03-29 08:44:09 EDT
(In reply to comment #1)

Well, if the class name is "OpenImageDialog", using default settings of "Internalize Strings", it gives "OpenImageDialog.0" wich have 17 characters. So i don't really understand your comment.

Comment 3 Dani Megert CLA 2007-03-30 09:09:50 EDT
No plans to work on this. Feel free to provide a good quality patch.
Comment 4 Dani Megert CLA 2007-06-22 09:59:32 EDT
Get rid of deprecated state.