@@ -65,9 +65,6 @@ function getOtherStudioActionLabel(action: OtherStudioAction): string {
65
65
return label ;
66
66
}
67
67
68
- // Used to avoid triggering the edit listener when files are reloaded by an extension
69
- const suppressEditListenerMap = new Map < string , boolean > ( ) ;
70
-
71
68
export class StudioActions {
72
69
private uri : vscode . Uri ;
73
70
private api : AtelierAPI ;
@@ -336,8 +333,6 @@ export class StudioActions {
336
333
const actionToProcess : UserAction = data . result . content . pop ( ) ;
337
334
338
335
if ( actionToProcess . reload ) {
339
- // Avoid the reload triggering the edit listener here
340
- suppressEditListenerMap . set ( this . uri . toString ( ) , true ) ;
341
336
await vscode . commands . executeCommand ( "workbench.action.files.revert" , this . uri ) ;
342
337
}
343
338
@@ -349,7 +344,6 @@ export class StudioActions {
349
344
this . projectEditAnswer = "-1" ;
350
345
} else if ( this . uri ) {
351
346
// Only revert if we have a URI
352
- suppressEditListenerMap . set ( this . uri . toString ( ) , true ) ;
353
347
await vscode . commands . executeCommand ( "workbench.action.files.revert" , this . uri ) ;
354
348
}
355
349
}
@@ -362,7 +356,6 @@ export class StudioActions {
362
356
if ( action . label === attemptedEditLabel ) {
363
357
if ( answer != "1" && this . uri ) {
364
358
// Only revert if we have a URI
365
- suppressEditListenerMap . set ( this . uri . toString ( ) , true ) ;
366
359
await vscode . commands . executeCommand ( "workbench.action.files.revert" , this . uri ) ;
367
360
}
368
361
if ( this . name . toUpperCase ( ) . endsWith ( ".PRJ" ) ) {
@@ -455,12 +448,6 @@ export class StudioActions {
455
448
label : getOtherStudioActionLabel ( action ) ,
456
449
} ;
457
450
if ( action === OtherStudioAction . AttemptedEdit ) {
458
- // Check to see if this "attempted edit" was an action by this extension due to a reload.
459
- // There's no way to detect at a higher level from the event.
460
- if ( suppressEditListenerMap . has ( this . uri . toString ( ) ) ) {
461
- suppressEditListenerMap . delete ( this . uri . toString ( ) ) ;
462
- return ;
463
- }
464
451
const query = "select * from %Atelier_v1_Utils.Extension_GetStatus(?)" ;
465
452
this . api . actionQuery ( query , [ this . name ] ) . then ( ( statusObj ) => {
466
453
const docStatus = statusObj . result . content . pop ( ) ;
0 commit comments