delete file action: show name of file/directory to delete, not just 'the selected directory' (IDEA-159125)

This commit is contained in:
nik
2016-08-05 13:42:22 +03:00
parent c355f73bc8
commit 89d112ef91
2 changed files with 9 additions and 9 deletions
@@ -104,7 +104,7 @@ public final class VirtualFileDeleteProvider implements DeleteProvider {
private static String createConfirmationMessage(VirtualFile[] filesToDelete) {
if (filesToDelete.length == 1) {
if (filesToDelete[0].isDirectory()) {
return UIBundle.message("are.you.sure.you.want.to.delete.selected.folder.confirmation.message");
return UIBundle.message("are.you.sure.you.want.to.delete.selected.folder.confirmation.message", filesToDelete[0].getName());
}
else {
return UIBundle.message("are.you.sure.you.want.to.delete.selected.file.confirmation.message", filesToDelete[0].getName());
@@ -120,13 +120,13 @@ public final class VirtualFileDeleteProvider implements DeleteProvider {
}
LOG.assertTrue(hasFiles || hasFolders);
if (hasFiles && hasFolders) {
return UIBundle.message("are.you.sure.you.want.to.delete.selected.files.and.directories.confirmation.message");
return UIBundle.message("are.you.sure.you.want.to.delete.selected.files.and.directories.confirmation.message", filesToDelete.length);
}
else if (hasFolders) {
return UIBundle.message("are.you.sure.you.want.to.delete.selected.folders.confirmation.message");
return UIBundle.message("are.you.sure.you.want.to.delete.selected.folders.confirmation.message", filesToDelete.length);
}
else {
return UIBundle.message("are.you.sure.you.want.to.delete.selected.files.and.files.confirmation.message");
return UIBundle.message("are.you.sure.you.want.to.delete.selected.files.and.files.confirmation.message", filesToDelete.length);
}
}
}
@@ -99,11 +99,11 @@ file.chooser.save.dialog.default.title=Select File to Save
file.chooser.save.dialog.confirmation={0} already exists.\nDo you want to replace it?
file.chooser.save.dialog.confirmation.title=Confirm Save as
delete.dialog.title=Delete
are.you.sure.you.want.to.delete.selected.folder.confirmation.message=Are you sure you want to delete selected folder?
are.you.sure.you.want.to.delete.selected.file.confirmation.message=Delete {0}?
are.you.sure.you.want.to.delete.selected.files.and.directories.confirmation.message=Are you sure you want to delete selected files and directories?
are.you.sure.you.want.to.delete.selected.folders.confirmation.message=Are you sure you want to delete selected directories?
are.you.sure.you.want.to.delete.selected.files.and.files.confirmation.message=Are you sure you want to delete selected files?
are.you.sure.you.want.to.delete.selected.folder.confirmation.message=Are you sure you want to delete folder ''{0}''?
are.you.sure.you.want.to.delete.selected.file.confirmation.message=Delete ''{0}''?
are.you.sure.you.want.to.delete.selected.files.and.directories.confirmation.message=Are you sure you want to delete {0} selected files and directories?
are.you.sure.you.want.to.delete.selected.folders.confirmation.message=Are you sure you want to delete {0} selected directories?
are.you.sure.you.want.to.delete.selected.files.and.files.confirmation.message=Are you sure you want to delete {0} selected files?
create.new.folder.enter.new.folder.name.prompt.text=Enter a new folder name:
create.new.folder.folder.name.cannot.be.empty.error.message=Folder name cannot be empty
create.new.folder.could.not.create.folder.error.message=Could not create folder ''{0}''