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

Activation trigger should be more selective #497

Closed
rgrunber opened this issue Apr 29, 2022 · 1 comment · Fixed by #540
Closed

Activation trigger should be more selective #497

rgrunber opened this issue Apr 29, 2022 · 1 comment · Fixed by #540
Assignees
Labels
bug Something isn't working
Milestone

Comments

@rgrunber
Copy link
Member

rgrunber commented Apr 29, 2022

The Quarkus extension and language server are triggered for onLanguage:java. This seems excessive. I can have an invisible project with just folders and Java source files (no Maven, no Gradle), and it still starts.

quarkus-starts-on-java-project

At the very least we could bring it down to just :

"workspaceContains:pom.xml",
"workspaceContains:build.gradle",
"workspaceContains:settings.gradle"

As for a better approach, maybe vscode-java could define some command that reads the build files for presence of Quarkus metadata (eg. quarkus-bom, quarkus-maven-plugin, io.quarkus.extension, etc), and emit some command for which vscode-quarkus simply listens with https://code.visualstudio.com/api/references/activation-events#onCommand

@rgrunber rgrunber self-assigned this Jun 29, 2022
@rgrunber
Copy link
Member Author

I think the easiest approach would be to make the extension activation a kind of "silent" activation that only starts the necessary language servers if the Maven/Gradle build files indicate they support Quarkus. This seems the easiest option.

The problem with the "onCommand:extension.sayHello" activation event is that it needs to be triggered by some other extension and having vscode-java or vscode-microprofile be responsible for Quarkus logic seems wrong.

rgrunber added a commit to rgrunber/vscode-quarkus that referenced this issue Sep 6, 2022
- Fixes redhat-developer#497
- Only start language server(s) and contribute extension functionality
  if a Quarkus project is detected

Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
rgrunber added a commit to rgrunber/vscode-quarkus that referenced this issue Sep 6, 2022
- Fixes redhat-developer#497
- Only start language server(s) and contribute extension functionality
  if a Quarkus project is detected

Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
rgrunber added a commit to rgrunber/vscode-quarkus that referenced this issue Sep 8, 2022
- Fixes redhat-developer#497
- Only start language server(s) and contribute extension functionality
  if a Quarkus project is detected

Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
rgrunber added a commit that referenced this issue Sep 8, 2022
- Fixes #497
- Only start language server(s) and contribute extension functionality
  if a Quarkus project is detected

Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
@rgrunber rgrunber added this to the 1.12.0 milestone Sep 8, 2022
@rgrunber rgrunber added the bug Something isn't working label Sep 8, 2022
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