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

Improve computation of Quarkus/MicroProfile properties #154

Closed
angelozerr opened this issue Nov 28, 2019 · 0 comments · Fixed by #159
Closed

Improve computation of Quarkus/MicroProfile properties #154

angelozerr opened this issue Nov 28, 2019 · 0 comments · Fixed by #159
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@angelozerr
Copy link
Contributor

angelozerr commented Nov 28, 2019

Today JDTQuarkusManager compute Quarkus properties from sources and dependencies, but there are several issues about computing properties like :

which shows several limitations:

  • the properties are computed only for Quarkus and not for Microprofile annotations. The compute of properties should be extensible via an Eclipse extension point
  • the microprofile property name can be complex and composed with dynamic part and static part. The property name should reference a list of values

For instance using @RegisterRestClient annotation gives the capability to customize the url:

com.example.BeerGateway/mp-rest/url=https://api.punkapi.com

  • com.example.BeerGateway is a dynamic part (a class bound with @RegisterRestClient
  • /mp-rest/url is a static part

To support this microprofile @RegisterRestClient annotation, we should provide in application.properties :

  • completion for class annotated with @RegisterRestClient
  • validation for class annotated with @RegisterRestClient
  • hover for class annotated with @RegisterRestClient
  • definition for class annotated with @RegisterRestClient

Refactor JDTQuarkusManager

JDTQuarkusManager should be renamed to JDTMicroprofileManager or perhaps JDTApplicationPropertiesManager?. The compute of properties should use extension point to manage any annotations (microprofile, quarkus) or without annotation like kubernetes.

Instead returning a list of properties like JDTQuarkusManager ,The JDTMicroprofileManager should return a list of types (ex : properties, classes-for-microprofile_restclient, quarkus-extensions, enumeration-values) and for each type a list of ExtendedConfigDescriptionBuildItem (it should be perhaps renamed). The property name can reference an another type.

Given this microprofile sample:

com.example.BeerGateway/mp-rest/url=https://api.punkapi.com, the JDTMicroprofileManager will return this JSON:

{
	"types": [
		{
			"name": "classes-for-microprofile_restclient",
			"items": [
				{
					"propertyName": "com.example.BeerGateway",
					"type": ....
				}
			]
		},
		{
			"name": "properties",
			"items": [
				{
					"propertyName": "quarkus.log.enabled",
					"type": ....
				},
				{
					"propertyName": "${classes-for-microprofile_restclient}/mp-rest/url"
				}
			]
		}
	]
}

Eclipse extension point

An eclipse extension point should give the capability to update classpath (ex: deployment JAR for Quarkus), create pattern search (ex: search ConfigRoot for Quarkus), compute properties.

What about com.redhat.microprofile.core.propertiesProvider as name?

The property name should reference a list of values

See ${classes-for-microprofile_restclient}/mp-rest/url sample

@angelozerr angelozerr self-assigned this Nov 28, 2019
@angelozerr angelozerr added this to the v0.0.5 milestone Nov 28, 2019
@angelozerr angelozerr added the enhancement New feature or request label Nov 28, 2019
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Nov 29, 2019
Fixes redhat-developer#154

Signed-off-by: azerr <azerr@redhat.com>
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Nov 29, 2019
Fixes redhat-developer#154

Signed-off-by: azerr <azerr@redhat.com>
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Nov 30, 2019
Fixes redhat-developer#154

Signed-off-by: azerr <azerr@redhat.com>
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Nov 30, 2019
Fixes redhat-developer#154

Signed-off-by: azerr <azerr@redhat.com>
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Nov 30, 2019
Fixes redhat-developer#154

Signed-off-by: azerr <azerr@redhat.com>
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Nov 30, 2019
Fixes redhat-developer#154

Signed-off-by: azerr <azerr@redhat.com>
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Dec 1, 2019
Fixes redhat-developer#154

Signed-off-by: azerr <azerr@redhat.com>
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Dec 2, 2019
Fixes redhat-developer#154

Signed-off-by: azerr <azerr@redhat.com>
@fbricon fbricon changed the title Improve compute of Quarkus/Microprofile properties Improve computation of Quarkus/Microprofile properties Dec 4, 2019
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Dec 4, 2019
Fixes redhat-developer#154

Signed-off-by: azerr <azerr@redhat.com>
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Dec 5, 2019
Fixes redhat-developer#154

Signed-off-by: azerr <azerr@redhat.com>
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Dec 5, 2019
Fixes redhat-developer#154

Signed-off-by: azerr <azerr@redhat.com>
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Dec 5, 2019
Fixes redhat-developer#154

Signed-off-by: azerr <azerr@redhat.com>
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Dec 5, 2019
Fixes redhat-developer#154

Signed-off-by: azerr <azerr@redhat.com>
angelozerr added a commit to angelozerr/vscode-quarkus that referenced this issue Dec 5, 2019
angelozerr added a commit to angelozerr/vscode-quarkus that referenced this issue Dec 6, 2019
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Dec 6, 2019
Fixes redhat-developer#154

Signed-off-by: azerr <azerr@redhat.com>
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Dec 6, 2019
Fixes redhat-developer#154

Signed-off-by: azerr <azerr@redhat.com>
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Dec 6, 2019
Fixes redhat-developer#154

Signed-off-by: azerr <azerr@redhat.com>
angelozerr added a commit to angelozerr/vscode-quarkus that referenced this issue Dec 6, 2019
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Dec 6, 2019
Fixes redhat-developer#154

Signed-off-by: azerr <azerr@redhat.com>
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Dec 6, 2019
Fixes redhat-developer#154

Signed-off-by: azerr <azerr@redhat.com>
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Dec 6, 2019
Fixes redhat-developer#154

Signed-off-by: azerr <azerr@redhat.com>
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Dec 6, 2019
Fixes redhat-developer#154

Signed-off-by: azerr <azerr@redhat.com>
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Dec 6, 2019
Fixes redhat-developer#154

Signed-off-by: azerr <azerr@redhat.com>
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Dec 6, 2019
Fixes redhat-developer#154

Signed-off-by: azerr <azerr@redhat.com>
@angelozerr angelozerr changed the title Improve computation of Quarkus/Microprofile properties Improve computation of Quarkus/MicroProfile properties Dec 6, 2019
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Dec 6, 2019
Fixes redhat-developer#154

Signed-off-by: azerr <azerr@redhat.com>
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Dec 7, 2019
Fixes redhat-developer#154

Signed-off-by: azerr <azerr@redhat.com>
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Dec 7, 2019
Fixes redhat-developer#154

Signed-off-by: azerr <azerr@redhat.com>
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Dec 7, 2019
Fixes redhat-developer#154

Signed-off-by: azerr <azerr@redhat.com>
angelozerr added a commit to angelozerr/vscode-quarkus that referenced this issue Dec 7, 2019
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Dec 7, 2019
Fixes redhat-developer#154

Signed-off-by: azerr <azerr@redhat.com>
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Dec 9, 2019
Fixes redhat-developer#154

Signed-off-by: azerr <azerr@redhat.com>
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Dec 9, 2019
Fixes redhat-developer#154

Signed-off-by: azerr <azerr@redhat.com>
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Dec 9, 2019
Fixes redhat-developer#154

Signed-off-by: azerr <azerr@redhat.com>
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Dec 9, 2019
Fixes redhat-developer#154

Signed-off-by: azerr <azerr@redhat.com>
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Dec 9, 2019
Fixes redhat-developer#154

Signed-off-by: azerr <azerr@redhat.com>
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Dec 9, 2019
Fixes redhat-developer#154

Signed-off-by: azerr <azerr@redhat.com>
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Dec 9, 2019
Fixes redhat-developer#154

Signed-off-by: azerr <azerr@redhat.com>
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Dec 9, 2019
Fixes redhat-developer#154

Signed-off-by: azerr <azerr@redhat.com>
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Dec 9, 2019
Fixes redhat-developer#154

Signed-off-by: azerr <azerr@redhat.com>
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Dec 10, 2019
Fixes redhat-developer#154

Signed-off-by: azerr <azerr@redhat.com>
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Dec 10, 2019
Fixes redhat-developer#154

Signed-off-by: azerr <azerr@redhat.com>
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Dec 10, 2019
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Dec 10, 2019
angelozerr added a commit to angelozerr/quarkus-ls that referenced this issue Dec 10, 2019
angelozerr added a commit that referenced this issue Dec 11, 2019
Fixes #154

Signed-off-by: azerr <azerr@redhat.com>
angelozerr added a commit to angelozerr/vscode-quarkus that referenced this issue Dec 11, 2019
angelozerr added a commit to redhat-developer/vscode-quarkus that referenced this issue Dec 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant