@@ -161,7 +161,7 @@ class StudioActions {
161
161
} ) ;
162
162
} ) ;
163
163
case 3 : // Run an EXE on the client.
164
- throw new Error ( "Not supported" ) ;
164
+ throw new Error ( "processUserAction: Run EXE (Action=5) not supported" ) ;
165
165
case 4 : {
166
166
// Insert the text in Target in the current document at the current selection point
167
167
const editor = vscode . window . activeTextEditor ;
@@ -170,7 +170,7 @@ class StudioActions {
170
170
editBuilder . replace ( editor . selection , target ) ;
171
171
} ) ;
172
172
}
173
- return ;
173
+ break ;
174
174
}
175
175
case 5 : // Studio will open the documents listed in Target
176
176
target . split ( "," ) . forEach ( ( element ) => {
@@ -207,7 +207,7 @@ class StudioActions {
207
207
}
208
208
} ) ;
209
209
} ) ;
210
- return ;
210
+ break ;
211
211
case 6 : // Display an alert dialog in Studio with the text from the Target variable.
212
212
return vscode . window . showWarningMessage ( target , { modal : true } ) ;
213
213
case 7 : // Display a dialog with a textbox and Yes/No/Cancel buttons.
@@ -222,8 +222,9 @@ class StudioActions {
222
222
} ;
223
223
} ) ;
224
224
default :
225
- throw new Error ( "Not supported" ) ;
225
+ throw new Error ( `processUserAction: ${ userAction } not supported` ) ;
226
226
}
227
+ return Promise . resolve ( ) ;
227
228
}
228
229
229
230
private userAction ( action , afterUserAction = false , answer = "" , msg = "" , type = 0 ) : Thenable < void > {
@@ -247,7 +248,7 @@ class StudioActions {
247
248
{
248
249
cancellable : false ,
249
250
location : vscode . ProgressLocation . Notification ,
250
- title : `Executing user action : ${ action . label } ` ,
251
+ title : `Executing ${ afterUserAction ? "AfterUserAction" : "UserAction" } : ${ action . label } ` ,
251
252
} ,
252
253
( ) => {
253
254
return this . api
@@ -274,6 +275,7 @@ class StudioActions {
274
275
. then (
275
276
( actionToProcess ) =>
276
277
actionToProcess &&
278
+ ! afterUserAction &&
277
279
this . processUserAction ( actionToProcess ) . then ( ( answer ) =>
278
280
answer && ( answer . msg || answer . msg === "" )
279
281
? this . userAction ( action , true , answer . answer , answer . msg , type )
@@ -431,6 +433,7 @@ export async function _contextMenu(sourceControl: boolean, node: PackageNode | C
431
433
return studioActions && studioActions . getMenu ( StudioMenuType . Context , sourceControl ) ;
432
434
}
433
435
436
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
434
437
export async function fireOtherStudioAction ( action : OtherStudioAction , uri ?: vscode . Uri , userAction ?) : Promise < void > {
435
438
const studioActions = new StudioActions ( uri ) ;
436
439
return studioActions && studioActions . fireOtherStudioAction ( action , userAction ) ;
0 commit comments