Bug 179951 - [nls tooling] Java expressions for generating key name in string externalization
Summary: [nls tooling] Java expressions for generating key name in string externalization
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P5 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-29 05:31 EDT by NoName CLA
Modified: 2010-10-21 15:42 EDT (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 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.