Adopt title in the progress notification in lsp

This commit is contained in:
aboyko
2022-07-19 15:14:03 -04:00
parent 3b678ce9ab
commit e002ddf6fb
11 changed files with 117 additions and 79 deletions

View File

@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2017, 2020 Pivotal, Inc.
* Copyright (c) 2017, 2022 Pivotal, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -71,7 +71,7 @@ public abstract class AbstractFileToProjectCache<P extends IJavaProject> extends
final String taskId = getProgressId();
final ProgressService progressService = server.getProgressService();
if (progressService != null) {
progressService.progressEvent(taskId, "Updating data for project `" + project.getElementName() + "'");
progressService.progressBegin(taskId, "Updating data for project", "'" + project.getElementName() + "'");
}
if (async) {
CompletableFuture.supplyAsync(() -> update(project)).thenAccept((changed) -> afterUpdate(project, changed, notify, taskId));
@@ -84,7 +84,7 @@ public abstract class AbstractFileToProjectCache<P extends IJavaProject> extends
private void afterUpdate(P project, boolean changed, boolean notify, String taskId) {
final ProgressService progressService = server.getProgressService();
if (progressService != null) {
progressService.progressEvent(taskId, null);
progressService.progressDone(taskId);
}
if (changed || alwaysFireEventOnUpdate) {
if (notify) {