Skip to content

Commit

Permalink
Revert "Revert "explorero: file actions disablment no longer needed""
Browse files Browse the repository at this point in the history
This reverts commit b634152.
  • Loading branch information
isidorn committed Jun 20, 2019
1 parent bbb4562 commit db17c23
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions src/vs/workbench/contrib/files/browser/fileActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<any> {
Expand All @@ -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<any> {
Expand Down Expand Up @@ -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<any> {
Expand All @@ -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<any> {
Expand Down

0 comments on commit db17c23

Please sign in to comment.