redhat-developer / intellij-quarkus

IntelliJ Quarkus Tools
Eclipse Public License 2.0
120 stars 50 forks source link

Properties are not mapped to Kotlin sources #1362

Open ttntrifork opened 4 months ago

ttntrifork commented 4 months 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 4 months ago

Yeah Kotlin is not supported at the moment

angelozerr commented 3 months ago

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