Skip to content

Commit

Permalink
enhancement - Activate the extension when gradle files are in sub-fol…
Browse files Browse the repository at this point in the history
…ders of the workspace (#1570)
  • Loading branch information
Jiaaming authored Aug 8, 2024
1 parent 32d689a commit d94b31b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ private String generateRandomPipeName() {

private void sendImporterPipeName(String pipeName) {
JavaLanguageServerPlugin.getInstance().getClientConnection()
.sendNotification("gradle.onWillImporterConnect", pipeName);
.sendNotification("_gradle.onWillImporterConnect", pipeName);
}

private void attemptConnection(File pipeFile) throws IOException {
Expand Down
7 changes: 6 additions & 1 deletion extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,14 @@
"workspaceContains:**/gradlew",
"workspaceContains:**/gradlew.bat",
"workspaceContains:build.gradle",
"workspaceContains:*/build.gradle",
"workspaceContains:settings.gradle",
"workspaceContains:*/settings.gradle",
"workspaceContains:build.gradle.kts",
"workspaceContains:settings.gradle.kts"
"workspaceContains:*/build.gradle.kts",
"workspaceContains:settings.gradle.kts",
"workspaceContains:*/settings.gradle.kts",
"onCommand:_gradle.onWillImporterConnect"
],
"main": "./dist/index.js",
"contributes": {
Expand Down
2 changes: 1 addition & 1 deletion extension/src/bs/JdtlsImporterConnector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as vscode from "vscode";
import * as path from "path";
import { sendInfo } from "vscode-extension-telemetry-wrapper";

export const ON_WILL_IMPORTER_CONNECT = "gradle.onWillImporterConnect";
export const ON_WILL_IMPORTER_CONNECT = "_gradle.onWillImporterConnect";

/**
* Receive the pipe name from Java jdt.ls importer, generate named pipe file and
Expand Down

0 comments on commit d94b31b

Please sign in to comment.