@theia/filesystem 1.18.0-next.de7b81be → 1.20.0
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/LICENSE +642 -0
- package/lib/browser/download/file-download-command-contribution.d.ts.map +1 -1
- package/lib/browser/download/file-download-command-contribution.js +8 -6
- package/lib/browser/download/file-download-command-contribution.js.map +1 -1
- package/lib/browser/file-dialog/file-dialog-service.d.ts.map +1 -1
- package/lib/browser/file-dialog/file-dialog-service.js +2 -1
- package/lib/browser/file-dialog/file-dialog-service.js.map +1 -1
- package/lib/browser/file-dialog/file-dialog.d.ts +1 -2
- package/lib/browser/file-dialog/file-dialog.d.ts.map +1 -1
- package/lib/browser/file-dialog/file-dialog.js +12 -13
- package/lib/browser/file-dialog/file-dialog.js.map +1 -1
- package/lib/browser/file-service.d.ts +9 -9
- package/lib/browser/file-service.d.ts.map +1 -1
- package/lib/browser/file-service.js +6 -4
- package/lib/browser/file-service.js.map +1 -1
- package/lib/browser/file-upload-service.d.ts +3 -0
- package/lib/browser/file-upload-service.d.ts.map +1 -1
- package/lib/browser/file-upload-service.js +22 -3
- package/lib/browser/file-upload-service.js.map +1 -1
- package/lib/browser/filesystem-frontend-contribution.d.ts +10 -2
- package/lib/browser/filesystem-frontend-contribution.d.ts.map +1 -1
- package/lib/browser/filesystem-frontend-contribution.js +8 -3
- package/lib/browser/filesystem-frontend-contribution.js.map +1 -1
- package/lib/browser/filesystem-preferences.d.ts.map +1 -1
- package/lib/browser/filesystem-preferences.js +12 -10
- package/lib/browser/filesystem-preferences.js.map +1 -1
- package/lib/browser/location/location-renderer.d.ts.map +1 -1
- package/lib/browser/location/location-renderer.js +5 -6
- package/lib/browser/location/location-renderer.js.map +1 -1
- package/lib/electron-browser/file-dialog/electron-file-dialog-service.d.ts.map +1 -1
- package/lib/electron-browser/file-dialog/electron-file-dialog-service.js +11 -4
- package/lib/electron-browser/file-dialog/electron-file-dialog-service.js.map +1 -1
- package/lib/node/node-file-upload-service.js +1 -1
- package/lib/node/node-file-upload-service.js.map +1 -1
- package/package.json +9 -7
- package/src/browser/download/file-download-command-contribution.ts +7 -6
- package/src/browser/file-dialog/file-dialog-service.ts +2 -1
- package/src/browser/file-dialog/file-dialog.ts +5 -6
- package/src/browser/file-service.ts +4 -2
- package/src/browser/file-upload-service.ts +22 -3
- package/src/browser/filesystem-frontend-contribution.ts +11 -5
- package/src/browser/filesystem-preferences.ts +21 -10
- package/src/browser/location/location-renderer.tsx +1 -2
- package/src/browser/style/file-dialog.css +14 -22
- package/src/browser/style/file-icons.css +5 -3
- package/src/electron-browser/file-dialog/electron-file-dialog-service.ts +11 -6
- package/src/node/node-file-upload-service.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"electron-file-dialog-service.js","sourceRoot":"","sources":["../../../src/electron-browser/file-dialog/electron-file-dialog-service.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;AAElF,4DAAkE;AAClE,0DAAuG;AAEvG,kDAAkD;AAElD,4EAAwE;AAExE,wDAAqD;AACrD,2DAA+G;AAO/G,EAAE;AACF,6FAA6F;AAC7F,gGAAgG;AAChG,8FAA8F;AAC9F,YAAY;AACZ,EAAE;AACF,4DAAwD;AAGxD,IAAa,yBAAyB,GAAtC,MAAa,yBAA0B,SAAQ,sCAAwB;IAMnE,KAAK,CAAC,cAAc,CAAC,KAA0B,EAAE,MAAiB;QAC9D,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QAChD,IAAI,QAAQ,EAAE;YACV,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,iBAAM,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;YACxG,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE;gBACxB,OAAO,SAAS,CAAC;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,IAAqB;QAC9C,KAAK,MAAM,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE;YACnD,IAAI,CAAC,CAAC,MAAM,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,GAAG,EAAE,uBAAU,CAAC,SAAS,CAAC,IAAI,GAAG,uBAAU,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,EAAE;gBAC9F,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,6BAA6B,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC;gBACpE,OAAO,KAAK,CAAC;aAChB;SACJ;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;IAES,KAAK,CAAC,OAAO,CAAC,IAAqB;QACzC,MAAM,
|
|
1
|
+
{"version":3,"file":"electron-file-dialog-service.js","sourceRoot":"","sources":["../../../src/electron-browser/file-dialog/electron-file-dialog-service.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;AAElF,4DAAkE;AAClE,0DAAuG;AAEvG,kDAAkD;AAElD,4EAAwE;AAExE,wDAAqD;AACrD,2DAA+G;AAO/G,EAAE;AACF,6FAA6F;AAC7F,gGAAgG;AAChG,8FAA8F;AAC9F,YAAY;AACZ,EAAE;AACF,uDAAuD;AACvD,4DAAwD;AAGxD,IAAa,yBAAyB,GAAtC,MAAa,yBAA0B,SAAQ,sCAAwB;IAMnE,KAAK,CAAC,cAAc,CAAC,KAA0B,EAAE,MAAiB;QAC9D,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QAChD,IAAI,QAAQ,EAAE;YACV,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,iBAAM,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;YACx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,CAAC,UAAU,CAAC,CAAC;iBAC/B;gBACD,IAAI,KAAK,CAAC,gBAAgB,KAAK,IAAI,EAAE;oBACjC,UAAU,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;oBACjC,UAAU,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;iBACtC;aACJ;YACD,IAAI,KAAK,CAAC,aAAa,KAAK,IAAI,EAAE;gBAC9B,UAAU,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;aACtC;YACD,OAAO,UAAU,CAAC;QACtB,CAAC;QA7Be,yBAAkB,qBA6BjC,CAAA;IACL,CAAC,EAxCgB,MAAM,GAAN,eAAM,KAAN,eAAM,QAwCtB;AACL,CAAC,EAjEgB,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAiExB"}
|
|
@@ -61,7 +61,7 @@ let NodeFileUploadService = class NodeFileUploadService {
|
|
|
61
61
|
}
|
|
62
62
|
try {
|
|
63
63
|
const target = node_1.FileUri.fsPath(fields.uri);
|
|
64
|
-
await fs.move(request.file.path, target);
|
|
64
|
+
await fs.move(request.file.path, target, { overwrite: true });
|
|
65
65
|
response.status(200).send(target); // ok
|
|
66
66
|
}
|
|
67
67
|
catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-file-upload-service.js","sourceRoot":"","sources":["../../src/node/node-file-upload-service.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;AAElF,iCAAkC;AAClC,6BAA8B;AAC9B,yBAA0B;AAE1B,kDAAmD;AACnD,+CAA+E;AAC/E,4DAA0D;AAC1D,uDAA8D;AAG9D,IAAa,qBAAqB,GAAlC,MAAa,qBAAqB;IAE9B,KAAK,CAAC,SAAS,CAAC,GAAwB;QACpC,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;YACxC,IAAI,CAAC,sBAAsB,EAAE;YAC7B,IAAI,CAAC,qBAAqB,EAAE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AAI;YACA,MAAM,MAAM,GAAG,cAAO,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YAC1C,MAAM,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;YAC9D,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK;SAC3C;QAAC,OAAO,KAAK,EAAE;YACZ,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YACrB,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,wBAAwB;SACrD;IACL,CAAC;CACJ,CAAA;AA9CY,qBAAqB;IADjC,sBAAU,EAAE;GACA,qBAAqB,CA8CjC;AA9CY,sDAAqB"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/filesystem",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.20.0",
|
|
4
4
|
"description": "Theia - FileSystem Extension",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@theia/core": "1.
|
|
6
|
+
"@theia/core": "1.20.0",
|
|
7
7
|
"@types/body-parser": "^1.17.0",
|
|
8
8
|
"@types/multer": "^1.4.7",
|
|
9
9
|
"@types/rimraf": "^2.0.2",
|
|
@@ -55,17 +55,19 @@
|
|
|
55
55
|
"src"
|
|
56
56
|
],
|
|
57
57
|
"scripts": {
|
|
58
|
-
"lint": "theiaext lint",
|
|
59
58
|
"build": "theiaext build",
|
|
60
|
-
"watch": "theiaext watch",
|
|
61
59
|
"clean": "theiaext clean",
|
|
60
|
+
"compile": "theiaext compile",
|
|
61
|
+
"lint": "theiaext lint",
|
|
62
62
|
"test": "theiaext test",
|
|
63
|
-
"test:watch": "theiaext test:watch"
|
|
63
|
+
"test:watch": "theiaext test:watch",
|
|
64
|
+
"watch": "theiaext watch"
|
|
64
65
|
},
|
|
65
66
|
"devDependencies": {
|
|
66
|
-
"@theia/ext-scripts": "1.
|
|
67
|
+
"@theia/ext-scripts": "1.20.0"
|
|
67
68
|
},
|
|
68
69
|
"nyc": {
|
|
69
70
|
"extends": "../../configs/nyc.json"
|
|
70
|
-
}
|
|
71
|
+
},
|
|
72
|
+
"gitHead": "774a2724c51d4ae026c6d2499bff3a02e3d50ba9"
|
|
71
73
|
}
|
|
@@ -22,6 +22,7 @@ import { SelectionService } from '@theia/core/lib/common/selection-service';
|
|
|
22
22
|
import { Command, CommandContribution, CommandRegistry } from '@theia/core/lib/common/command';
|
|
23
23
|
import { UriAwareCommandHandler } from '@theia/core/lib/common/uri-command-handler';
|
|
24
24
|
import { FileDownloadService } from './file-download-service';
|
|
25
|
+
import { CommonCommands } from '@theia/core/lib/browser';
|
|
25
26
|
|
|
26
27
|
@injectable()
|
|
27
28
|
export class FileDownloadCommandContribution implements CommandContribution {
|
|
@@ -67,16 +68,16 @@ export class FileDownloadCommandContribution implements CommandContribution {
|
|
|
67
68
|
|
|
68
69
|
export namespace FileDownloadCommands {
|
|
69
70
|
|
|
70
|
-
export const DOWNLOAD
|
|
71
|
+
export const DOWNLOAD = Command.toDefaultLocalizedCommand({
|
|
71
72
|
id: 'file.download',
|
|
72
|
-
category:
|
|
73
|
+
category: CommonCommands.FILE_CATEGORY,
|
|
73
74
|
label: 'Download'
|
|
74
|
-
};
|
|
75
|
+
});
|
|
75
76
|
|
|
76
|
-
export const COPY_DOWNLOAD_LINK
|
|
77
|
+
export const COPY_DOWNLOAD_LINK = Command.toLocalizedCommand({
|
|
77
78
|
id: 'file.copyDownloadLink',
|
|
78
|
-
category:
|
|
79
|
+
category: CommonCommands.FILE_CATEGORY,
|
|
79
80
|
label: 'Copy Download Link'
|
|
80
|
-
};
|
|
81
|
+
}, 'theia/filesystem/copyDownloadLink', CommonCommands.FILE_CATEGORY_KEY);
|
|
81
82
|
|
|
82
83
|
}
|
|
@@ -79,7 +79,8 @@ export class DefaultFileDialogService implements FileDialogService {
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
protected async getRootNode(folderToOpen?: FileStat): Promise<DirNode | undefined> {
|
|
82
|
-
const
|
|
82
|
+
const folderExists = folderToOpen && await this.fileService.exists(folderToOpen.resource);
|
|
83
|
+
const folder = folderToOpen && folderExists ? folderToOpen : {
|
|
83
84
|
resource: new URI(await this.environments.getHomeDirUri()),
|
|
84
85
|
isDirectory: true
|
|
85
86
|
};
|
|
@@ -17,8 +17,7 @@
|
|
|
17
17
|
import { injectable, inject, postConstruct } from '@theia/core/shared/inversify';
|
|
18
18
|
import { Message } from '@theia/core/shared/@phosphor/messaging';
|
|
19
19
|
import { Disposable, MaybeArray } from '@theia/core/lib/common';
|
|
20
|
-
import { codiconArray, Key, LabelProvider } from '@theia/core/lib/browser';
|
|
21
|
-
import { AbstractDialog, DialogProps, setEnabled, createIconButton, Widget } from '@theia/core/lib/browser';
|
|
20
|
+
import { AbstractDialog, DialogProps, setEnabled, createIconButton, Widget, codiconArray, Key, LabelProvider } from '@theia/core/lib/browser';
|
|
22
21
|
import { FileStatNode } from '../file-tree';
|
|
23
22
|
import { LocationListRenderer, LocationListRendererFactory } from '../location';
|
|
24
23
|
import { FileDialogModel } from './file-dialog-model';
|
|
@@ -146,16 +145,16 @@ export abstract class FileDialog<T> extends AbstractDialog<T> {
|
|
|
146
145
|
navigationPanel.classList.add(NAVIGATION_PANEL_CLASS);
|
|
147
146
|
this.contentNode.appendChild(navigationPanel);
|
|
148
147
|
|
|
149
|
-
navigationPanel.appendChild(this.back = createIconButton(...codiconArray('chevron-left')));
|
|
148
|
+
navigationPanel.appendChild(this.back = createIconButton(...codiconArray('chevron-left', true)));
|
|
150
149
|
this.back.classList.add(NAVIGATION_BACK_CLASS);
|
|
151
150
|
this.back.title = 'Navigate Back';
|
|
152
|
-
navigationPanel.appendChild(this.forward = createIconButton(...codiconArray('chevron-right')));
|
|
151
|
+
navigationPanel.appendChild(this.forward = createIconButton(...codiconArray('chevron-right', true)));
|
|
153
152
|
this.forward.classList.add(NAVIGATION_FORWARD_CLASS);
|
|
154
153
|
this.forward.title = 'Navigate Forward';
|
|
155
|
-
navigationPanel.appendChild(this.home = createIconButton(...codiconArray('home')));
|
|
154
|
+
navigationPanel.appendChild(this.home = createIconButton(...codiconArray('home', true)));
|
|
156
155
|
this.home.classList.add(NAVIGATION_HOME_CLASS);
|
|
157
156
|
this.home.title = 'Go To Initial Location';
|
|
158
|
-
navigationPanel.appendChild(this.up = createIconButton(...codiconArray('arrow-up')));
|
|
157
|
+
navigationPanel.appendChild(this.up = createIconButton(...codiconArray('arrow-up', true)));
|
|
159
158
|
this.up.classList.add(NAVIGATION_UP_CLASS);
|
|
160
159
|
this.up.title = 'Navigate Up One Directory';
|
|
161
160
|
|
|
@@ -34,7 +34,7 @@ import URI from '@theia/core/lib/common/uri';
|
|
|
34
34
|
import { timeout, Deferred } from '@theia/core/lib/common/promise-util';
|
|
35
35
|
import { CancellationToken, CancellationTokenSource } from '@theia/core/lib/common/cancellation';
|
|
36
36
|
import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable';
|
|
37
|
-
import { WaitUntilEvent, Emitter, AsyncEmitter } from '@theia/core/lib/common/event';
|
|
37
|
+
import { WaitUntilEvent, Emitter, AsyncEmitter, Event } from '@theia/core/lib/common/event';
|
|
38
38
|
import { ContributionProvider } from '@theia/core/lib/common/contribution-provider';
|
|
39
39
|
import { TernarySearchTree } from '@theia/core/lib/common/ternary-search-tree';
|
|
40
40
|
import {
|
|
@@ -1371,7 +1371,9 @@ export class FileService {
|
|
|
1371
1371
|
/**
|
|
1372
1372
|
* An event that is emitted when files are changed on the disk.
|
|
1373
1373
|
*/
|
|
1374
|
-
|
|
1374
|
+
get onDidFilesChange(): Event<FileChangesEvent> {
|
|
1375
|
+
return this.onDidFilesChangeEmitter.event;
|
|
1376
|
+
}
|
|
1375
1377
|
|
|
1376
1378
|
private activeWatchers = new Map<string, { disposable: Disposable, count: number }>();
|
|
1377
1379
|
|
|
@@ -27,6 +27,9 @@ import throttle = require('@theia/core/shared/lodash.throttle');
|
|
|
27
27
|
import { HTTP_FILE_UPLOAD_PATH } from '../common/file-upload';
|
|
28
28
|
import { Semaphore } from 'async-mutex';
|
|
29
29
|
import { FileSystemPreferences } from './filesystem-preferences';
|
|
30
|
+
import { FileService } from './file-service';
|
|
31
|
+
import { ConfirmDialog, Dialog } from '@theia/core/lib/browser';
|
|
32
|
+
import { nls } from '@theia/core/lib/common/nls';
|
|
30
33
|
|
|
31
34
|
export const HTTP_UPLOAD_URL: string = new Endpoint({ path: HTTP_FILE_UPLOAD_PATH }).getRestUrl().toString(true);
|
|
32
35
|
|
|
@@ -58,6 +61,9 @@ export class FileUploadService {
|
|
|
58
61
|
@inject(FileSystemPreferences)
|
|
59
62
|
protected fileSystemPreferences: FileSystemPreferences;
|
|
60
63
|
|
|
64
|
+
@inject(FileService)
|
|
65
|
+
protected fileService: FileService;
|
|
66
|
+
|
|
61
67
|
get maxConcurrentUploads(): number {
|
|
62
68
|
const maxConcurrentUploads = this.fileSystemPreferences['files.maxConcurrentUploads'];
|
|
63
69
|
return maxConcurrentUploads > 0 ? maxConcurrentUploads : Infinity;
|
|
@@ -157,7 +163,7 @@ export class FileUploadService {
|
|
|
157
163
|
}
|
|
158
164
|
}
|
|
159
165
|
params.progress.report({
|
|
160
|
-
message:
|
|
166
|
+
message: nls.localize('theia/filesystem/processedOutOf', 'Processed {0} out of {1}', done, total),
|
|
161
167
|
work: { total, done }
|
|
162
168
|
});
|
|
163
169
|
} else {
|
|
@@ -170,7 +176,7 @@ export class FileUploadService {
|
|
|
170
176
|
done += item.done;
|
|
171
177
|
}
|
|
172
178
|
params.progress.report({
|
|
173
|
-
message:
|
|
179
|
+
message: nls.localize('theia/filesystem/uploadedOutOf', 'Uploaded {0} out of {1}', result.uploaded.length, status.size),
|
|
174
180
|
work: { total, done }
|
|
175
181
|
});
|
|
176
182
|
}
|
|
@@ -182,6 +188,9 @@ export class FileUploadService {
|
|
|
182
188
|
token: params.token,
|
|
183
189
|
progress: params.progress,
|
|
184
190
|
accept: async item => {
|
|
191
|
+
if (await this.fileService.exists(item.uri) && !await this.confirmOverwrite(item.uri)) {
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
185
194
|
// Track and initialize the file in the status map:
|
|
186
195
|
status.set(item.file, { total: item.file.size, done: 0 });
|
|
187
196
|
report();
|
|
@@ -234,6 +243,16 @@ export class FileUploadService {
|
|
|
234
243
|
return result;
|
|
235
244
|
}
|
|
236
245
|
|
|
246
|
+
protected async confirmOverwrite(fileUri: URI): Promise<boolean> {
|
|
247
|
+
const dialog = new ConfirmDialog({
|
|
248
|
+
title: nls.localizeByDefault('Replace file'),
|
|
249
|
+
msg: nls.localizeByDefault('File "{0}" already exists in the destination folder. Do you want to replace it?', fileUri.path.base),
|
|
250
|
+
ok: nls.localizeByDefault('Replace file'),
|
|
251
|
+
cancel: Dialog.CANCEL
|
|
252
|
+
});
|
|
253
|
+
return !!await dialog.open();
|
|
254
|
+
}
|
|
255
|
+
|
|
237
256
|
protected uploadFile(
|
|
238
257
|
file: File,
|
|
239
258
|
targetUri: URI,
|
|
@@ -342,7 +361,7 @@ export class FileUploadService {
|
|
|
342
361
|
|
|
343
362
|
protected async withProgress<T>(
|
|
344
363
|
cb: (progress: Progress, token: CancellationToken) => Promise<T>,
|
|
345
|
-
{ text }: FileUploadProgressParams = { text: 'Uploading Files' }
|
|
364
|
+
{ text }: FileUploadProgressParams = { text: nls.localize('theia/filesystem/uploadFiles', 'Uploading Files') }
|
|
346
365
|
): Promise<T> {
|
|
347
366
|
const cancellationSource = new CancellationTokenSource();
|
|
348
367
|
const { token } = cancellationSource;
|
|
@@ -17,13 +17,14 @@
|
|
|
17
17
|
import { injectable, inject } from '@theia/core/shared/inversify';
|
|
18
18
|
import URI from '@theia/core/lib/common/uri';
|
|
19
19
|
import { environment } from '@theia/core/shared/@theia/application-package/lib/environment';
|
|
20
|
-
import { MaybePromise, SelectionService, isCancelled } from '@theia/core/lib/common';
|
|
20
|
+
import { MaybePromise, SelectionService, isCancelled, Emitter } from '@theia/core/lib/common';
|
|
21
21
|
import { Command, CommandContribution, CommandRegistry } from '@theia/core/lib/common/command';
|
|
22
22
|
import {
|
|
23
23
|
FrontendApplicationContribution, ApplicationShell,
|
|
24
24
|
NavigatableWidget, NavigatableWidgetOptions,
|
|
25
25
|
Saveable, WidgetManager, StatefulWidget, FrontendApplication, ExpandableTreeNode, waitForClosed,
|
|
26
|
-
CorePreferences
|
|
26
|
+
CorePreferences,
|
|
27
|
+
CommonCommands
|
|
27
28
|
} from '@theia/core/lib/browser';
|
|
28
29
|
import { MimeService } from '@theia/core/lib/browser/mime-service';
|
|
29
30
|
import { TreeWidgetSelection } from '@theia/core/lib/browser/tree/tree-widget-selection';
|
|
@@ -36,11 +37,11 @@ import { Deferred } from '@theia/core/lib/common/promise-util';
|
|
|
36
37
|
|
|
37
38
|
export namespace FileSystemCommands {
|
|
38
39
|
|
|
39
|
-
export const UPLOAD
|
|
40
|
+
export const UPLOAD = Command.toLocalizedCommand({
|
|
40
41
|
id: 'file.upload',
|
|
41
|
-
category:
|
|
42
|
+
category: CommonCommands.FILE_CATEGORY,
|
|
42
43
|
label: 'Upload Files...'
|
|
43
|
-
};
|
|
44
|
+
}, 'theia/filesystem/uploadFiles', CommonCommands.FILE_CATEGORY_KEY);
|
|
44
45
|
|
|
45
46
|
}
|
|
46
47
|
|
|
@@ -76,6 +77,9 @@ export class FileSystemFrontendContribution implements FrontendApplicationContri
|
|
|
76
77
|
@inject(FileService)
|
|
77
78
|
protected readonly fileService: FileService;
|
|
78
79
|
|
|
80
|
+
protected onDidChangeEditorFileEmitter = new Emitter<{ editor: NavigatableWidget, type: FileChangeType }>();
|
|
81
|
+
readonly onDidChangeEditorFile = this.onDidChangeEditorFileEmitter.event;
|
|
82
|
+
|
|
79
83
|
protected readonly userOperations = new Map<number, Deferred<void>>();
|
|
80
84
|
protected queueUserOperation(event: UserFileOperationEvent): void {
|
|
81
85
|
const moveOperation = new Deferred<void>();
|
|
@@ -300,6 +304,7 @@ export class FileSystemFrontendContribution implements FrontendApplicationContri
|
|
|
300
304
|
}
|
|
301
305
|
if (!deleted) {
|
|
302
306
|
widget.title.label += this.deletedSuffix;
|
|
307
|
+
this.onDidChangeEditorFileEmitter.fire({ editor: widget, type: FileChangeType.DELETED });
|
|
303
308
|
}
|
|
304
309
|
const widgets = toClose.get(uriString) || [];
|
|
305
310
|
widgets.push(widget);
|
|
@@ -307,6 +312,7 @@ export class FileSystemFrontendContribution implements FrontendApplicationContri
|
|
|
307
312
|
} else if (event.contains(uri, FileChangeType.ADDED)) {
|
|
308
313
|
if (deleted) {
|
|
309
314
|
widget.title.label = widget.title.label.substr(0, label.length - this.deletedSuffix.length);
|
|
315
|
+
this.onDidChangeEditorFileEmitter.fire({ editor: widget, type: FileChangeType.ADDED });
|
|
310
316
|
}
|
|
311
317
|
}
|
|
312
318
|
}
|
|
@@ -23,6 +23,7 @@ import {
|
|
|
23
23
|
PreferenceContribution
|
|
24
24
|
} from '@theia/core/lib/browser/preferences';
|
|
25
25
|
import { SUPPORTED_ENCODINGS } from '@theia/core/lib/browser/supported-encodings';
|
|
26
|
+
import { nls } from '@theia/core/lib/common/nls';
|
|
26
27
|
|
|
27
28
|
// See https://github.com/Microsoft/vscode/issues/30180
|
|
28
29
|
export const WIN32_MAX_FILE_SIZE_MB = 300; // 300 MB
|
|
@@ -38,7 +39,8 @@ export const filesystemPreferenceSchema: PreferenceSchema = {
|
|
|
38
39
|
type: 'object',
|
|
39
40
|
properties: {
|
|
40
41
|
'files.watcherExclude': {
|
|
41
|
-
|
|
42
|
+
// eslint-disable-next-line max-len
|
|
43
|
+
description: nls.localizeByDefault('Configure glob patterns of file paths to exclude from file watching. Patterns must match on absolute paths (i.e. prefix with ** or the full path to match properly). Changing this setting requires a restart. When you experience Code consuming lots of CPU time on startup, you can exclude large folders to reduce the initial load.'),
|
|
42
44
|
additionalProperties: {
|
|
43
45
|
type: 'boolean'
|
|
44
46
|
},
|
|
@@ -52,46 +54,55 @@ export const filesystemPreferenceSchema: PreferenceSchema = {
|
|
|
52
54
|
'files.exclude': {
|
|
53
55
|
type: 'object',
|
|
54
56
|
default: { '**/.git': true, '**/.svn': true, '**/.hg': true, '**/CVS': true, '**/.DS_Store': true },
|
|
55
|
-
|
|
57
|
+
// eslint-disable-next-line max-len
|
|
58
|
+
description: nls.localize('theia/filesystem/filesExclude', 'Configure glob patterns for excluding files and folders. For example, the file Explorer decides which files and folders to show or hide based on this setting. Refer to the `#search.exclude#` setting to define search specific excludes.'),
|
|
56
59
|
scope: 'resource'
|
|
57
60
|
},
|
|
58
61
|
'files.enableTrash': {
|
|
59
62
|
type: 'boolean',
|
|
60
63
|
default: true,
|
|
61
|
-
description: 'Moves files/folders to the OS trash (recycle bin on Windows) when deleting. Disabling this will delete files/folders permanently.'
|
|
64
|
+
description: nls.localizeByDefault('Moves files/folders to the OS trash (recycle bin on Windows) when deleting. Disabling this will delete files/folders permanently.')
|
|
62
65
|
},
|
|
63
66
|
'files.associations': {
|
|
64
67
|
type: 'object',
|
|
65
|
-
description:
|
|
66
|
-
These have precedence over the default associations of the languages installed.'
|
|
68
|
+
description: nls.localizeByDefault(
|
|
69
|
+
'Configure file associations to languages (e.g. `\"*.extension\": \"html\"`). These have precedence over the default associations of the languages installed.'
|
|
70
|
+
)
|
|
67
71
|
},
|
|
68
72
|
'files.autoGuessEncoding': {
|
|
69
73
|
type: 'boolean',
|
|
70
74
|
default: false,
|
|
71
|
-
description:
|
|
75
|
+
description: nls.localizeByDefault(
|
|
76
|
+
'When enabled, the editor will attempt to guess the character set encoding when opening files. This setting can also be configured per language.'
|
|
77
|
+
),
|
|
72
78
|
scope: 'language-overridable',
|
|
73
79
|
included: Object.keys(SUPPORTED_ENCODINGS).length > 1
|
|
74
80
|
},
|
|
75
81
|
'files.participants.timeout': {
|
|
76
82
|
type: 'number',
|
|
77
83
|
default: 5000,
|
|
78
|
-
markdownDescription:
|
|
84
|
+
markdownDescription: nls.localizeByDefault(
|
|
85
|
+
'Timeout in milliseconds after which file participants for create, rename, and delete are cancelled. Use `0` to disable participants.'
|
|
86
|
+
)
|
|
79
87
|
},
|
|
80
88
|
'files.maxFileSizeMB': {
|
|
81
89
|
type: 'number',
|
|
82
90
|
default: MAX_FILE_SIZE_MB,
|
|
83
|
-
markdownDescription: 'Controls the max file size in MB which is possible to open.'
|
|
91
|
+
markdownDescription: nls.localize('theia/filesystem/maxFileSizeMB', 'Controls the max file size in MB which is possible to open.')
|
|
84
92
|
},
|
|
85
93
|
'files.trimTrailingWhitespace': {
|
|
86
94
|
type: 'boolean',
|
|
87
95
|
default: false,
|
|
88
|
-
description: 'When enabled, will trim trailing whitespace when saving a file.',
|
|
96
|
+
description: nls.localizeByDefault('When enabled, will trim trailing whitespace when saving a file.'),
|
|
89
97
|
scope: 'language-overridable'
|
|
90
98
|
},
|
|
91
99
|
'files.maxConcurrentUploads': {
|
|
92
100
|
type: 'integer',
|
|
93
101
|
default: 1,
|
|
94
|
-
description:
|
|
102
|
+
description: nls.localize(
|
|
103
|
+
'theia/filesystem/maxConcurrentUploads',
|
|
104
|
+
'Maximum number of concurrent files to upload when uploading multiple files. 0 means all files will be uploaded concurrently.'
|
|
105
|
+
),
|
|
95
106
|
}
|
|
96
107
|
}
|
|
97
108
|
};
|
|
@@ -19,12 +19,11 @@ import { LocationService } from './location-service';
|
|
|
19
19
|
import * as React from '@theia/core/shared/react';
|
|
20
20
|
import * as ReactDOM from '@theia/core/shared/react-dom';
|
|
21
21
|
import { FileService } from '../file-service';
|
|
22
|
-
import { DisposableCollection, Emitter } from '@theia/core/lib/common';
|
|
22
|
+
import { DisposableCollection, Emitter, Path } from '@theia/core/lib/common';
|
|
23
23
|
import { injectable, inject, postConstruct } from '@theia/core/shared/inversify';
|
|
24
24
|
import { FileDialogModel } from '../file-dialog/file-dialog-model';
|
|
25
25
|
import { EnvVariablesServer } from '@theia/core/lib/common/env-variables';
|
|
26
26
|
import { ReactRenderer } from '@theia/core/lib/browser/widgets/react-renderer';
|
|
27
|
-
import { Path } from '@theia/core/lib/common';
|
|
28
27
|
import { codicon } from '@theia/core/lib/browser';
|
|
29
28
|
|
|
30
29
|
interface AutoSuggestDataEvent {
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
|
|
17
17
|
:root {
|
|
18
18
|
--theia-private-file-dialog-input-height: 21px;
|
|
19
|
-
--theia-private-location-list-panel-left:
|
|
20
|
-
--theia-private-location-list-panel-width:
|
|
19
|
+
--theia-private-location-list-panel-left: 92px;
|
|
20
|
+
--theia-private-location-list-panel-width: 407px;
|
|
21
21
|
--theia-private-navigation-panel-icon-size: 21px;
|
|
22
22
|
--theia-private-navigation-panel-line-height: 23px;
|
|
23
23
|
}
|
|
@@ -74,19 +74,12 @@
|
|
|
74
74
|
text-align: center;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
.dialogContent .theia-NavigationPanel span:
|
|
78
|
-
{
|
|
79
|
-
transform: scale(var(--theia-toolbar-active-transform-scale));
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.dialogContent .theia-NavigationPanel span:focus
|
|
83
|
-
{
|
|
77
|
+
.dialogContent .theia-NavigationPanel span:focus {
|
|
84
78
|
outline: none;
|
|
85
79
|
box-shadow: none;
|
|
86
80
|
}
|
|
87
81
|
|
|
88
|
-
.dialogContent .theia-NavigationPanel span:focus-visible
|
|
89
|
-
{
|
|
82
|
+
.dialogContent .theia-NavigationPanel span:focus-visible {
|
|
90
83
|
outline-width: 1px;
|
|
91
84
|
outline-style: solid;
|
|
92
85
|
outline-offset: -1px;
|
|
@@ -94,14 +87,13 @@
|
|
|
94
87
|
outline-color: var(--theia-focusBorder);
|
|
95
88
|
}
|
|
96
89
|
|
|
97
|
-
.dialogContent .theia-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
opacity: var(--theia-mod-disabled-opacity) !important;
|
|
90
|
+
.dialogContent span.theia-mod-disabled {
|
|
91
|
+
pointer-events: none;
|
|
92
|
+
cursor: default;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.dialogContent span.theia-mod-disabled .action-item {
|
|
96
|
+
background: none;
|
|
105
97
|
}
|
|
106
98
|
|
|
107
99
|
.dialogContent .theia-NavigationBack {
|
|
@@ -109,15 +101,15 @@
|
|
|
109
101
|
}
|
|
110
102
|
|
|
111
103
|
.dialogContent .theia-NavigationForward {
|
|
112
|
-
left:
|
|
104
|
+
left: 23px;
|
|
113
105
|
}
|
|
114
106
|
|
|
115
107
|
.dialogContent .theia-NavigationHome {
|
|
116
|
-
left:
|
|
108
|
+
left: 45px;
|
|
117
109
|
}
|
|
118
110
|
|
|
119
111
|
.dialogContent .theia-NavigationUp {
|
|
120
|
-
left:
|
|
112
|
+
left: 67px;
|
|
121
113
|
}
|
|
122
114
|
|
|
123
115
|
.dialogContent .theia-LocationListPanel {
|
|
@@ -37,11 +37,13 @@
|
|
|
37
37
|
display: flex;
|
|
38
38
|
justify-content: center;
|
|
39
39
|
align-items: center;
|
|
40
|
+
padding-left: 2px;
|
|
41
|
+
padding-right: 4px;
|
|
40
42
|
}
|
|
41
43
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
.default-folder-icon,
|
|
45
|
+
.default-file-icon {
|
|
46
|
+
padding-right: 6px;
|
|
45
47
|
}
|
|
46
48
|
|
|
47
49
|
.fa-file:before,
|
|
@@ -35,6 +35,7 @@ type DialogProperties = 'openFile' | 'openDirectory' | 'multiSelections' | 'show
|
|
|
35
35
|
// and at packaging time, clients can decide whether they need the native or the browser-based
|
|
36
36
|
// solution.
|
|
37
37
|
//
|
|
38
|
+
// eslint-disable-next-line @theia/runtime-import-check
|
|
38
39
|
import { FileUri } from '@theia/core/lib/node/file-uri';
|
|
39
40
|
|
|
40
41
|
@injectable()
|
|
@@ -91,13 +92,17 @@ export class ElectronFileDialogService extends DefaultFileDialogService {
|
|
|
91
92
|
}
|
|
92
93
|
|
|
93
94
|
protected async canRead(uris: MaybeArray<URI>): Promise<boolean> {
|
|
94
|
-
const
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
95
|
+
const resources = Array.isArray(uris) ? uris : [uris];
|
|
96
|
+
const unreadableResourcePaths: string[] = [];
|
|
97
|
+
await Promise.all(resources.map(async resource => {
|
|
98
|
+
if (!await this.fileService.access(resource, FileAccess.Constants.R_OK)) {
|
|
99
|
+
unreadableResourcePaths.push(resource.path.toString());
|
|
100
|
+
}
|
|
101
|
+
}));
|
|
102
|
+
if (unreadableResourcePaths.length > 0) {
|
|
103
|
+
this.messageService.error(`Cannot read ${unreadableResourcePaths.length} resource(s): ${unreadableResourcePaths.join(', ')}`);
|
|
99
104
|
}
|
|
100
|
-
return
|
|
105
|
+
return unreadableResourcePaths.length === 0;
|
|
101
106
|
}
|
|
102
107
|
|
|
103
108
|
protected toDialogOptions(uri: URI, props: SaveFileDialogProps | OpenFileDialogProps, dialogTitle: string): electron.FileDialogProps {
|
|
@@ -63,7 +63,7 @@ export class NodeFileUploadService implements BackendApplicationContribution {
|
|
|
63
63
|
}
|
|
64
64
|
try {
|
|
65
65
|
const target = FileUri.fsPath(fields.uri);
|
|
66
|
-
await fs.move(request.file.path, target);
|
|
66
|
+
await fs.move(request.file.path, target, { overwrite: true });
|
|
67
67
|
response.status(200).send(target); // ok
|
|
68
68
|
} catch (error) {
|
|
69
69
|
console.error(error);
|