File tree Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,11 @@ export interface IProgressReporter {
9
9
*/
10
10
getId ( ) : string ;
11
11
12
+ /**
13
+ * Returns the progress location.
14
+ */
15
+ getProgressLocation ( ) : ProgressLocation | { viewId : string } ;
16
+
12
17
/**
13
18
* Reports a progress message update.
14
19
* @param message the message to update
Original file line number Diff line number Diff line change @@ -55,6 +55,10 @@ class ProgressReporter implements IProgressReporter {
55
55
return this . _id ;
56
56
}
57
57
58
+ public getProgressLocation ( ) : ProgressLocation | { viewId : string } {
59
+ return this . _progressLocation ;
60
+ }
61
+
58
62
public report ( message : string , increment ?: number ) : void {
59
63
if ( this . _statusBarItem ) {
60
64
const text = message ? `${ this . _jobName } - ${ message } ` : `${ this . _jobName } ...` ;
Original file line number Diff line number Diff line change @@ -229,8 +229,10 @@ export enum ServerMode {
229
229
* and return true if the final status is on Standard mode.
230
230
*/
231
231
export async function waitForStandardMode ( progressReporter : IProgressReporter ) : Promise < boolean > {
232
+ const importMessage = progressReporter ?. getProgressLocation ( ) === vscode . ProgressLocation . Notification ?
233
+ "Importing projects, [check details](command:java.show.server.task.status)" : "Importing projects..." ;
232
234
if ( await isImportingProjects ( ) ) {
233
- progressReporter . report ( "Importing projects..." ) ;
235
+ progressReporter . report ( importMessage ) ;
234
236
}
235
237
236
238
const api = await getJavaExtensionAPI ( progressReporter ) ;
@@ -246,7 +248,7 @@ export async function waitForStandardMode(progressReporter: IProgressReporter):
246
248
return true ;
247
249
}
248
250
249
- progressReporter ?. report ( "Importing projects..." ) ;
251
+ progressReporter ?. report ( importMessage ) ;
250
252
return new Promise < boolean > ( ( resolve ) => {
251
253
progressReporter . getCancellationToken ( ) . onCancellationRequested ( ( ) => {
252
254
resolve ( false ) ;
@@ -263,7 +265,7 @@ export async function waitForStandardMode(progressReporter: IProgressReporter):
263
265
264
266
return false ;
265
267
} else if ( api && api . serverMode === ServerMode . HYBRID ) {
266
- progressReporter . report ( "Importing projects..." ) ;
268
+ progressReporter . report ( importMessage ) ;
267
269
return new Promise < boolean > ( ( resolve ) => {
268
270
progressReporter . getCancellationToken ( ) . onCancellationRequested ( ( ) => {
269
271
resolve ( false ) ;
You can’t perform that action at this time.
0 commit comments