Benjin/delete (#11054)

* Adding delete to package.json

* checkpoint

* Delete file working

* Working for nested folders

* Added file/folder deletion test

* addressing feedback

* Swapping QuickPick for modal

* Adding Exclude functionality

* reverting change to package.json
This commit is contained in:
Benjin Dubishar
2020-06-24 10:27:58 -07:00
committed by GitHub
parent 2ba0de10df
commit 00836e1890
11 changed files with 237 additions and 17 deletions

View File

@@ -155,6 +155,10 @@ export class ApiWrapper {
return vscode.window.showWarningMessage(message, ...items);
}
public showWarningMessageOptions(message: string, options: vscode.MessageOptions, ...items: string[]): Thenable<string | undefined> {
return vscode.window.showWarningMessage(message, options, ...items);
}
public showOpenDialog(options: vscode.OpenDialogOptions): Thenable<vscode.Uri[] | undefined> {
return vscode.window.showOpenDialog(options);
}

View File

@@ -44,6 +44,9 @@ export const dacpacFiles = localize('dacpacFiles', "dacpac Files");
export const publishSettingsFiles = localize('publishSettingsFiles', "Publish Settings File");
export const systemDatabase = localize('systemDatabase', "System Database");
export function newObjectNamePrompt(objectType: string) { return localize('newObjectNamePrompt', 'New {0} name:', objectType); }
export function deleteConfirmation(toDelete: string) { return localize('deleteConfirmation', "Are you sure you want to delete {0}?", toDelete); }
export function deleteConfirmationContents(toDelete: string) { return localize('deleteConfirmationContents', "Are you sure you want to delete {0} and all of its contents?", toDelete); }
// Deploy dialog strings
@@ -103,6 +106,16 @@ export function cannotResolvePath(path: string) { return localize('cannotResolve
export function mssqlNotFound(mssqlConfigDir: string) { return localize('mssqlNotFound', "Could not get mssql extension's install location at {0}", mssqlConfigDir); }
export function projBuildFailed(errorMessage: string) { return localize('projBuildFailed', "Build failed. Check output pane for more details. {0}", errorMessage); }
export function unexpectedProjectContext(uri: string) { return localize('unexpectedProjectContext', "Unable to establish project context. Command invoked from unexpected location: {0}", uri); }
export function unableToPerformAction(action: string, uri: string) { return localize('unableToPerformAction', "Unable to locate '{0}' target: '{1}'", action, uri); }
export function unableToFindObject(path: string, objType: string) { return localize('unableToFindFile', "Unable to find {1} with path '{0}'", path, objType); }
// Action types
export const deleteAction = localize('deleteAction', 'Delete');
export const excludeAction = localize('excludeAction', 'Exclude');
// Project tree object types
export const fileObject = localize('fileObject', "file");
export const folderObject = localize('folderObject', "folder");
// Project script types

View File

@@ -59,7 +59,7 @@ export async function exists(path: string): Promise<boolean> {
try {
await fs.access(path);
return true;
} catch (e) {
} catch {
return false;
}
}