From db17c23a72e9dd57da6f7b53d006832f791369ed Mon Sep 17 00:00:00 2001 From: isidor Date: Thu, 20 Jun 2019 10:27:01 +0200 Subject: [PATCH] Revert "Revert "explorero: file actions disablment no longer needed"" This reverts commit b6341520000c2615b9f0cb4aad732216826d0bc4. --- .../contrib/files/browser/fileActions.ts | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/vs/workbench/contrib/files/browser/fileActions.ts b/src/vs/workbench/contrib/files/browser/fileActions.ts index f12976ad42cb4..837f66be83b71 100644 --- a/src/vs/workbench/contrib/files/browser/fileActions.ts +++ b/src/vs/workbench/contrib/files/browser/fileActions.ts @@ -85,15 +85,10 @@ export class NewFileAction extends Action { static readonly LABEL = nls.localize('createNewFile', "New File"); constructor( - @IExplorerService explorerService: IExplorerService, @ICommandService private commandService: ICommandService ) { super('explorer.newFile', NEW_FILE_LABEL); this.class = 'explorer-action new-file'; - this._register(explorerService.onDidChangeEditable(e => { - const elementIsBeingEdited = explorerService.isEditable(e); - this.enabled = !elementIsBeingEdited; - })); } run(): Promise { @@ -107,15 +102,10 @@ export class NewFolderAction extends Action { static readonly LABEL = nls.localize('createNewFolder', "New Folder"); constructor( - @IExplorerService explorerService: IExplorerService, @ICommandService private commandService: ICommandService ) { super('explorer.newFolder', NEW_FOLDER_LABEL); this.class = 'explorer-action new-folder'; - this._register(explorerService.onDidChangeEditable(e => { - const elementIsBeingEdited = explorerService.isEditable(e); - this.enabled = !elementIsBeingEdited; - })); } run(): Promise { @@ -609,10 +599,6 @@ export class CollapseExplorerView extends Action { @IExplorerService readonly explorerService: IExplorerService ) { super(id, label, 'explorer-action collapse-explorer'); - this._register(explorerService.onDidChangeEditable(e => { - const elementIsBeingEdited = explorerService.isEditable(e); - this.enabled = !elementIsBeingEdited; - })); } run(): Promise { @@ -637,10 +623,6 @@ export class RefreshExplorerView extends Action { @IExplorerService private readonly explorerService: IExplorerService ) { super(id, label, 'explorer-action refresh-explorer'); - this._register(explorerService.onDidChangeEditable(e => { - const elementIsBeingEdited = explorerService.isEditable(e); - this.enabled = !elementIsBeingEdited; - })); } public run(): Promise {