How to get IntelliJ IDEA to automatically populate messages from a properties file?

I am using IntelliJ IDEA Ultimate v12 to build an application with Spring MVC. I use the message_en.properties file to localize the text messages of the application.

I can use ⌘-click to switch from Java code to the message file, so the IDE has some idea of ​​the link, but it does not autocomplete for me.

Can anyone suggest what I need to do to make autocomplete work?

+7
spring-mvc intellij-idea
source share
1 answer

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

If this is not the case, right-click it and select Mark As... -> Source root .

+8
source share

All Articles