OpenLiberty / liberty-tools-intellij

IntelliJ IDEA extension for Liberty
https://plugins.jetbrains.com/plugin/14856-open-liberty-tools
Eclipse Public License 2.0
12 stars 24 forks source link

New Test Case for properties file entry used in Java file when MicroProfile annotation is used #733

Open turkeylurkey opened 5 months ago

turkeylurkey commented 5 months ago

LSP4MP supports a diagnostic displayed when a Java file has a dependency on a properties file. We need a test case to ensure the diagnostic is generated properly.

The way to reproduce the diagnostic is to create a starter project from https://start.microprofile.io/ using MP 3.2, Open Liberty, Java 8, Select All. In the ConfigTestController class there should be a line @ConfigProperty(name = "injected.value") In the microprofile-config.properties file there should be a line injected.value=Injected value2

To generate the diagnostic change injected.value to injected.value2. Note this new key is coloured grey because it is not used anywhere. Then inspect ConfigTestController.java and note the line @ConfigProperty(name = "injected.value") has a diagnostic indicated on injected.value (special colouring or diagnostic in the problems view. image

turkeylurkey commented 5 months ago

The details of the issue are provided but the line of code could be added to any Java class and the property added to microprofile-config.properties in an existing test case.