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

Empty completion after an error from microprofile/projectInfo #228

Closed
angelozerr opened this issue Feb 19, 2020 · 0 comments · Fixed by #227
Closed

Empty completion after an error from microprofile/projectInfo #228

angelozerr opened this issue Feb 19, 2020 · 0 comments · Fixed by #227
Assignees
Labels
bug Something isn't working
Milestone

Comments

@angelozerr
Copy link
Contributor

When completion (or other feature like validation, hover, etc) is called it consume the JDT LS microprofile/projectInfo
to collect properties. When microprofile/projectInfo throws an error and completion is redone, the properties are empty, even if
classpath changed.

This poblem occurs because of this fix (when application.properties doesn't belong to a Java project). The fix cache the completable future after
CompletableFuture.exceptions is called (when error is catch). The completable future which must be cached must be done before the exception is cacth
(before CompletableFuture.exceptions is called).

By doing that, we need to fix the case of application.properties doesn't belong to a Java project which must retun an empty project info
instead of throwing an error, otherwise, it will call every time the JDT LS extension microprofile/projectInfo each time completion is triggered
(should not be done since application.properties doesn't belong to a Java project).

An another case is when application.properties belongs to an Eclipse project but not in Java project. The JDT LS extension must return a project info with
the proper project location uri. By doing that, when user add a pom.xml, a classpath changed will be fired and a microprofile/propertiesChanged will be fired
and MicroProfile LS will reload the properties.

@angelozerr angelozerr added the bug Something isn't working label Feb 19, 2020
@angelozerr angelozerr added this to the v0.0.6 milestone Feb 19, 2020
angelozerr pushed a commit to angelozerr/quarkus-ls that referenced this issue Feb 19, 2020
@angelozerr angelozerr self-assigned this Feb 19, 2020
angelozerr pushed a commit to angelozerr/quarkus-ls that referenced this issue Feb 19, 2020
angelozerr pushed a commit to angelozerr/quarkus-ls that referenced this issue Feb 19, 2020
xorye pushed a commit that referenced this issue Feb 25, 2020
Fixes #228

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
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant