Add link to check detatils while reporting debugging progress (#1034)
This commit is contained in:
parent
81f8000bb6
commit
07366c988b
|
@ -9,6 +9,11 @@ export interface IProgressReporter {
|
|||
*/
|
||||
getId(): string;
|
||||
|
||||
/**
|
||||
* Returns the progress location.
|
||||
*/
|
||||
getProgressLocation(): ProgressLocation | { viewId: string };
|
||||
|
||||
/**
|
||||
* Reports a progress message update.
|
||||
* @param message the message to update
|
||||
|
|
|
@ -55,6 +55,10 @@ class ProgressReporter implements IProgressReporter {
|
|||
return this._id;
|
||||
}
|
||||
|
||||
public getProgressLocation(): ProgressLocation | { viewId: string } {
|
||||
return this._progressLocation;
|
||||
}
|
||||
|
||||
public report(message: string, increment?: number): void {
|
||||
if (this._statusBarItem) {
|
||||
const text = message ? `${this._jobName} - ${message}` : `${this._jobName}...`;
|
||||
|
|
|
@ -229,8 +229,10 @@ export enum ServerMode {
|
|||
* and return true if the final status is on Standard mode.
|
||||
*/
|
||||
export async function waitForStandardMode(progressReporter: IProgressReporter): Promise<boolean> {
|
||||
const importMessage = progressReporter?.getProgressLocation() === vscode.ProgressLocation.Notification ?
|
||||
"Importing projects, [check details](command:java.show.server.task.status)" : "Importing projects...";
|
||||
if (await isImportingProjects()) {
|
||||
progressReporter.report("Importing projects...");
|
||||
progressReporter.report(importMessage);
|
||||
}
|
||||
|
||||
const api = await getJavaExtensionAPI(progressReporter);
|
||||
|
@ -246,7 +248,7 @@ export async function waitForStandardMode(progressReporter: IProgressReporter):
|
|||
return true;
|
||||
}
|
||||
|
||||
progressReporter?.report("Importing projects...");
|
||||
progressReporter?.report(importMessage);
|
||||
return new Promise<boolean>((resolve) => {
|
||||
progressReporter.getCancellationToken().onCancellationRequested(() => {
|
||||
resolve(false);
|
||||
|
@ -263,7 +265,7 @@ export async function waitForStandardMode(progressReporter: IProgressReporter):
|
|||
|
||||
return false;
|
||||
} else if (api && api.serverMode === ServerMode.HYBRID) {
|
||||
progressReporter.report("Importing projects...");
|
||||
progressReporter.report(importMessage);
|
||||
return new Promise<boolean>((resolve) => {
|
||||
progressReporter.getCancellationToken().onCancellationRequested(() => {
|
||||
resolve(false);
|
||||
|
|
Loading…
Reference in New Issue