Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get IntelliJ IDEA to auto-complete messages from a property file?

I'm using IntelliJ IDEA Ultimate v12 to build an application with Spring MVC. I'm using a message_en.properties file to localise my application's text messages.

I can use ⌘-click to navigate from Java code to the message file, so the IDE has some knowledge of the link, but it doesn't auto-complete for me.

Can anyone suggest what I need to do so that auto-complete will work?

like image 797
Andrew Avatar asked Nov 21 '13 23:11

Andrew


1 Answers

Make sure that directory containing properties file is marked as a source root (this is indicated by blue directory icon).

If it's not, right click on it and select Mark As... -> Source root.

like image 50
Michał Rybak Avatar answered Sep 23 '22 02:09

Michał Rybak