Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MP Config 2.0] Completion for properties defined using @ConfigProperties #80

Closed
rzgry opened this issue Sep 17, 2020 · 3 comments · Fixed by #161
Closed

[MP Config 2.0] Completion for properties defined using @ConfigProperties #80

rzgry opened this issue Sep 17, 2020 · 3 comments · Fixed by #161
Assignees
Labels
completion properties-files Features supported in microprofile-config.properties
Milestone

Comments

@rzgry
Copy link
Member

rzgry commented Sep 17, 2020

For example with a class like

@ConfigProperties(prefix="server.")
@Dependent
public class Details {
    public String host; // the value of the configuration property server.host
    public int port;   // the value of the configuration property server.port
    private String endpoint; //the value of the configuration property server.endpoint
    public @ConfigProperty(name="old.location")
    String location; //the value of the configuration property server.old.location
    public String getEndpoint() {
        return endpoint;
    }
}

Completion options should exist for

server.host = localhost
server.port=9080
server.endpoint=query
server.old.location=London

The prefix can also be overriden when injecting the bean annotated with @ConfigProperties.

Ex:

@Inject @ConfigProperties(prefix="client") Details clientDetails;

Should result in compleition options for:

client.host = myHost
client.port=9081
client.endpoint=shelf
client.old.location=Dublin

There are other cases to consider as well. More information on how properties are retrieved can be found in the spec https://github.com/eclipse/microprofile-config/blob/master/spec/src/main/asciidoc/configexamples.asciidoc#aggregate-related-properties-into-a-cdi-bean

@rzgry rzgry added properties-files Features supported in microprofile-config.properties completion labels Sep 17, 2020
@angelozerr
Copy link

To verify, but if I remember Spring Boot have the same concept with Configproperties.

They manage JSPN with groups insteaf of properties https://docs.spring.io/spring-boot/docs/current/reference/html/appendix-configuration-metadata.html#configuration-metadata-format

I think we should so that too (generate on MicoProfile JDT side groups ) and manage "groups" on MicroProfile LS side for completion, etc

@angelozerr
Copy link

Please note that we have managed Quarkus ConfigProperties in https://github.com/redhat-developer/quarkus-ls/blob/master/quarkus.jdt.ext/com.redhat.microprofile.jdt.quarkus/src/main/java/com/redhat/microprofile/jdt/internal/quarkus/providers/QuarkusConfigPropertiesProvider.java but it doesn't use "groups", I think we should update on Quarkus side this provider to manage "groups".

For Quarkus side we must follow this dicussion https://quarkusio.zulipchat.com/#narrow/stream/187030-users/topic/.40ConfigProperties.20.20.26.20MicroProfile.20Config.202.2E0 if Quarkus Configproperties will continue to exist.

@datho7561
Copy link
Contributor

@angelozerr angelozerr modified the milestones: 0.3.0, 0.4.0 Jul 28, 2021
angelozerr pushed a commit to angelozerr/lsp4mp that referenced this issue Aug 7, 2021
@ConfigProperties

Fixes eclipse#80

Signed-off-by: azerr <azerr@redhat.com>
angelozerr pushed a commit to angelozerr/lsp4mp that referenced this issue Aug 7, 2021
@ConfigProperties

Fixes eclipse#80

Signed-off-by: azerr <azerr@redhat.com>
angelozerr pushed a commit to angelozerr/lsp4mp that referenced this issue Aug 7, 2021
@ConfigProperties

Fixes eclipse#80

Signed-off-by: azerr <azerr@redhat.com>
angelozerr pushed a commit to angelozerr/lsp4mp that referenced this issue Aug 9, 2021
@ConfigProperties

Fixes eclipse#80

Signed-off-by: azerr <azerr@redhat.com>
angelozerr pushed a commit to angelozerr/lsp4mp that referenced this issue Aug 9, 2021
@ConfigProperties

Fixes eclipse#80

Signed-off-by: azerr <azerr@redhat.com>
angelozerr pushed a commit to angelozerr/lsp4mp that referenced this issue Aug 10, 2021
@ConfigProperties

Fixes eclipse#80

Signed-off-by: azerr <azerr@redhat.com>
angelozerr pushed a commit to angelozerr/lsp4mp that referenced this issue Aug 10, 2021
@ConfigProperties

Fixes eclipse#80

Signed-off-by: azerr <azerr@redhat.com>
angelozerr pushed a commit to angelozerr/lsp4mp that referenced this issue Aug 10, 2021
@ConfigProperties

Fixes eclipse#80

Signed-off-by: azerr <azerr@redhat.com>
angelozerr pushed a commit to angelozerr/lsp4mp that referenced this issue Aug 10, 2021
@ConfigProperties

Fixes eclipse#80

Signed-off-by: azerr <azerr@redhat.com>
angelozerr pushed a commit to angelozerr/lsp4mp that referenced this issue Aug 10, 2021
@ConfigProperties

Fixes eclipse#80

Signed-off-by: azerr <azerr@redhat.com>
angelozerr pushed a commit to angelozerr/lsp4mp that referenced this issue Aug 10, 2021
@ConfigProperties

Fixes eclipse#80

Signed-off-by: azerr <azerr@redhat.com>
angelozerr pushed a commit to angelozerr/lsp4mp that referenced this issue Aug 10, 2021
@ConfigProperties

Fixes eclipse#80

Signed-off-by: azerr <azerr@redhat.com>
angelozerr pushed a commit to angelozerr/lsp4mp that referenced this issue Aug 10, 2021
@ConfigProperties

Fixes eclipse#80

Signed-off-by: azerr <azerr@redhat.com>
angelozerr pushed a commit to angelozerr/lsp4mp that referenced this issue Aug 10, 2021
@ConfigProperties

Fixes eclipse#80

Signed-off-by: azerr <azerr@redhat.com>
angelozerr pushed a commit to angelozerr/lsp4mp that referenced this issue Aug 12, 2021
@ConfigProperties

Fixes eclipse#80

Signed-off-by: azerr <azerr@redhat.com>
angelozerr pushed a commit to angelozerr/lsp4mp that referenced this issue Aug 12, 2021
@ConfigProperties

Fixes eclipse#80

Signed-off-by: azerr <azerr@redhat.com>
angelozerr pushed a commit to angelozerr/lsp4mp that referenced this issue Aug 12, 2021
@ConfigProperties

Fixes eclipse#80

Signed-off-by: azerr <azerr@redhat.com>
angelozerr pushed a commit to angelozerr/lsp4mp that referenced this issue Aug 17, 2021
@ConfigProperties

Fixes eclipse#80

Signed-off-by: azerr <azerr@redhat.com>
angelozerr pushed a commit to angelozerr/lsp4mp that referenced this issue Aug 18, 2021
@ConfigProperties

Fixes eclipse#80

Signed-off-by: azerr <azerr@redhat.com>
angelozerr pushed a commit to angelozerr/lsp4mp that referenced this issue Aug 20, 2021
@ConfigProperties

Fixes eclipse#80

Signed-off-by: azerr <azerr@redhat.com>
angelozerr pushed a commit to angelozerr/lsp4mp that referenced this issue Aug 20, 2021
@ConfigProperties

Fixes eclipse#80

Signed-off-by: azerr <azerr@redhat.com>
angelozerr pushed a commit that referenced this issue Aug 24, 2021
@ConfigProperties

Fixes #80

Signed-off-by: azerr <azerr@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
completion properties-files Features supported in microprofile-config.properties
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants