Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

lachoy (1663)


I am actually Chris Winters; I am actually living in Pittsburgh, Pennsylvania, USA; I am actually married and have three cats. (Guess what one of them is named?) I am the "OpenInteract" guy, which could be good or bad.

Journal of lachoy (1663)

Monday July 25, 2005
03:14 PM

IDEA: How did they do that?

[ #25879 ]

(view image: What the i18n popup looks like)

Another example of the thoughtfulness of IDEA: while editing a class with a reference to a localized message I hit Ctrl-Shift-I (Quick Definition Lookup). I did this on a lark, just wondering what would happen -- typically this will popup inline the definition/declaration of the method you're calling, pretty useful. (You can even navigate to different implementations through the method hierarchy.)

Imagine my surprise when IDEA poped up the definition of the message -- it's like it read my mind!

Here's the kicker: I never told IDEA I was using localization. I didn't tell it the location of the message files and didn't put them on the classpath. Even more amazing, the msg object with this method is my own implementation of a Spring MessageSource, not even a subclass of the standard (and irritating) ResourceBundle.

Sure, the implementation may have been simple -- find all project files that look like they have localized messages, keep an index of the keys and when someone wants an implementation description try and match the quoted string against that index. But it's the smarts and forethought behind the implmentation that consistently makes this so easy to work with.

Posted from; read original

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.