Specify default "Resource bundle expression"

Hello everybody,

once again I have the pleasure of doing some very boring I18N task.

When I use the "Internationalize" function in IDEA the dialog always suggest "resourceBundle" as "Resource bundle expression". The help says this is because idea can not find a ResourceBundle class in my source - which is correct. We use a custom interface which looks very similiar to Spring's "MessageSource" interface as source for the I18N resource.

So the question is: can I tell IDEA that it should use a instance of my MessageSource interface instead. Either by extending from another slim interface or by some annotation? If not, is it possible to overwrite the default value for the internationalize dialog on a project level - because the instance of my MessageSource interface has almost always the same name.

PS: I know i could hardcore the instance name in the template directly, but it seems to be global - so this would mean I always have to change it back when I work on a different project.


Screenshot from 2013-09-25 14:35:02.png

Please sign in to leave a comment.