Skip to content

Commit 5e1879d

Browse files
authored
Fix NPE related to missing a title for initialization (#154)
1 parent b7e1c77 commit 5e1879d

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/main/java/nextflow/lsp/NextflowLanguageServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ private boolean shouldInitialize(LanguageServerConfiguration previous, LanguageS
489489
private void initializeWorkspaces() {
490490
var progress = new ProgressNotification(client, "initialize");
491491
progress.create();
492-
progress.begin("Initializing workspace...");
492+
progress.begin("Initializing", "Initializing workspace...");
493493

494494
var count = 0;
495495
var total = workspaceRoots.keySet().size() - 1;

src/main/java/nextflow/lsp/util/ProgressNotification.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@ public void create() {
4242
client.createProgress(new WorkDoneProgressCreateParams(Either.forLeft(token)));
4343
}
4444

45-
public void begin(String message) {
45+
public void begin(String title, String message) {
4646
var progress = new WorkDoneProgressBegin();
47+
progress.setTitle(title);
4748
progress.setMessage(message);
4849
progress.setPercentage(0);
4950
client.notifyProgress(new ProgressParams(Either.forLeft(token), Either.forLeft(progress)));

0 commit comments

Comments
 (0)