File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import { window } from "vscode" ;
1+ import { ProgressLocation , window } from "vscode" ;
22import { ITasksProvider } from "../services/definitions" ;
33import { messages } from "../i18n/messages" ;
44import {
@@ -35,7 +35,14 @@ export async function createTask(
3535
3636 await disposeTaskSelectionPanel ( ) ;
3737
38- return openViewForAutoDetectedTaskSelection ( tasksProvider , readResource ) ;
38+ // display progress, it might take a while
39+ return window . withProgress (
40+ {
41+ location : ProgressLocation . Notification ,
42+ title : messages . OPENING_SELECTION_VIEW ,
43+ } ,
44+ ( ) => openViewForAutoDetectedTaskSelection ( tasksProvider , readResource )
45+ ) ;
3946}
4047
4148async function openViewForAutoDetectedTaskSelection (
Original file line number Diff line number Diff line change @@ -40,4 +40,5 @@ export const messages = {
4040 SWA_EDIT_TASK_EVENT : ( ) : string => `Edit` ,
4141 SWA_TASK_EXPLORER_PARAM : ( ) : string => `Explorer` ,
4242 SWA_TASK_EDITOR_PARAM : ( ) : string => `Editor` ,
43+ OPENING_SELECTION_VIEW : `Collecting the tasks...` ,
4344} ;
Original file line number Diff line number Diff line change @@ -136,10 +136,20 @@ export const testVscode: any = {
136136 showErrorMessage : async ( msg : string ) : Promise < void > => {
137137 MockVSCodeInfo . errorMsg = msg ;
138138 } ,
139+ withProgress : (
140+ options : {
141+ location : number ;
142+ title : string ;
143+ } ,
144+ task : ( progress : any , token : any ) => Promise < any >
145+ ) => Promise . resolve ( task ( { } , { } ) ) ,
139146 } ,
140147 ViewColumn : {
141148 One : 1 ,
142149 } ,
150+ ProgressLocation : {
151+ Notification : 15 ,
152+ } ,
143153 ExtensionContext : { extensionPath : "path" } ,
144154 TreeItem : class { } ,
145155 EventEmitter : class {
You can’t perform that action at this time.
0 commit comments