|
1 | | -import { tasks, Task, TaskScope, Pseudoterminal, CustomExecution, TaskExecution, TaskRevealKind, TaskPanelKind, EventEmitter, Event, TerminalDimensions, window, ProgressLocation, Progress, workspace } from "vscode"; |
| 1 | +import { tasks, Task, TaskScope, Pseudoterminal, CustomExecution, TaskExecution, TaskRevealKind, TaskPanelKind, EventEmitter, Event, TerminalDimensions, window, Progress, ProgressLocation, workspace } from "vscode"; |
2 | 2 | import { serverTasks } from "./serverTasks"; |
3 | 3 | import { Disposable } from "vscode-languageclient"; |
4 | | -import { ProgressReport } from "./protocol"; |
| 4 | +import { ProgressReport, ProgressKind } from "./protocol"; |
5 | 5 | import { Commands } from "./commands"; |
6 | 6 | import { getJavaConfiguration } from "./utils"; |
7 | 7 |
|
@@ -91,17 +91,11 @@ class ServerTaskTerminal implements Pseudoterminal { |
91 | 91 |
|
92 | 92 | private printTask(report: ProgressReport) { |
93 | 93 | if (report.complete) { |
94 | | - this.onDidWriteEvent.fire(`${report.id.slice(0, 8)} ${report.task} [Done]\r\n`); |
| 94 | + this.onDidWriteEvent.fire(`${report.token.slice(0, 8)} ${report.value.message} [Done]\r\n`); |
95 | 95 | return; |
96 | 96 | } |
97 | 97 |
|
98 | | - let taskMsg = `${report.id.slice(0, 8)} ${report.task}`; |
99 | | - if (report.status) { |
100 | | - taskMsg += `: ${report.status}`; |
101 | | - } |
102 | | - if (report.totalWork && report.workDone >= 0) { |
103 | | - taskMsg += ` [${report.workDone}/${report.totalWork}]`; |
104 | | - } |
| 98 | + const taskMsg = `${report.token.slice(0, 8)} ${report.value.message}`; |
105 | 99 |
|
106 | 100 | this.onDidWriteEvent.fire(`${taskMsg}\r\n`); |
107 | 101 | } |
@@ -141,19 +135,16 @@ export class ActivationProgressNotification { |
141 | 135 | } else if (!showBuildStatusEnabled) { |
142 | 136 | return; |
143 | 137 | } |
144 | | - const isProgressReportEnabled: boolean = getJavaConfiguration().get("progressReports.enabled"); |
145 | | - const title = isProgressReportEnabled ? "Opening Java Projects" : "Opening Java Projects..."; |
| 138 | + const title = "Opening Java Projects"; |
146 | 139 | window.withProgress({ |
147 | 140 | location: ProgressLocation.Notification, |
148 | 141 | title, |
149 | 142 | cancellable: false, |
150 | 143 | }, (progress: Progress<{ message?: string; increment?: number }>) => { |
151 | 144 | return new Promise<void>((resolve) => { |
152 | | - if (isProgressReportEnabled) { |
153 | | - progress.report({ |
154 | | - message: `[check details](command:${Commands.SHOW_SERVER_TASK_STATUS})` |
155 | | - }); |
156 | | - } |
| 145 | + progress.report({ |
| 146 | + message: `[check details](command:${Commands.SHOW_SERVER_TASK_STATUS})` |
| 147 | + }); |
157 | 148 | this.onHide(() => { |
158 | 149 | for (const disposable of this.disposables) { |
159 | 150 | disposable.dispose(); |
|
0 commit comments