From 89317ce0de0f478116b1c6d2de8782fd577e82d4 Mon Sep 17 00:00:00 2001 From: Austin Varela Date: Thu, 7 May 2026 09:57:51 -0400 Subject: [PATCH] Fix NPE related to missing a title for initialization --- src/main/java/nextflow/lsp/NextflowLanguageServer.java | 2 +- src/main/java/nextflow/lsp/util/ProgressNotification.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/nextflow/lsp/NextflowLanguageServer.java b/src/main/java/nextflow/lsp/NextflowLanguageServer.java index 029f19d1..fc6c72ba 100644 --- a/src/main/java/nextflow/lsp/NextflowLanguageServer.java +++ b/src/main/java/nextflow/lsp/NextflowLanguageServer.java @@ -489,7 +489,7 @@ private boolean shouldInitialize(LanguageServerConfiguration previous, LanguageS private void initializeWorkspaces() { var progress = new ProgressNotification(client, "initialize"); progress.create(); - progress.begin("Initializing workspace..."); + progress.begin("Initializing", "Initializing workspace..."); var count = 0; var total = workspaceRoots.keySet().size() - 1; diff --git a/src/main/java/nextflow/lsp/util/ProgressNotification.java b/src/main/java/nextflow/lsp/util/ProgressNotification.java index ed833aa9..1c5d868e 100644 --- a/src/main/java/nextflow/lsp/util/ProgressNotification.java +++ b/src/main/java/nextflow/lsp/util/ProgressNotification.java @@ -42,8 +42,9 @@ public void create() { client.createProgress(new WorkDoneProgressCreateParams(Either.forLeft(token))); } - public void begin(String message) { + public void begin(String title, String message) { var progress = new WorkDoneProgressBegin(); + progress.setTitle(title); progress.setMessage(message); progress.setPercentage(0); client.notifyProgress(new ProgressParams(Either.forLeft(token), Either.forLeft(progress)));