@codingame/monaco-vscode-dialogs-service-override 1.83.5 → 1.83.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-dialogs-service-override",
|
|
3
|
-
"version": "1.83.
|
|
3
|
+
"version": "1.83.6",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"module": "index.js",
|
|
19
19
|
"types": "index.d.ts",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"vscode": "npm:@codingame/monaco-vscode-api@1.83.
|
|
21
|
+
"vscode": "npm:@codingame/monaco-vscode-api@1.83.6",
|
|
22
22
|
"monaco-editor": "0.44.0"
|
|
23
23
|
}
|
|
24
24
|
}
|
|
@@ -57,13 +57,25 @@ let BrowserDialogHandler = class BrowserDialogHandler extends AbstractDialogHand
|
|
|
57
57
|
}
|
|
58
58
|
async about() {
|
|
59
59
|
const detailString = (useAgo) => {
|
|
60
|
-
return
|
|
60
|
+
return ( localizeWithPath(
|
|
61
|
+
'vs/workbench/browser/parts/dialogs/dialogHandler',
|
|
62
|
+
'aboutDetail',
|
|
63
|
+
"Version: {0}\nCommit: {1}\nDate: {2}\nBrowser: {3}",
|
|
64
|
+
this.productService.version || 'Unknown',
|
|
65
|
+
this.productService.commit || 'Unknown',
|
|
66
|
+
this.productService.date ? `${this.productService.date}${useAgo ? ' (' + fromNow(( new Date(this.productService.date)), true) + ')' : ''}` : 'Unknown',
|
|
67
|
+
navigator.userAgent
|
|
68
|
+
));
|
|
61
69
|
};
|
|
62
70
|
const detail = detailString(true);
|
|
63
71
|
const detailToCopy = detailString(false);
|
|
64
72
|
const { button } = await this.doShow(Severity.Info, this.productService.nameLong, [
|
|
65
|
-
localizeWithPath(
|
|
66
|
-
|
|
73
|
+
( localizeWithPath(
|
|
74
|
+
'vs/workbench/browser/parts/dialogs/dialogHandler',
|
|
75
|
+
{ key: 'copy', comment: ['&& denotes a mnemonic'] },
|
|
76
|
+
"&&Copy"
|
|
77
|
+
)),
|
|
78
|
+
( localizeWithPath('vs/workbench/browser/parts/dialogs/dialogHandler', 'ok', "OK"))
|
|
67
79
|
], detail, 1);
|
|
68
80
|
if (button === 0) {
|
|
69
81
|
this.clipboardService.writeText(detailToCopy);
|
|
@@ -119,12 +119,26 @@ let AbstractFileDialogService = class AbstractFileDialogService {
|
|
|
119
119
|
return 1 ;
|
|
120
120
|
}
|
|
121
121
|
let message;
|
|
122
|
-
let detail = nls.localizeWithPath(
|
|
122
|
+
let detail = ( nls.localizeWithPath(
|
|
123
|
+
'vs/workbench/services/dialogs/browser/abstractFileDialogService',
|
|
124
|
+
'saveChangesDetail',
|
|
125
|
+
"Your changes will be lost if you don't save them."
|
|
126
|
+
));
|
|
123
127
|
if (fileNamesOrResources.length === 1) {
|
|
124
|
-
message = nls.localizeWithPath(
|
|
128
|
+
message = ( nls.localizeWithPath(
|
|
129
|
+
'vs/workbench/services/dialogs/browser/abstractFileDialogService',
|
|
130
|
+
'saveChangesMessage',
|
|
131
|
+
"Do you want to save the changes you made to {0}?",
|
|
132
|
+
typeof fileNamesOrResources[0] === 'string' ? fileNamesOrResources[0] : resources.basename(fileNamesOrResources[0])
|
|
133
|
+
));
|
|
125
134
|
}
|
|
126
135
|
else {
|
|
127
|
-
message = nls.localizeWithPath(
|
|
136
|
+
message = ( nls.localizeWithPath(
|
|
137
|
+
'vs/workbench/services/dialogs/browser/abstractFileDialogService',
|
|
138
|
+
'saveChangesMessages',
|
|
139
|
+
"Do you want to save the changes to the following {0} files?",
|
|
140
|
+
fileNamesOrResources.length
|
|
141
|
+
));
|
|
128
142
|
detail = getFileNamesMessage(fileNamesOrResources) + '\n' + detail;
|
|
129
143
|
}
|
|
130
144
|
const { result } = await this.dialogService.prompt({
|
|
@@ -134,12 +148,24 @@ let AbstractFileDialogService = class AbstractFileDialogService {
|
|
|
134
148
|
buttons: [
|
|
135
149
|
{
|
|
136
150
|
label: fileNamesOrResources.length > 1 ?
|
|
137
|
-
nls.localizeWithPath(
|
|
138
|
-
|
|
151
|
+
( nls.localizeWithPath(
|
|
152
|
+
'vs/workbench/services/dialogs/browser/abstractFileDialogService',
|
|
153
|
+
{ key: 'saveAll', comment: ['&& denotes a mnemonic'] },
|
|
154
|
+
"&&Save All"
|
|
155
|
+
)) :
|
|
156
|
+
( nls.localizeWithPath(
|
|
157
|
+
'vs/workbench/services/dialogs/browser/abstractFileDialogService',
|
|
158
|
+
{ key: 'save', comment: ['&& denotes a mnemonic'] },
|
|
159
|
+
"&&Save"
|
|
160
|
+
)),
|
|
139
161
|
run: () => 0
|
|
140
162
|
},
|
|
141
163
|
{
|
|
142
|
-
label: nls.localizeWithPath(
|
|
164
|
+
label: ( nls.localizeWithPath(
|
|
165
|
+
'vs/workbench/services/dialogs/browser/abstractFileDialogService',
|
|
166
|
+
{ key: 'dontSave', comment: ['&& denotes a mnemonic'] },
|
|
167
|
+
"Do&&n't Save"
|
|
168
|
+
)),
|
|
143
169
|
run: () => 1
|
|
144
170
|
}
|
|
145
171
|
],
|
|
@@ -153,7 +179,11 @@ let AbstractFileDialogService = class AbstractFileDialogService {
|
|
|
153
179
|
return schema === Schemas.untitled ? [Schemas.file] : (schema !== Schemas.file ? [schema, Schemas.file] : [schema]);
|
|
154
180
|
}
|
|
155
181
|
async pickFileFolderAndOpenSimplified(schema, options, preferNewWindow) {
|
|
156
|
-
const title = nls.localizeWithPath(
|
|
182
|
+
const title = ( nls.localizeWithPath(
|
|
183
|
+
'vs/workbench/services/dialogs/browser/abstractFileDialogService',
|
|
184
|
+
'openFileOrFolder.title',
|
|
185
|
+
'Open File or Folder'
|
|
186
|
+
));
|
|
157
187
|
const availableFileSystems = this.addFileSchemaIfNeeded(schema);
|
|
158
188
|
const uri = await this.pickResource({ canSelectFiles: true, canSelectFolders: true, canSelectMany: false, defaultUri: options.defaultUri, title, availableFileSystems });
|
|
159
189
|
if (uri) {
|
|
@@ -171,7 +201,11 @@ let AbstractFileDialogService = class AbstractFileDialogService {
|
|
|
171
201
|
}
|
|
172
202
|
}
|
|
173
203
|
async pickFileAndOpenSimplified(schema, options, preferNewWindow) {
|
|
174
|
-
const title = nls.localizeWithPath(
|
|
204
|
+
const title = ( nls.localizeWithPath(
|
|
205
|
+
'vs/workbench/services/dialogs/browser/abstractFileDialogService',
|
|
206
|
+
'openFile.title',
|
|
207
|
+
'Open File'
|
|
208
|
+
));
|
|
175
209
|
const availableFileSystems = this.addFileSchemaIfNeeded(schema);
|
|
176
210
|
const uri = await this.pickResource({ canSelectFiles: true, canSelectFolders: false, canSelectMany: false, defaultUri: options.defaultUri, title, availableFileSystems });
|
|
177
211
|
if (uri) {
|
|
@@ -188,7 +222,11 @@ let AbstractFileDialogService = class AbstractFileDialogService {
|
|
|
188
222
|
this.workspacesService.addRecentlyOpened([{ fileUri: uri, label: this.labelService.getUriLabel(uri) }]);
|
|
189
223
|
}
|
|
190
224
|
async pickFolderAndOpenSimplified(schema, options) {
|
|
191
|
-
const title = nls.localizeWithPath(
|
|
225
|
+
const title = ( nls.localizeWithPath(
|
|
226
|
+
'vs/workbench/services/dialogs/browser/abstractFileDialogService',
|
|
227
|
+
'openFolder.title',
|
|
228
|
+
'Open Folder'
|
|
229
|
+
));
|
|
192
230
|
const availableFileSystems = this.addFileSchemaIfNeeded(schema, true);
|
|
193
231
|
const uri = await this.pickResource({ canSelectFiles: false, canSelectFolders: true, canSelectMany: false, defaultUri: options.defaultUri, title, availableFileSystems });
|
|
194
232
|
if (uri) {
|
|
@@ -196,8 +234,16 @@ let AbstractFileDialogService = class AbstractFileDialogService {
|
|
|
196
234
|
}
|
|
197
235
|
}
|
|
198
236
|
async pickWorkspaceAndOpenSimplified(schema, options) {
|
|
199
|
-
const title = nls.localizeWithPath(
|
|
200
|
-
|
|
237
|
+
const title = ( nls.localizeWithPath(
|
|
238
|
+
'vs/workbench/services/dialogs/browser/abstractFileDialogService',
|
|
239
|
+
'openWorkspace.title',
|
|
240
|
+
'Open Workspace from File'
|
|
241
|
+
));
|
|
242
|
+
const filters = [{ name: ( nls.localizeWithPath(
|
|
243
|
+
'vs/workbench/services/dialogs/browser/abstractFileDialogService',
|
|
244
|
+
'filterName.workspace',
|
|
245
|
+
'Workspace'
|
|
246
|
+
)), extensions: [WORKSPACE_EXTENSION] }];
|
|
201
247
|
const availableFileSystems = this.addFileSchemaIfNeeded(schema, true);
|
|
202
248
|
const uri = await this.pickResource({ canSelectFiles: true, canSelectFolders: false, canSelectMany: false, defaultUri: options.defaultUri, title, filters, availableFileSystems });
|
|
203
249
|
if (uri) {
|
|
@@ -208,7 +254,11 @@ let AbstractFileDialogService = class AbstractFileDialogService {
|
|
|
208
254
|
if (!options.availableFileSystems) {
|
|
209
255
|
options.availableFileSystems = this.addFileSchemaIfNeeded(schema);
|
|
210
256
|
}
|
|
211
|
-
options.title = nls.localizeWithPath(
|
|
257
|
+
options.title = ( nls.localizeWithPath(
|
|
258
|
+
'vs/workbench/services/dialogs/browser/abstractFileDialogService',
|
|
259
|
+
'saveFileAs.title',
|
|
260
|
+
'Save As'
|
|
261
|
+
));
|
|
212
262
|
const uri = await this.saveRemoteResource(options);
|
|
213
263
|
if (uri) {
|
|
214
264
|
this.addFileToRecentlyOpened(uri);
|
|
@@ -256,7 +306,11 @@ let AbstractFileDialogService = class AbstractFileDialogService {
|
|
|
256
306
|
getPickFileToSaveDialogOptions(defaultUri, availableFileSystems) {
|
|
257
307
|
const options = {
|
|
258
308
|
defaultUri,
|
|
259
|
-
title: nls.localizeWithPath(
|
|
309
|
+
title: ( nls.localizeWithPath(
|
|
310
|
+
'vs/workbench/services/dialogs/browser/abstractFileDialogService',
|
|
311
|
+
'saveAsTitle',
|
|
312
|
+
"Save As"
|
|
313
|
+
)),
|
|
260
314
|
availableFileSystems
|
|
261
315
|
};
|
|
262
316
|
const ext = defaultUri ? resources.extname(defaultUri) : undefined;
|
|
@@ -283,10 +337,18 @@ let AbstractFileDialogService = class AbstractFileDialogService {
|
|
|
283
337
|
matchingFilter = { name: trim(ext, '.').toUpperCase(), extensions: [trim(ext, '.')] };
|
|
284
338
|
}
|
|
285
339
|
options.filters = coalesce([
|
|
286
|
-
{ name: nls.localizeWithPath(
|
|
340
|
+
{ name: ( nls.localizeWithPath(
|
|
341
|
+
'vs/workbench/services/dialogs/browser/abstractFileDialogService',
|
|
342
|
+
'allFiles',
|
|
343
|
+
"All Files"
|
|
344
|
+
)), extensions: ['*'] },
|
|
287
345
|
matchingFilter,
|
|
288
346
|
...registeredLanguageFilters,
|
|
289
|
-
{ name: nls.localizeWithPath(
|
|
347
|
+
{ name: ( nls.localizeWithPath(
|
|
348
|
+
'vs/workbench/services/dialogs/browser/abstractFileDialogService',
|
|
349
|
+
'noExt',
|
|
350
|
+
"No Extension"
|
|
351
|
+
)), extensions: [''] }
|
|
290
352
|
]);
|
|
291
353
|
return options;
|
|
292
354
|
}
|
|
@@ -32,7 +32,11 @@ import { IFileDialogService } from 'vscode/vscode/vs/platform/dialogs/common/dia
|
|
|
32
32
|
var OpenLocalFileCommand;
|
|
33
33
|
( (function(OpenLocalFileCommand) {
|
|
34
34
|
OpenLocalFileCommand.ID = 'workbench.action.files.openLocalFile';
|
|
35
|
-
OpenLocalFileCommand.LABEL = nls.localizeWithPath(
|
|
35
|
+
OpenLocalFileCommand.LABEL = ( nls.localizeWithPath(
|
|
36
|
+
'vs/workbench/services/dialogs/browser/simpleFileDialog',
|
|
37
|
+
'openLocalFile',
|
|
38
|
+
"Open Local File..."
|
|
39
|
+
));
|
|
36
40
|
function handler() {
|
|
37
41
|
return accessor => {
|
|
38
42
|
const dialogService = accessor.get(IFileDialogService);
|
|
@@ -44,7 +48,11 @@ var OpenLocalFileCommand;
|
|
|
44
48
|
var SaveLocalFileCommand;
|
|
45
49
|
( (function(SaveLocalFileCommand) {
|
|
46
50
|
SaveLocalFileCommand.ID = 'workbench.action.files.saveLocalFile';
|
|
47
|
-
SaveLocalFileCommand.LABEL = nls.localizeWithPath(
|
|
51
|
+
SaveLocalFileCommand.LABEL = ( nls.localizeWithPath(
|
|
52
|
+
'vs/workbench/services/dialogs/browser/simpleFileDialog',
|
|
53
|
+
'saveLocalFile',
|
|
54
|
+
"Save Local File..."
|
|
55
|
+
));
|
|
48
56
|
function handler() {
|
|
49
57
|
return accessor => {
|
|
50
58
|
const editorService = accessor.get(IEditorService);
|
|
@@ -60,7 +68,11 @@ var SaveLocalFileCommand;
|
|
|
60
68
|
var OpenLocalFolderCommand;
|
|
61
69
|
( (function(OpenLocalFolderCommand) {
|
|
62
70
|
OpenLocalFolderCommand.ID = 'workbench.action.files.openLocalFolder';
|
|
63
|
-
OpenLocalFolderCommand.LABEL = nls.localizeWithPath(
|
|
71
|
+
OpenLocalFolderCommand.LABEL = ( nls.localizeWithPath(
|
|
72
|
+
'vs/workbench/services/dialogs/browser/simpleFileDialog',
|
|
73
|
+
'openLocalFolder',
|
|
74
|
+
"Open Local Folder..."
|
|
75
|
+
));
|
|
64
76
|
function handler() {
|
|
65
77
|
return accessor => {
|
|
66
78
|
const dialogService = accessor.get(IFileDialogService);
|
|
@@ -72,7 +84,11 @@ var OpenLocalFolderCommand;
|
|
|
72
84
|
var OpenLocalFileFolderCommand;
|
|
73
85
|
( (function(OpenLocalFileFolderCommand) {
|
|
74
86
|
OpenLocalFileFolderCommand.ID = 'workbench.action.files.openLocalFileFolder';
|
|
75
|
-
OpenLocalFileFolderCommand.LABEL = nls.localizeWithPath(
|
|
87
|
+
OpenLocalFileFolderCommand.LABEL = ( nls.localizeWithPath(
|
|
88
|
+
'vs/workbench/services/dialogs/browser/simpleFileDialog',
|
|
89
|
+
'openLocalFileFolder',
|
|
90
|
+
"Open Local..."
|
|
91
|
+
));
|
|
76
92
|
function handler() {
|
|
77
93
|
return accessor => {
|
|
78
94
|
const dialogService = accessor.get(IFileDialogService);
|
|
@@ -173,7 +189,12 @@ let SimpleFileDialog = class SimpleFileDialog {
|
|
|
173
189
|
}
|
|
174
190
|
}
|
|
175
191
|
if ((this.scheme !== Schemas.file) && !this.fileService.hasProvider(defaultUri)) {
|
|
176
|
-
this.notificationService.info(nls.localizeWithPath(
|
|
192
|
+
this.notificationService.info(( nls.localizeWithPath(
|
|
193
|
+
'vs/workbench/services/dialogs/browser/simpleFileDialog',
|
|
194
|
+
'remoteFileDialog.notConnectedToRemote',
|
|
195
|
+
'File system provider for {0} is not available.',
|
|
196
|
+
( defaultUri.toString())
|
|
197
|
+
)));
|
|
177
198
|
return undefined;
|
|
178
199
|
}
|
|
179
200
|
const newOptions = objects.deepClone(options);
|
|
@@ -244,7 +265,11 @@ let SimpleFileDialog = class SimpleFileDialog {
|
|
|
244
265
|
this.filePickBox.ok = true;
|
|
245
266
|
if ((this.scheme !== Schemas.file) && this.options && this.options.availableFileSystems && (this.options.availableFileSystems.length > 1) && (this.options.availableFileSystems.indexOf(Schemas.file) > -1)) {
|
|
246
267
|
this.filePickBox.customButton = true;
|
|
247
|
-
this.filePickBox.customLabel = nls.localizeWithPath(
|
|
268
|
+
this.filePickBox.customLabel = ( nls.localizeWithPath(
|
|
269
|
+
'vs/workbench/services/dialogs/browser/simpleFileDialog',
|
|
270
|
+
'remoteFileDialog.local',
|
|
271
|
+
'Show Local'
|
|
272
|
+
));
|
|
248
273
|
let action;
|
|
249
274
|
if (isSave) {
|
|
250
275
|
action = SaveLocalFileCommand;
|
|
@@ -533,7 +558,11 @@ let SimpleFileDialog = class SimpleFileDialog {
|
|
|
533
558
|
return (await this.updateItems(valueUri)) ? UpdateResult.UpdatedWithTrailing : UpdateResult.Updated;
|
|
534
559
|
}
|
|
535
560
|
else if (this.endsWithSlash(value)) {
|
|
536
|
-
this.filePickBox.validationMessage = nls.localizeWithPath(
|
|
561
|
+
this.filePickBox.validationMessage = ( nls.localizeWithPath(
|
|
562
|
+
'vs/workbench/services/dialogs/browser/simpleFileDialog',
|
|
563
|
+
'remoteFileDialog.badPath',
|
|
564
|
+
'The path does not exist.'
|
|
565
|
+
));
|
|
537
566
|
this.badPath = value;
|
|
538
567
|
return UpdateResult.InvalidPath;
|
|
539
568
|
}
|
|
@@ -689,7 +718,11 @@ let SimpleFileDialog = class SimpleFileDialog {
|
|
|
689
718
|
prompt.ignoreFocusOut = true;
|
|
690
719
|
prompt.ok = true;
|
|
691
720
|
prompt.customButton = true;
|
|
692
|
-
prompt.customLabel = nls.localizeWithPath(
|
|
721
|
+
prompt.customLabel = ( nls.localizeWithPath(
|
|
722
|
+
'vs/workbench/services/dialogs/browser/simpleFileDialog',
|
|
723
|
+
'remoteFileDialog.cancel',
|
|
724
|
+
'Cancel'
|
|
725
|
+
));
|
|
693
726
|
prompt.value = this.pathFromUri(uri);
|
|
694
727
|
let isResolving = false;
|
|
695
728
|
return ( new Promise(resolve => {
|
|
@@ -718,7 +751,11 @@ let SimpleFileDialog = class SimpleFileDialog {
|
|
|
718
751
|
}
|
|
719
752
|
async validate(uri) {
|
|
720
753
|
if (uri === undefined) {
|
|
721
|
-
this.filePickBox.validationMessage = nls.localizeWithPath(
|
|
754
|
+
this.filePickBox.validationMessage = ( nls.localizeWithPath(
|
|
755
|
+
'vs/workbench/services/dialogs/browser/simpleFileDialog',
|
|
756
|
+
'remoteFileDialog.invalidPath',
|
|
757
|
+
'Please enter a valid path.'
|
|
758
|
+
));
|
|
722
759
|
return Promise.resolve(false);
|
|
723
760
|
}
|
|
724
761
|
let stat;
|
|
@@ -731,45 +768,87 @@ let SimpleFileDialog = class SimpleFileDialog {
|
|
|
731
768
|
}
|
|
732
769
|
if (this.requiresTrailing) {
|
|
733
770
|
if (stat && stat.isDirectory) {
|
|
734
|
-
this.filePickBox.validationMessage = nls.localizeWithPath(
|
|
771
|
+
this.filePickBox.validationMessage = ( nls.localizeWithPath(
|
|
772
|
+
'vs/workbench/services/dialogs/browser/simpleFileDialog',
|
|
773
|
+
'remoteFileDialog.validateFolder',
|
|
774
|
+
'The folder already exists. Please use a new file name.'
|
|
775
|
+
));
|
|
735
776
|
return Promise.resolve(false);
|
|
736
777
|
}
|
|
737
778
|
else if (stat) {
|
|
738
|
-
const message = nls.localizeWithPath(
|
|
779
|
+
const message = ( nls.localizeWithPath(
|
|
780
|
+
'vs/workbench/services/dialogs/browser/simpleFileDialog',
|
|
781
|
+
'remoteFileDialog.validateExisting',
|
|
782
|
+
'{0} already exists. Are you sure you want to overwrite it?',
|
|
783
|
+
resources.basename(uri)
|
|
784
|
+
));
|
|
739
785
|
return this.yesNoPrompt(uri, message);
|
|
740
786
|
}
|
|
741
787
|
else if (!(isValidBasename(resources.basename(uri), this.isWindows))) {
|
|
742
|
-
this.filePickBox.validationMessage = nls.localizeWithPath(
|
|
788
|
+
this.filePickBox.validationMessage = ( nls.localizeWithPath(
|
|
789
|
+
'vs/workbench/services/dialogs/browser/simpleFileDialog',
|
|
790
|
+
'remoteFileDialog.validateBadFilename',
|
|
791
|
+
'Please enter a valid file name.'
|
|
792
|
+
));
|
|
743
793
|
return Promise.resolve(false);
|
|
744
794
|
}
|
|
745
795
|
else if (!statDirname) {
|
|
746
|
-
const message = nls.localizeWithPath(
|
|
796
|
+
const message = ( nls.localizeWithPath(
|
|
797
|
+
'vs/workbench/services/dialogs/browser/simpleFileDialog',
|
|
798
|
+
'remoteFileDialog.validateCreateDirectory',
|
|
799
|
+
'The folder {0} does not exist. Would you like to create it?',
|
|
800
|
+
resources.basename(resources.dirname(uri))
|
|
801
|
+
));
|
|
747
802
|
return this.yesNoPrompt(uri, message);
|
|
748
803
|
}
|
|
749
804
|
else if (!statDirname.isDirectory) {
|
|
750
|
-
this.filePickBox.validationMessage = nls.localizeWithPath(
|
|
805
|
+
this.filePickBox.validationMessage = ( nls.localizeWithPath(
|
|
806
|
+
'vs/workbench/services/dialogs/browser/simpleFileDialog',
|
|
807
|
+
'remoteFileDialog.validateNonexistentDir',
|
|
808
|
+
'Please enter a path that exists.'
|
|
809
|
+
));
|
|
751
810
|
return Promise.resolve(false);
|
|
752
811
|
}
|
|
753
812
|
else if (statDirname.readonly || statDirname.locked) {
|
|
754
|
-
this.filePickBox.validationMessage = nls.localizeWithPath(
|
|
813
|
+
this.filePickBox.validationMessage = ( nls.localizeWithPath(
|
|
814
|
+
'vs/workbench/services/dialogs/browser/simpleFileDialog',
|
|
815
|
+
'remoteFileDialog.validateReadonlyFolder',
|
|
816
|
+
'This folder cannot be used as a save destination. Please choose another folder'
|
|
817
|
+
));
|
|
755
818
|
return Promise.resolve(false);
|
|
756
819
|
}
|
|
757
820
|
}
|
|
758
821
|
else {
|
|
759
822
|
if (!stat) {
|
|
760
|
-
this.filePickBox.validationMessage = nls.localizeWithPath(
|
|
823
|
+
this.filePickBox.validationMessage = ( nls.localizeWithPath(
|
|
824
|
+
'vs/workbench/services/dialogs/browser/simpleFileDialog',
|
|
825
|
+
'remoteFileDialog.validateNonexistentDir',
|
|
826
|
+
'Please enter a path that exists.'
|
|
827
|
+
));
|
|
761
828
|
return Promise.resolve(false);
|
|
762
829
|
}
|
|
763
830
|
else if (uri.path === '/' && this.isWindows) {
|
|
764
|
-
this.filePickBox.validationMessage = nls.localizeWithPath(
|
|
831
|
+
this.filePickBox.validationMessage = ( nls.localizeWithPath(
|
|
832
|
+
'vs/workbench/services/dialogs/browser/simpleFileDialog',
|
|
833
|
+
'remoteFileDialog.windowsDriveLetter',
|
|
834
|
+
'Please start the path with a drive letter.'
|
|
835
|
+
));
|
|
765
836
|
return Promise.resolve(false);
|
|
766
837
|
}
|
|
767
838
|
else if (stat.isDirectory && !this.allowFolderSelection) {
|
|
768
|
-
this.filePickBox.validationMessage = nls.localizeWithPath(
|
|
839
|
+
this.filePickBox.validationMessage = ( nls.localizeWithPath(
|
|
840
|
+
'vs/workbench/services/dialogs/browser/simpleFileDialog',
|
|
841
|
+
'remoteFileDialog.validateFileOnly',
|
|
842
|
+
'Please select a file.'
|
|
843
|
+
));
|
|
769
844
|
return Promise.resolve(false);
|
|
770
845
|
}
|
|
771
846
|
else if (!stat.isDirectory && !this.allowFileSelection) {
|
|
772
|
-
this.filePickBox.validationMessage = nls.localizeWithPath(
|
|
847
|
+
this.filePickBox.validationMessage = ( nls.localizeWithPath(
|
|
848
|
+
'vs/workbench/services/dialogs/browser/simpleFileDialog',
|
|
849
|
+
'remoteFileDialog.validateFolderOnly',
|
|
850
|
+
'Please select a folder.'
|
|
851
|
+
));
|
|
773
852
|
return Promise.resolve(false);
|
|
774
853
|
}
|
|
775
854
|
}
|