spring-projects / sts4

The next generation of tooling for Spring Boot, including support for Cloud Foundry manifest files, Concourse CI pipeline definitions, BOSH deployment manifests, and more... - Available for Eclipse, Visual Studio Code, and Theia
https://spring.io/tools
Eclipse Public License 1.0
869 stars 203 forks source link

`Map<K,V>` with escaped key not works properly in `application.yml` #1243

Closed musashi-miyamoto closed 4 months ago

musashi-miyamoto commented 4 months ago

Describe the bug If map key is escaped string (like [/**]), VSCode YAML code completion not works properly.

To Reproduce

Sample configuratin class:

@ConfigurationProperties(prefix = "demo")
public class RootConfig {
    private Map<String, ChildConfig> pathMap;
    // Getters and Setters...
}

public class ChildConfig {
    private String host;
    private int port;
    // Getters and Setters...
}

Key without escape works properly: image

Key with escape provides no completion: image

Requires one extra deeper indentation: image

Completion provides no host, used in previous key: image

Sample

https://github.com/musashi-miyamoto/sts4-configuration-issue-reproduce-sample

BoykoAlex commented 4 months ago

Fixed with 212dacff69f361ab01dcf1270042f0972b2a8999