mirror of
https://github.com/Microsoft/vscode
synced 2024-10-12 14:30:13 +00:00
This commit is contained in:
parent
e934023cb5
commit
a4ebfe7b37
|
@ -145,7 +145,7 @@ async function deleteFiles(explorerService: IExplorerService, workingCopyFileSer
|
||||||
let confirmation: IConfirmationResult;
|
let confirmation: IConfirmationResult;
|
||||||
// We do not support undo of folders, so in that case the delete action is irreversible
|
// We do not support undo of folders, so in that case the delete action is irreversible
|
||||||
const deleteDetail = distinctElements.some(e => e.isDirectory) ? nls.localize('irreversible', "This action is irreversible!") :
|
const deleteDetail = distinctElements.some(e => e.isDirectory) ? nls.localize('irreversible', "This action is irreversible!") :
|
||||||
distinctElements.length > 1 ? nls.localize('restorePlural', "You can restore these files using the Undo command") : nls.localize('restore', "You can restore this file using the Undo command");
|
distinctElements.length > 1 ? nls.localize('restorePlural', "You can restore these files using the Undo command.") : nls.localize('restore', "You can restore this file using the Undo command.");
|
||||||
|
|
||||||
// Check if we need to ask for confirmation at all
|
// Check if we need to ask for confirmation at all
|
||||||
if (skipConfirm || (useTrash && configurationService.getValue<boolean>(CONFIRM_DELETE_SETTING_KEY) === false)) {
|
if (skipConfirm || (useTrash && configurationService.getValue<boolean>(CONFIRM_DELETE_SETTING_KEY) === false)) {
|
||||||
|
|
|
@ -423,8 +423,17 @@ class PreferencesActionsContribution extends Disposable implements IWorkbenchCon
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
run(accessor: ServicesAccessor, resource: URI) {
|
async run(accessor: ServicesAccessor, resource?: URI) {
|
||||||
return accessor.get(IPreferencesService).openFolderSettings({ folderUri: resource });
|
if (URI.isUri(resource)) {
|
||||||
|
await accessor.get(IPreferencesService).openFolderSettings({ folderUri: resource });
|
||||||
|
} else {
|
||||||
|
const commandService = accessor.get(ICommandService);
|
||||||
|
const preferencesService = accessor.get(IPreferencesService);
|
||||||
|
const workspaceFolder = await commandService.executeCommand<IWorkspaceFolder>(PICK_WORKSPACE_FOLDER_COMMAND_ID);
|
||||||
|
if (workspaceFolder) {
|
||||||
|
await preferencesService.openFolderSettings({ folderUri: workspaceFolder.uri });
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
this._register(registerAction2(class extends Action2 {
|
this._register(registerAction2(class extends Action2 {
|
||||||
|
|
Loading…
Reference in a new issue