Search code examples
intellij-ideaproperties

IntelliJ constants.getProperty() autocomplete field


I have a large constants.properties file.

When reading properties from it with constants.getProperty("PROPERTY_NAME"), I often have to copy/paste the property names which is rather long.

I see that IntelliJ is able to detect when properties are used inside the code. Is it possible to have auto-completion of property names when I type the name in getProperty()?


Solution

  • Yes, IntelliJ IDEA provides the completion for the Java Properties, use Ctrl+Space to get the hints:

    properties completion