redhat-developer / intellij-quarkus

IntelliJ Quarkus Tools
Eclipse Public License 2.0
119 stars 47 forks source link

Properties are not mapped to Kotlin sources #1362

Open ttntrifork opened 1 month ago

ttntrifork commented 1 month ago

I installed the plugin after seing this blog post: https://quarkus.io/blog/intellij-quarkus-tools-1.11.0/#configs-all-the-way-down

However, while IDEA now recognizes the files application-dev.properties and application-test.properties as Quarkus properties, it does not recognize ANY properties used from Kotlin classes (not even in normal application.properties), and marks the properties with a warning: Unrecognized property 'my.properties.enabled', it is not referenced in any Java files

This works fine without the plugin using IDEAs default Quarkus integration (it maps properties in application.properties to Kotlin source files)

@ConfigMapping(prefix = "my.properties")
interface MyProperties {

    @WithDefault("false")
    fun enabled(): Boolean

If setting my.properties.enabled=true IDEA reports the property as not referenced in any Java files.

The properties are read and mapped correctly at runtime into the kotlin application code

fbricon commented 1 month ago

Yeah Kotlin is not supported at the moment

angelozerr commented 1 month ago

Same issue than https://github.com/redhat-developer/intellij-quarkus/issues/482