File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,6 +9,11 @@ export interface IProgressReporter {
99 */
1010 getId ( ) : string ;
1111
12+ /**
13+ * Returns the progress location.
14+ */
15+ getProgressLocation ( ) : ProgressLocation | { viewId : string } ;
16+
1217 /**
1318 * Reports a progress message update.
1419 * @param message the message to update
Original file line number Diff line number Diff line change @@ -55,6 +55,10 @@ class ProgressReporter implements IProgressReporter {
5555 return this . _id ;
5656 }
5757
58+ public getProgressLocation ( ) : ProgressLocation | { viewId : string } {
59+ return this . _progressLocation ;
60+ }
61+
5862 public report ( message : string , increment ?: number ) : void {
5963 if ( this . _statusBarItem ) {
6064 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 {
229229 * and return true if the final status is on Standard mode.
230230 */
231231export 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..." ;
232234 if ( await isImportingProjects ( ) ) {
233- progressReporter . report ( "Importing projects..." ) ;
235+ progressReporter . report ( importMessage ) ;
234236 }
235237
236238 const api = await getJavaExtensionAPI ( progressReporter ) ;
@@ -246,7 +248,7 @@ export async function waitForStandardMode(progressReporter: IProgressReporter):
246248 return true ;
247249 }
248250
249- progressReporter ?. report ( "Importing projects..." ) ;
251+ progressReporter ?. report ( importMessage ) ;
250252 return new Promise < boolean > ( ( resolve ) => {
251253 progressReporter . getCancellationToken ( ) . onCancellationRequested ( ( ) => {
252254 resolve ( false ) ;
@@ -263,7 +265,7 @@ export async function waitForStandardMode(progressReporter: IProgressReporter):
263265
264266 return false ;
265267 } else if ( api && api . serverMode === ServerMode . HYBRID ) {
266- progressReporter . report ( "Importing projects..." ) ;
268+ progressReporter . report ( importMessage ) ;
267269 return new Promise < boolean > ( ( resolve ) => {
268270 progressReporter . getCancellationToken ( ) . onCancellationRequested ( ( ) => {
269271 resolve ( false ) ;
You can’t perform that action at this time.
0 commit comments