@codingame/monaco-vscode-views-service-override 1.83.1 → 1.83.2
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 +2 -2
- package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbsPicker.js +44 -52
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/outline/documentSymbolsOutline.js +1 -1
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditorModelManager.js +3 -3
- package/vscode/src/vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler.js +57 -57
- package/vscode/src/vs/workbench/contrib/files/browser/fileCommands.js +1 -1
- package/vscode/src/vs/workbench/contrib/remote/browser/tunnelView.js +229 -244
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +47 -47
- package/vscode/src/vs/workbench/services/history/browser/historyService.js +75 -77
- package/vscode/src/vs/workbench/services/hover/browser/hoverService.js +14 -14
- package/vscode/src/vs/workbench/services/views/common/viewContainerModel.js +41 -49
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-views-service-override",
|
|
3
|
-
"version": "1.83.
|
|
3
|
+
"version": "1.83.2",
|
|
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.2",
|
|
22
22
|
"monaco-editor": "0.44.0"
|
|
23
23
|
}
|
|
24
24
|
}
|
|
@@ -28,11 +28,11 @@ let BreadcrumbsPicker = class BreadcrumbsPicker {
|
|
|
28
28
|
this._instantiationService = _instantiationService;
|
|
29
29
|
this._themeService = _themeService;
|
|
30
30
|
this._configurationService = _configurationService;
|
|
31
|
-
this._disposables = (
|
|
32
|
-
this._fakeEvent = (
|
|
33
|
-
this._onWillPickElement = (
|
|
31
|
+
this._disposables = ( new DisposableStore());
|
|
32
|
+
this._fakeEvent = ( new UIEvent('fakeEvent'));
|
|
33
|
+
this._onWillPickElement = ( new Emitter());
|
|
34
34
|
this.onWillPickElement = this._onWillPickElement.event;
|
|
35
|
-
this._previewDispoables = (
|
|
35
|
+
this._previewDispoables = ( new MutableDisposable());
|
|
36
36
|
this._domNode = document.createElement('div');
|
|
37
37
|
this._domNode.className = 'monaco-breadcrumbs-picker show-file-icons';
|
|
38
38
|
parent.appendChild(this._domNode);
|
|
@@ -49,10 +49,10 @@ let BreadcrumbsPicker = class BreadcrumbsPicker {
|
|
|
49
49
|
const color = theme.getColor(breadcrumbsPickerBackground);
|
|
50
50
|
this._arrow = document.createElement('div');
|
|
51
51
|
this._arrow.className = 'arrow';
|
|
52
|
-
this._arrow.style.borderColor = `transparent transparent ${color ? (
|
|
52
|
+
this._arrow.style.borderColor = `transparent transparent ${color ? ( color.toString()) : ''}`;
|
|
53
53
|
this._domNode.appendChild(this._arrow);
|
|
54
54
|
this._treeContainer = document.createElement('div');
|
|
55
|
-
this._treeContainer.style.background = color ? (
|
|
55
|
+
this._treeContainer.style.background = color ? ( color.toString()) : '';
|
|
56
56
|
this._treeContainer.style.paddingTop = '2px';
|
|
57
57
|
this._treeContainer.style.borderRadius = '3px';
|
|
58
58
|
this._treeContainer.style.boxShadow = `0 0 8px 2px ${this._themeService.getColorTheme().getColor(widgetShadow)}`;
|
|
@@ -97,11 +97,11 @@ let BreadcrumbsPicker = class BreadcrumbsPicker {
|
|
|
97
97
|
}
|
|
98
98
|
restoreViewState() { }
|
|
99
99
|
};
|
|
100
|
-
BreadcrumbsPicker = (
|
|
101
|
-
(
|
|
102
|
-
(
|
|
103
|
-
(
|
|
104
|
-
], BreadcrumbsPicker))
|
|
100
|
+
BreadcrumbsPicker = ( __decorate([
|
|
101
|
+
( __param(2, IInstantiationService)),
|
|
102
|
+
( __param(3, IThemeService)),
|
|
103
|
+
( __param(4, IConfigurationService))
|
|
104
|
+
], BreadcrumbsPicker));
|
|
105
105
|
class FileVirtualDelegate {
|
|
106
106
|
getHeight(_element) {
|
|
107
107
|
return 22;
|
|
@@ -113,22 +113,16 @@ class FileVirtualDelegate {
|
|
|
113
113
|
class FileIdentityProvider {
|
|
114
114
|
getId(element) {
|
|
115
115
|
if (URI.isUri(element)) {
|
|
116
|
-
return (
|
|
117
|
-
(element.toString())
|
|
118
|
-
);
|
|
116
|
+
return ( element.toString());
|
|
119
117
|
}
|
|
120
118
|
else if (isWorkspace(element)) {
|
|
121
119
|
return element.id;
|
|
122
120
|
}
|
|
123
121
|
else if (isWorkspaceFolder(element)) {
|
|
124
|
-
return (
|
|
125
|
-
(element.uri.toString())
|
|
126
|
-
);
|
|
122
|
+
return ( element.uri.toString());
|
|
127
123
|
}
|
|
128
124
|
else {
|
|
129
|
-
return (
|
|
130
|
-
(element.resource.toString())
|
|
131
|
-
);
|
|
125
|
+
return ( element.resource.toString());
|
|
132
126
|
}
|
|
133
127
|
}
|
|
134
128
|
}
|
|
@@ -160,9 +154,9 @@ let FileDataSource = class FileDataSource {
|
|
|
160
154
|
return stat.children ?? [];
|
|
161
155
|
}
|
|
162
156
|
};
|
|
163
|
-
FileDataSource = (
|
|
164
|
-
(
|
|
165
|
-
], FileDataSource))
|
|
157
|
+
FileDataSource = ( __decorate([
|
|
158
|
+
( __param(0, IFileService))
|
|
159
|
+
], FileDataSource));
|
|
166
160
|
let FileRenderer = class FileRenderer {
|
|
167
161
|
constructor(_labels, _configService) {
|
|
168
162
|
this._labels = _labels;
|
|
@@ -197,9 +191,9 @@ let FileRenderer = class FileRenderer {
|
|
|
197
191
|
templateData.dispose();
|
|
198
192
|
}
|
|
199
193
|
};
|
|
200
|
-
FileRenderer = (
|
|
201
|
-
(
|
|
202
|
-
], FileRenderer))
|
|
194
|
+
FileRenderer = ( __decorate([
|
|
195
|
+
( __param(1, IConfigurationService))
|
|
196
|
+
], FileRenderer));
|
|
203
197
|
class FileNavigationLabelProvider {
|
|
204
198
|
getKeyboardNavigationLabel(element) {
|
|
205
199
|
return element.name;
|
|
@@ -207,9 +201,7 @@ class FileNavigationLabelProvider {
|
|
|
207
201
|
}
|
|
208
202
|
class FileAccessibilityProvider {
|
|
209
203
|
getWidgetAriaLabel() {
|
|
210
|
-
return (
|
|
211
|
-
(localize('breadcrumbs', "Breadcrumbs"))
|
|
212
|
-
);
|
|
204
|
+
return ( localize('breadcrumbs', "Breadcrumbs"));
|
|
213
205
|
}
|
|
214
206
|
getAriaLabel(element) {
|
|
215
207
|
return element.name;
|
|
@@ -218,8 +210,8 @@ class FileAccessibilityProvider {
|
|
|
218
210
|
let FileFilter = class FileFilter {
|
|
219
211
|
constructor(_workspaceService, configService) {
|
|
220
212
|
this._workspaceService = _workspaceService;
|
|
221
|
-
this._cachedExpressions = (
|
|
222
|
-
this._disposables = (
|
|
213
|
+
this._cachedExpressions = ( new Map());
|
|
214
|
+
this._disposables = ( new DisposableStore());
|
|
223
215
|
const config = BreadcrumbsConfig.FileExcludes.bindTo(configService);
|
|
224
216
|
const update = () => {
|
|
225
217
|
_workspaceService.getWorkspace().folders.forEach(folder => {
|
|
@@ -237,7 +229,7 @@ let FileFilter = class FileFilter {
|
|
|
237
229
|
: pattern;
|
|
238
230
|
adjustedConfig[patternAbs] = excludesConfig[pattern];
|
|
239
231
|
}
|
|
240
|
-
this._cachedExpressions.set((
|
|
232
|
+
this._cachedExpressions.set(( folder.uri.toString()), glob.parse(adjustedConfig));
|
|
241
233
|
});
|
|
242
234
|
};
|
|
243
235
|
update();
|
|
@@ -253,17 +245,17 @@ let FileFilter = class FileFilter {
|
|
|
253
245
|
return true;
|
|
254
246
|
}
|
|
255
247
|
const folder = this._workspaceService.getWorkspaceFolder(element.resource);
|
|
256
|
-
if (!folder || !(
|
|
248
|
+
if (!folder || !( this._cachedExpressions.has(( folder.uri.toString())))) {
|
|
257
249
|
return true;
|
|
258
250
|
}
|
|
259
|
-
const expression = this._cachedExpressions.get((
|
|
251
|
+
const expression = this._cachedExpressions.get(( folder.uri.toString()));
|
|
260
252
|
return !expression(relative(folder.uri.path, element.resource.path), basename(element.resource));
|
|
261
253
|
}
|
|
262
254
|
};
|
|
263
|
-
FileFilter = (
|
|
264
|
-
(
|
|
265
|
-
(
|
|
266
|
-
], FileFilter))
|
|
255
|
+
FileFilter = ( __decorate([
|
|
256
|
+
( __param(0, IWorkspaceContextService)),
|
|
257
|
+
( __param(1, IConfigurationService))
|
|
258
|
+
], FileFilter));
|
|
267
259
|
class FileSorter {
|
|
268
260
|
compare(a, b) {
|
|
269
261
|
if (isWorkspaceFolder(a) && isWorkspaceFolder(b)) {
|
|
@@ -297,12 +289,12 @@ let BreadcrumbsFilePicker = class BreadcrumbsFilePicker extends BreadcrumbsPicke
|
|
|
297
289
|
onFileIconThemeChange(this._themeService.getFileIconTheme());
|
|
298
290
|
const labels = this._instantiationService.createInstance(ResourceLabels, DEFAULT_LABELS_CONTAINER );
|
|
299
291
|
this._disposables.add(labels);
|
|
300
|
-
return this._instantiationService.createInstance(WorkbenchAsyncDataTree, 'BreadcrumbsFilePicker', container, (
|
|
292
|
+
return this._instantiationService.createInstance(WorkbenchAsyncDataTree, 'BreadcrumbsFilePicker', container, ( new FileVirtualDelegate()), [this._instantiationService.createInstance(FileRenderer, labels)], this._instantiationService.createInstance(FileDataSource), {
|
|
301
293
|
multipleSelectionSupport: false,
|
|
302
|
-
sorter: (
|
|
294
|
+
sorter: ( new FileSorter()),
|
|
303
295
|
filter: this._instantiationService.createInstance(FileFilter),
|
|
304
|
-
identityProvider: (
|
|
305
|
-
keyboardNavigationLabelProvider: (
|
|
296
|
+
identityProvider: ( new FileIdentityProvider()),
|
|
297
|
+
keyboardNavigationLabelProvider: ( new FileNavigationLabelProvider()),
|
|
306
298
|
accessibilityProvider: this._instantiationService.createInstance(FileAccessibilityProvider),
|
|
307
299
|
showNotFoundMessage: false,
|
|
308
300
|
overrideStyles: {
|
|
@@ -350,13 +342,13 @@ let BreadcrumbsFilePicker = class BreadcrumbsFilePicker extends BreadcrumbsPicke
|
|
|
350
342
|
return false;
|
|
351
343
|
}
|
|
352
344
|
};
|
|
353
|
-
BreadcrumbsFilePicker = (
|
|
354
|
-
(
|
|
355
|
-
(
|
|
356
|
-
(
|
|
357
|
-
(
|
|
358
|
-
(
|
|
359
|
-
], BreadcrumbsFilePicker))
|
|
345
|
+
BreadcrumbsFilePicker = ( __decorate([
|
|
346
|
+
( __param(2, IInstantiationService)),
|
|
347
|
+
( __param(3, IThemeService)),
|
|
348
|
+
( __param(4, IConfigurationService)),
|
|
349
|
+
( __param(5, IWorkspaceContextService)),
|
|
350
|
+
( __param(6, IEditorService))
|
|
351
|
+
], BreadcrumbsFilePicker));
|
|
360
352
|
let OutlineTreeSorter = class OutlineTreeSorter {
|
|
361
353
|
constructor(comparator, uri, configService) {
|
|
362
354
|
this.comparator = comparator;
|
|
@@ -374,9 +366,9 @@ let OutlineTreeSorter = class OutlineTreeSorter {
|
|
|
374
366
|
}
|
|
375
367
|
}
|
|
376
368
|
};
|
|
377
|
-
OutlineTreeSorter = (
|
|
378
|
-
(
|
|
379
|
-
], OutlineTreeSorter))
|
|
369
|
+
OutlineTreeSorter = ( __decorate([
|
|
370
|
+
( __param(2, ITextResourceConfigurationService))
|
|
371
|
+
], OutlineTreeSorter));
|
|
380
372
|
class BreadcrumbsOutlinePicker extends BreadcrumbsPicker {
|
|
381
373
|
_createTree(container, input) {
|
|
382
374
|
const { config } = input.outline;
|
package/vscode/src/vs/workbench/contrib/codeEditor/browser/outline/documentSymbolsOutline.js
CHANGED
|
@@ -8,7 +8,7 @@ import { DocumentSymbolFilter, DocumentSymbolGroupRenderer, DocumentSymbolRender
|
|
|
8
8
|
import { isCodeEditor, isDiffEditor } from 'monaco-editor/esm/vs/editor/browser/editorBrowser.js';
|
|
9
9
|
import { OutlineModel, OutlineGroup, OutlineElement, TreeElement, IOutlineModelService } from 'monaco-editor/esm/vs/editor/contrib/documentSymbols/browser/outlineModel.js';
|
|
10
10
|
import { CancellationTokenSource } from 'monaco-editor/esm/vs/base/common/cancellation.js';
|
|
11
|
-
import { Barrier, TimeoutTimer,
|
|
11
|
+
import { Barrier, TimeoutTimer, timeout, raceCancellation } from 'monaco-editor/esm/vs/base/common/async.js';
|
|
12
12
|
import { onUnexpectedError } from 'monaco-editor/esm/vs/base/common/errors.js';
|
|
13
13
|
import { ITextResourceConfigurationService } from 'monaco-editor/esm/vs/editor/common/services/textResourceConfiguration.js';
|
|
14
14
|
import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
@@ -2,10 +2,10 @@ import { createSingleCallFunction } from 'monaco-editor/esm/vs/base/common/funct
|
|
|
2
2
|
|
|
3
3
|
class CustomEditorModelManager {
|
|
4
4
|
constructor() {
|
|
5
|
-
this._references = (
|
|
5
|
+
this._references = ( new Map());
|
|
6
6
|
}
|
|
7
7
|
async getAllModels(resource) {
|
|
8
|
-
const keyStart = `${(
|
|
8
|
+
const keyStart = `${( resource.toString())}@@@`;
|
|
9
9
|
const models = [];
|
|
10
10
|
for (const [key, entry] of this._references) {
|
|
11
11
|
if (key.startsWith(keyStart) && entry.model) {
|
|
@@ -56,7 +56,7 @@ class CustomEditorModelManager {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
key(resource, viewType) {
|
|
59
|
-
return `${(
|
|
59
|
+
return `${( resource.toString())}@@@${viewType}`;
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
|
|
@@ -29,10 +29,10 @@ import { hash } from 'monaco-editor/esm/vs/base/common/hash.js';
|
|
|
29
29
|
const CONFLICT_RESOLUTION_CONTEXT = 'saveConflictResolutionContext';
|
|
30
30
|
const CONFLICT_RESOLUTION_SCHEME = 'conflictResolution';
|
|
31
31
|
const LEARN_MORE_DIRTY_WRITE_IGNORE_KEY = 'learnMoreDirtyWriteError';
|
|
32
|
-
const conflictEditorHelp = (
|
|
32
|
+
const conflictEditorHelp = ( localize(
|
|
33
33
|
'userGuide',
|
|
34
34
|
"Use the actions in the editor tool bar to either undo your changes or overwrite the content of the file with your changes."
|
|
35
|
-
))
|
|
35
|
+
));
|
|
36
36
|
let TextFileSaveErrorHandler = class TextFileSaveErrorHandler extends Disposable {
|
|
37
37
|
constructor(notificationService, textFileService, contextKeyService, editorService, textModelService, instantiationService, storageService) {
|
|
38
38
|
super();
|
|
@@ -42,8 +42,8 @@ let TextFileSaveErrorHandler = class TextFileSaveErrorHandler extends Disposable
|
|
|
42
42
|
this.editorService = editorService;
|
|
43
43
|
this.instantiationService = instantiationService;
|
|
44
44
|
this.storageService = storageService;
|
|
45
|
-
this.messages = (
|
|
46
|
-
this.conflictResolutionContext = (
|
|
45
|
+
this.messages = ( new ResourceMap());
|
|
46
|
+
this.conflictResolutionContext = ( new RawContextKey(CONFLICT_RESOLUTION_CONTEXT, false, true)).bindTo(this.contextKeyService);
|
|
47
47
|
this.activeConflictResolutionResource = undefined;
|
|
48
48
|
const provider = this._register(instantiationService.createInstance(TextFileContentProvider));
|
|
49
49
|
this._register(textModelService.registerTextModelContentProvider(CONFLICT_RESOLUTION_SCHEME, provider));
|
|
@@ -92,11 +92,11 @@ let TextFileSaveErrorHandler = class TextFileSaveErrorHandler extends Disposable
|
|
|
92
92
|
secondaryActions.push(this.instantiationService.createInstance(DoNotShowResolveConflictLearnMoreAction));
|
|
93
93
|
}
|
|
94
94
|
else {
|
|
95
|
-
message = (
|
|
95
|
+
message = ( localize(
|
|
96
96
|
'staleSaveError',
|
|
97
97
|
"Failed to save '{0}': The content of the file is newer. Please compare your version with the file contents or overwrite the content of the file with your changes.",
|
|
98
98
|
basename(resource)
|
|
99
|
-
))
|
|
99
|
+
));
|
|
100
100
|
primaryActions.push(this.instantiationService.createInstance(ResolveSaveConflictAction, model));
|
|
101
101
|
primaryActions.push(this.instantiationService.createInstance(SaveModelIgnoreModifiedSinceAction, model));
|
|
102
102
|
secondaryActions.push(this.instantiationService.createInstance(ConfigureSaveConflictAction));
|
|
@@ -120,47 +120,47 @@ let TextFileSaveErrorHandler = class TextFileSaveErrorHandler extends Disposable
|
|
|
120
120
|
primaryActions.push(this.instantiationService.createInstance(DiscardModelAction, model));
|
|
121
121
|
if (isWriteLocked) {
|
|
122
122
|
if (triedToUnlock && canSaveElevated) {
|
|
123
|
-
message = isWindows ? (
|
|
123
|
+
message = isWindows ? ( localize(
|
|
124
124
|
'readonlySaveErrorAdmin',
|
|
125
125
|
"Failed to save '{0}': File is read-only. Select 'Overwrite as Admin' to retry as administrator.",
|
|
126
126
|
basename(resource)
|
|
127
|
-
))
|
|
127
|
+
)) : ( localize(
|
|
128
128
|
'readonlySaveErrorSudo',
|
|
129
129
|
"Failed to save '{0}': File is read-only. Select 'Overwrite as Sudo' to retry as superuser.",
|
|
130
130
|
basename(resource)
|
|
131
|
-
))
|
|
131
|
+
));
|
|
132
132
|
}
|
|
133
133
|
else {
|
|
134
|
-
message = (
|
|
134
|
+
message = ( localize(
|
|
135
135
|
'readonlySaveError',
|
|
136
136
|
"Failed to save '{0}': File is read-only. Select 'Overwrite' to attempt to make it writeable.",
|
|
137
137
|
basename(resource)
|
|
138
|
-
))
|
|
138
|
+
));
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
else if (canSaveElevated && isPermissionDenied) {
|
|
142
|
-
message = isWindows ? (
|
|
142
|
+
message = isWindows ? ( localize(
|
|
143
143
|
'permissionDeniedSaveError',
|
|
144
144
|
"Failed to save '{0}': Insufficient permissions. Select 'Retry as Admin' to retry as administrator.",
|
|
145
145
|
basename(resource)
|
|
146
|
-
))
|
|
146
|
+
)) : ( localize(
|
|
147
147
|
'permissionDeniedSaveErrorSudo',
|
|
148
148
|
"Failed to save '{0}': Insufficient permissions. Select 'Retry as Sudo' to retry as superuser.",
|
|
149
149
|
basename(resource)
|
|
150
|
-
))
|
|
150
|
+
));
|
|
151
151
|
}
|
|
152
152
|
else {
|
|
153
|
-
message = (
|
|
153
|
+
message = ( localize(
|
|
154
154
|
{ key: 'genericSaveError', comment: ['{0} is the resource that failed to save and {1} the error message'] },
|
|
155
155
|
"Failed to save '{0}': {1}",
|
|
156
156
|
basename(resource),
|
|
157
157
|
toErrorMessage(error, false)
|
|
158
|
-
))
|
|
158
|
+
));
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
const actions = { primary: primaryActions, secondary: secondaryActions };
|
|
162
162
|
const handle = this.notificationService.notify({
|
|
163
|
-
id: `${hash((
|
|
163
|
+
id: `${hash(( model.resource.toString()))}`,
|
|
164
164
|
severity: Severity.Error,
|
|
165
165
|
message,
|
|
166
166
|
actions
|
|
@@ -173,30 +173,30 @@ let TextFileSaveErrorHandler = class TextFileSaveErrorHandler extends Disposable
|
|
|
173
173
|
this.messages.clear();
|
|
174
174
|
}
|
|
175
175
|
};
|
|
176
|
-
TextFileSaveErrorHandler = (
|
|
177
|
-
(
|
|
178
|
-
(
|
|
179
|
-
(
|
|
180
|
-
(
|
|
181
|
-
(
|
|
182
|
-
(
|
|
183
|
-
(
|
|
184
|
-
], TextFileSaveErrorHandler))
|
|
176
|
+
TextFileSaveErrorHandler = ( __decorate([
|
|
177
|
+
( __param(0, INotificationService)),
|
|
178
|
+
( __param(1, ITextFileService)),
|
|
179
|
+
( __param(2, IContextKeyService)),
|
|
180
|
+
( __param(3, IEditorService)),
|
|
181
|
+
( __param(4, ITextModelService)),
|
|
182
|
+
( __param(5, IInstantiationService)),
|
|
183
|
+
( __param(6, IStorageService))
|
|
184
|
+
], TextFileSaveErrorHandler));
|
|
185
185
|
let ResolveConflictLearnMoreAction = class ResolveConflictLearnMoreAction extends Action {
|
|
186
186
|
constructor(openerService) {
|
|
187
|
-
super('workbench.files.action.resolveConflictLearnMore', (
|
|
187
|
+
super('workbench.files.action.resolveConflictLearnMore', ( localize('learnMore', "Learn More")));
|
|
188
188
|
this.openerService = openerService;
|
|
189
189
|
}
|
|
190
190
|
async run() {
|
|
191
|
-
await this.openerService.open((
|
|
191
|
+
await this.openerService.open(( URI.parse('https://go.microsoft.com/fwlink/?linkid=868264')));
|
|
192
192
|
}
|
|
193
193
|
};
|
|
194
|
-
ResolveConflictLearnMoreAction = (
|
|
195
|
-
(
|
|
196
|
-
], ResolveConflictLearnMoreAction))
|
|
194
|
+
ResolveConflictLearnMoreAction = ( __decorate([
|
|
195
|
+
( __param(0, IOpenerService))
|
|
196
|
+
], ResolveConflictLearnMoreAction));
|
|
197
197
|
let DoNotShowResolveConflictLearnMoreAction = class DoNotShowResolveConflictLearnMoreAction extends Action {
|
|
198
198
|
constructor(storageService) {
|
|
199
|
-
super('workbench.files.action.resolveConflictLearnMoreDoNotShowAgain', (
|
|
199
|
+
super('workbench.files.action.resolveConflictLearnMoreDoNotShowAgain', ( localize('dontShowAgain', "Don't Show Again")));
|
|
200
200
|
this.storageService = storageService;
|
|
201
201
|
}
|
|
202
202
|
async run(notification) {
|
|
@@ -204,12 +204,12 @@ let DoNotShowResolveConflictLearnMoreAction = class DoNotShowResolveConflictLear
|
|
|
204
204
|
notification.dispose();
|
|
205
205
|
}
|
|
206
206
|
};
|
|
207
|
-
DoNotShowResolveConflictLearnMoreAction = (
|
|
208
|
-
(
|
|
209
|
-
], DoNotShowResolveConflictLearnMoreAction))
|
|
207
|
+
DoNotShowResolveConflictLearnMoreAction = ( __decorate([
|
|
208
|
+
( __param(0, IStorageService))
|
|
209
|
+
], DoNotShowResolveConflictLearnMoreAction));
|
|
210
210
|
let ResolveSaveConflictAction = class ResolveSaveConflictAction extends Action {
|
|
211
211
|
constructor(model, editorService, notificationService, instantiationService, productService) {
|
|
212
|
-
super('workbench.files.action.resolveConflict', (
|
|
212
|
+
super('workbench.files.action.resolveConflict', ( localize('compareChanges', "Compare")));
|
|
213
213
|
this.model = model;
|
|
214
214
|
this.editorService = editorService;
|
|
215
215
|
this.notificationService = notificationService;
|
|
@@ -220,17 +220,17 @@ let ResolveSaveConflictAction = class ResolveSaveConflictAction extends Action {
|
|
|
220
220
|
if (!this.model.isDisposed()) {
|
|
221
221
|
const resource = this.model.resource;
|
|
222
222
|
const name = basename(resource);
|
|
223
|
-
const editorLabel = (
|
|
223
|
+
const editorLabel = ( localize(
|
|
224
224
|
'saveConflictDiffLabel',
|
|
225
225
|
"{0} (in file) ↔ {1} (in {2}) - Resolve save conflict",
|
|
226
226
|
name,
|
|
227
227
|
name,
|
|
228
228
|
this.productService.nameLong
|
|
229
|
-
))
|
|
229
|
+
));
|
|
230
230
|
await TextFileContentProvider.open(resource, CONFLICT_RESOLUTION_SCHEME, editorLabel, this.editorService, { pinned: true });
|
|
231
231
|
const actions = { primary: [this.instantiationService.createInstance(ResolveConflictLearnMoreAction)] };
|
|
232
232
|
const handle = this.notificationService.notify({
|
|
233
|
-
id: `${hash((
|
|
233
|
+
id: `${hash(( resource.toString()))}`,
|
|
234
234
|
severity: Severity.Info,
|
|
235
235
|
message: conflictEditorHelp,
|
|
236
236
|
actions,
|
|
@@ -240,15 +240,15 @@ let ResolveSaveConflictAction = class ResolveSaveConflictAction extends Action {
|
|
|
240
240
|
}
|
|
241
241
|
}
|
|
242
242
|
};
|
|
243
|
-
ResolveSaveConflictAction = (
|
|
244
|
-
(
|
|
245
|
-
(
|
|
246
|
-
(
|
|
247
|
-
(
|
|
248
|
-
], ResolveSaveConflictAction))
|
|
243
|
+
ResolveSaveConflictAction = ( __decorate([
|
|
244
|
+
( __param(1, IEditorService)),
|
|
245
|
+
( __param(2, INotificationService)),
|
|
246
|
+
( __param(3, IInstantiationService)),
|
|
247
|
+
( __param(4, IProductService))
|
|
248
|
+
], ResolveSaveConflictAction));
|
|
249
249
|
class SaveModelElevatedAction extends Action {
|
|
250
250
|
constructor(model, triedToUnlock) {
|
|
251
|
-
super('workbench.files.action.saveModelElevated', triedToUnlock ? isWindows ? (
|
|
251
|
+
super('workbench.files.action.saveModelElevated', triedToUnlock ? isWindows ? ( localize('overwriteElevated', "Overwrite as Admin...")) : ( localize('overwriteElevatedSudo', "Overwrite as Sudo...")) : isWindows ? ( localize('saveElevated', "Retry as Admin...")) : ( localize('saveElevatedSudo', "Retry as Sudo...")));
|
|
252
252
|
this.model = model;
|
|
253
253
|
this.triedToUnlock = triedToUnlock;
|
|
254
254
|
}
|
|
@@ -264,7 +264,7 @@ class SaveModelElevatedAction extends Action {
|
|
|
264
264
|
}
|
|
265
265
|
class RetrySaveModelAction extends Action {
|
|
266
266
|
constructor(model) {
|
|
267
|
-
super('workbench.files.action.saveModel', (
|
|
267
|
+
super('workbench.files.action.saveModel', ( localize('retry', "Retry")));
|
|
268
268
|
this.model = model;
|
|
269
269
|
}
|
|
270
270
|
async run() {
|
|
@@ -275,7 +275,7 @@ class RetrySaveModelAction extends Action {
|
|
|
275
275
|
}
|
|
276
276
|
class DiscardModelAction extends Action {
|
|
277
277
|
constructor(model) {
|
|
278
|
-
super('workbench.files.action.discardModel', (
|
|
278
|
+
super('workbench.files.action.discardModel', ( localize('discard', "Discard")));
|
|
279
279
|
this.model = model;
|
|
280
280
|
}
|
|
281
281
|
async run() {
|
|
@@ -313,12 +313,12 @@ let SaveModelAsAction = class SaveModelAsAction extends Action {
|
|
|
313
313
|
return preferredMatchingEditor;
|
|
314
314
|
}
|
|
315
315
|
};
|
|
316
|
-
SaveModelAsAction = (
|
|
317
|
-
(
|
|
318
|
-
], SaveModelAsAction))
|
|
316
|
+
SaveModelAsAction = ( __decorate([
|
|
317
|
+
( __param(1, IEditorService))
|
|
318
|
+
], SaveModelAsAction));
|
|
319
319
|
class UnlockModelAction extends Action {
|
|
320
320
|
constructor(model) {
|
|
321
|
-
super('workbench.files.action.unlock', (
|
|
321
|
+
super('workbench.files.action.unlock', ( localize('overwrite', "Overwrite")));
|
|
322
322
|
this.model = model;
|
|
323
323
|
}
|
|
324
324
|
async run() {
|
|
@@ -329,7 +329,7 @@ class UnlockModelAction extends Action {
|
|
|
329
329
|
}
|
|
330
330
|
class SaveModelIgnoreModifiedSinceAction extends Action {
|
|
331
331
|
constructor(model) {
|
|
332
|
-
super('workbench.files.action.saveIgnoreModifiedSince', (
|
|
332
|
+
super('workbench.files.action.saveIgnoreModifiedSince', ( localize('overwrite', "Overwrite")));
|
|
333
333
|
this.model = model;
|
|
334
334
|
}
|
|
335
335
|
async run() {
|
|
@@ -340,15 +340,15 @@ class SaveModelIgnoreModifiedSinceAction extends Action {
|
|
|
340
340
|
}
|
|
341
341
|
let ConfigureSaveConflictAction = class ConfigureSaveConflictAction extends Action {
|
|
342
342
|
constructor(preferencesService) {
|
|
343
|
-
super('workbench.files.action.configureSaveConflict', (
|
|
343
|
+
super('workbench.files.action.configureSaveConflict', ( localize('configure', "Configure")));
|
|
344
344
|
this.preferencesService = preferencesService;
|
|
345
345
|
}
|
|
346
346
|
async run() {
|
|
347
347
|
this.preferencesService.openSettings({ query: 'files.saveConflictResolution' });
|
|
348
348
|
}
|
|
349
349
|
};
|
|
350
|
-
ConfigureSaveConflictAction = (
|
|
351
|
-
(
|
|
352
|
-
], ConfigureSaveConflictAction))
|
|
350
|
+
ConfigureSaveConflictAction = ( __decorate([
|
|
351
|
+
( __param(0, IPreferencesService))
|
|
352
|
+
], ConfigureSaveConflictAction));
|
|
353
353
|
|
|
354
354
|
export { CONFLICT_RESOLUTION_CONTEXT, CONFLICT_RESOLUTION_SCHEME, TextFileSaveErrorHandler };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as nls from 'monaco-editor/esm/vs/nls.js';
|
|
2
|
-
import {
|
|
2
|
+
import { SideBySideEditor, EditorResourceAccessor } from 'vscode/vscode/vs/workbench/common/editor';
|
|
3
3
|
import { SideBySideEditorInput } from 'vscode/vscode/vs/workbench/common/editor/sideBySideEditorInput';
|
|
4
4
|
import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
5
5
|
import { IWorkspaceContextService } from 'monaco-editor/esm/vs/platform/workspace/common/workspace.js';
|