@@ -65,9 +65,6 @@ function getOtherStudioActionLabel(action: OtherStudioAction): string {
6565 return label ;
6666}
6767
68- // Used to avoid triggering the edit listener when files are reloaded by an extension
69- const suppressEditListenerMap = new Map < string , boolean > ( ) ;
70-
7168export class StudioActions {
7269 private uri : vscode . Uri ;
7370 private api : AtelierAPI ;
@@ -336,8 +333,6 @@ export class StudioActions {
336333 const actionToProcess : UserAction = data . result . content . pop ( ) ;
337334
338335 if ( actionToProcess . reload ) {
339- // Avoid the reload triggering the edit listener here
340- suppressEditListenerMap . set ( this . uri . toString ( ) , true ) ;
341336 await vscode . commands . executeCommand ( "workbench.action.files.revert" , this . uri ) ;
342337 }
343338
@@ -349,7 +344,6 @@ export class StudioActions {
349344 this . projectEditAnswer = "-1" ;
350345 } else if ( this . uri ) {
351346 // Only revert if we have a URI
352- suppressEditListenerMap . set ( this . uri . toString ( ) , true ) ;
353347 await vscode . commands . executeCommand ( "workbench.action.files.revert" , this . uri ) ;
354348 }
355349 }
@@ -362,7 +356,6 @@ export class StudioActions {
362356 if ( action . label === attemptedEditLabel ) {
363357 if ( answer != "1" && this . uri ) {
364358 // Only revert if we have a URI
365- suppressEditListenerMap . set ( this . uri . toString ( ) , true ) ;
366359 await vscode . commands . executeCommand ( "workbench.action.files.revert" , this . uri ) ;
367360 }
368361 if ( this . name . toUpperCase ( ) . endsWith ( ".PRJ" ) ) {
@@ -455,12 +448,6 @@ export class StudioActions {
455448 label : getOtherStudioActionLabel ( action ) ,
456449 } ;
457450 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- }
464451 const query = "select * from %Atelier_v1_Utils.Extension_GetStatus(?)" ;
465452 this . api . actionQuery ( query , [ this . name ] ) . then ( ( statusObj ) => {
466453 const docStatus = statusObj . result . content . pop ( ) ;
0 commit comments