@codingame/monaco-vscode-view-common-service-override 4.5.0 → 4.5.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/index.d.ts +1 -1
- package/package.json +3 -3
- package/vscode/src/vs/base/browser/ui/grid/grid.js +12 -12
- package/vscode/src/vs/base/browser/ui/grid/gridview.js +26 -26
- package/vscode/src/vs/platform/languagePacks/common/localizedStrings.js +4 -3
- package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +127 -220
- package/vscode/src/vs/workbench/browser/actions/listCommands.js +43 -44
- package/vscode/src/vs/workbench/browser/actions/navigationActions.js +7 -30
- package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.js +67 -138
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.js +21 -36
- package/vscode/src/vs/workbench/browser/parts/compositeBar.js +26 -27
- package/vscode/src/vs/workbench/browser/parts/compositePart.js +17 -31
- package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +215 -764
- package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +27 -42
- package/vscode/src/vs/workbench/browser/parts/editor/editorDropTarget.js +24 -23
- package/vscode/src/vs/workbench/browser/parts/editor/editorPart.js +3 -3
- package/vscode/src/vs/workbench/browser/parts/editor/editorParts.js +31 -33
- package/vscode/src/vs/workbench/browser/parts/paneCompositeBar.js +51 -54
- package/vscode/src/vs/workbench/browser/parts/paneCompositePart.js +38 -41
- package/vscode/src/vs/workbench/browser/parts/panel/panelPart.js +21 -24
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarActions.js +2 -5
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.js +17 -20
- package/vscode/src/vs/workbench/browser/window.js +41 -92
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +41 -78
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +23 -46
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.js +36 -27
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.js +1 -1
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditors.js +1 -1
- package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.js +14 -15
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.js +10 -11
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditorModelManager.js +1 -1
- package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.js +25 -52
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.js +55 -87
- package/vscode/src/vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution.js +18 -48
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/commands.js +61 -150
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/devCommands.js +15 -70
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution.js +9 -20
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/colors.js +14 -65
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/conflictActions.js +38 -113
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.js +12 -19
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.js +34 -75
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.js +16 -37
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.js +40 -43
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.js +12 -11
- package/vscode/src/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker.js +24 -61
- package/vscode/src/vs/workbench/contrib/sash/browser/sash.contribution.js +7 -6
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.js +37 -70
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +23 -46
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.js +26 -27
- package/vscode/src/vs/workbench/contrib/webview/browser/overlayWebview.js +2 -2
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +50 -52
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.js +18 -34
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.js +7 -10
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewService.js +2 -2
- package/vscode/src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.js +45 -46
- package/vscode/src/vs/workbench/services/driver/browser/driver.js +8 -6
- package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.js +45 -68
- package/vscode/src/vs/workbench/services/history/browser/historyService.js +95 -98
- package/vscode/src/vs/workbench/services/progress/browser/progressService.js +34 -74
- package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +69 -67
- package/vscode/src/vs/workbench/services/views/common/viewContainerModel.js +52 -47
- package/viewCommon.d.ts +0 -5
|
@@ -28,10 +28,11 @@ import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/c
|
|
|
28
28
|
import { IWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/services/environment/common/environmentService.service';
|
|
29
29
|
|
|
30
30
|
var BaseWindow_1;
|
|
31
|
+
const _moduleId = "vs/workbench/browser/window";
|
|
31
32
|
let BaseWindow = class BaseWindow extends Disposable {
|
|
32
33
|
static { BaseWindow_1 = this; }
|
|
33
34
|
static { this.TIMEOUT_HANDLES = Number.MIN_SAFE_INTEGER; }
|
|
34
|
-
static { this.TIMEOUT_DISPOSABLES = ( new Map()); }
|
|
35
|
+
static { this.TIMEOUT_DISPOSABLES = ( (new Map())); }
|
|
35
36
|
constructor(targetWindow, dom = { getWindowsCount, getWindows }, hostService, environmentService) {
|
|
36
37
|
super();
|
|
37
38
|
this.hostService = hostService;
|
|
@@ -67,7 +68,7 @@ let BaseWindow = class BaseWindow extends Disposable {
|
|
|
67
68
|
if (dom.getWindowsCount() === 1 || typeof handler === 'string' || timeout === 0 ) {
|
|
68
69
|
return originalSetTimeout.apply(this, [handler, timeout, ...args]);
|
|
69
70
|
}
|
|
70
|
-
const timeoutDisposables = ( new Set());
|
|
71
|
+
const timeoutDisposables = ( (new Set()));
|
|
71
72
|
const timeoutHandle = BaseWindow_1.TIMEOUT_HANDLES++;
|
|
72
73
|
BaseWindow_1.TIMEOUT_DISPOSABLES.set(timeoutHandle, timeoutDisposables);
|
|
73
74
|
const handlerFn = createSingleCallFunction(handler, () => {
|
|
@@ -113,40 +114,16 @@ let BaseWindow = class BaseWindow extends Disposable {
|
|
|
113
114
|
const dialogService = accessor.get(IDialogService);
|
|
114
115
|
const configurationService = accessor.get(IConfigurationService);
|
|
115
116
|
const message = reason === 2 ?
|
|
116
|
-
(isMacintosh ? ( localizeWithPath(
|
|
117
|
-
|
|
118
|
-
'quitMessageMac',
|
|
119
|
-
"Are you sure you want to quit?"
|
|
120
|
-
)) : ( localizeWithPath(
|
|
121
|
-
'vs/workbench/browser/window',
|
|
122
|
-
'quitMessage',
|
|
123
|
-
"Are you sure you want to exit?"
|
|
124
|
-
))) :
|
|
125
|
-
( localizeWithPath(
|
|
126
|
-
'vs/workbench/browser/window',
|
|
127
|
-
'closeWindowMessage',
|
|
128
|
-
"Are you sure you want to close the window?"
|
|
129
|
-
));
|
|
117
|
+
(isMacintosh ? ( localizeWithPath(_moduleId, 0, "Are you sure you want to quit?")) : ( localizeWithPath(_moduleId, 1, "Are you sure you want to exit?"))) :
|
|
118
|
+
( localizeWithPath(_moduleId, 2, "Are you sure you want to close the window?"));
|
|
130
119
|
const primaryButton = reason === 2 ?
|
|
131
|
-
(isMacintosh ? ( localizeWithPath(
|
|
132
|
-
|
|
133
|
-
{ key: 'quitButtonLabel', comment: ['&& denotes a mnemonic'] },
|
|
134
|
-
"&&Quit"
|
|
135
|
-
)) : ( localizeWithPath(
|
|
136
|
-
'vs/workbench/browser/window',
|
|
137
|
-
{ key: 'exitButtonLabel', comment: ['&& denotes a mnemonic'] },
|
|
138
|
-
"&&Exit"
|
|
139
|
-
))) :
|
|
140
|
-
( localizeWithPath(
|
|
141
|
-
'vs/workbench/browser/window',
|
|
142
|
-
{ key: 'closeWindowButtonLabel', comment: ['&& denotes a mnemonic'] },
|
|
143
|
-
"&&Close Window"
|
|
144
|
-
));
|
|
120
|
+
(isMacintosh ? ( localizeWithPath(_moduleId, 3, "&&Quit")) : ( localizeWithPath(_moduleId, 4, "&&Exit"))) :
|
|
121
|
+
( localizeWithPath(_moduleId, 5, "&&Close Window"));
|
|
145
122
|
const res = await dialogService.confirm({
|
|
146
123
|
message,
|
|
147
124
|
primaryButton,
|
|
148
125
|
checkbox: {
|
|
149
|
-
label: ( localizeWithPath(
|
|
126
|
+
label: ( localizeWithPath(_moduleId, 6, "Do not ask me again"))
|
|
150
127
|
}
|
|
151
128
|
});
|
|
152
129
|
if (res.confirmed && res.checkboxChecked) {
|
|
@@ -155,10 +132,10 @@ let BaseWindow = class BaseWindow extends Disposable {
|
|
|
155
132
|
return res.confirmed;
|
|
156
133
|
}
|
|
157
134
|
};
|
|
158
|
-
BaseWindow = BaseWindow_1 = ( __decorate([
|
|
159
|
-
( __param(2, IHostService)),
|
|
160
|
-
( __param(3, IWorkbenchEnvironmentService))
|
|
161
|
-
], BaseWindow));
|
|
135
|
+
BaseWindow = BaseWindow_1 = ( (__decorate([
|
|
136
|
+
( (__param(2, IHostService))),
|
|
137
|
+
( (__param(3, IWorkbenchEnvironmentService)))
|
|
138
|
+
], BaseWindow)));
|
|
162
139
|
let BrowserWindow = class BrowserWindow extends BaseWindow {
|
|
163
140
|
constructor(openerService, lifecycleService, dialogService, labelService, productService, browserEnvironmentService, layoutService, instantiationService, hostService) {
|
|
164
141
|
super(mainWindow, undefined, hostService, browserEnvironmentService);
|
|
@@ -187,27 +164,19 @@ let BrowserWindow = class BrowserWindow extends BaseWindow {
|
|
|
187
164
|
this._register(addDisposableListener(this.layoutService.mainContainer, EventType.DROP, e => EventHelper.stop(e, true)));
|
|
188
165
|
}
|
|
189
166
|
onWillShutdown() {
|
|
190
|
-
Event.toPromise(Event.any(Event.once(( new DomEmitter(mainWindow.document.body, EventType.KEY_DOWN, true)).event), Event.once(( new DomEmitter(mainWindow.document.body, EventType.MOUSE_DOWN, true)).event))).then(async () => {
|
|
167
|
+
Event.toPromise(Event.any(Event.once(( (new DomEmitter(mainWindow.document.body, EventType.KEY_DOWN, true))).event), Event.once(( (new DomEmitter(mainWindow.document.body, EventType.MOUSE_DOWN, true))).event))).then(async () => {
|
|
191
168
|
await timeout(3000);
|
|
192
169
|
await this.dialogService.prompt({
|
|
193
170
|
type: Severity$1.Error,
|
|
194
171
|
message: ( localizeWithPath(
|
|
195
|
-
|
|
196
|
-
|
|
172
|
+
_moduleId,
|
|
173
|
+
7,
|
|
197
174
|
"An unexpected error occurred that requires a reload of this page."
|
|
198
175
|
)),
|
|
199
|
-
detail: ( localizeWithPath(
|
|
200
|
-
'vs/workbench/browser/window',
|
|
201
|
-
'shutdownErrorDetail',
|
|
202
|
-
"The workbench was unexpectedly disposed while running."
|
|
203
|
-
)),
|
|
176
|
+
detail: ( localizeWithPath(_moduleId, 8, "The workbench was unexpectedly disposed while running.")),
|
|
204
177
|
buttons: [
|
|
205
178
|
{
|
|
206
|
-
label: ( localizeWithPath(
|
|
207
|
-
'vs/workbench/browser/window',
|
|
208
|
-
{ key: 'reload', comment: ['&& denotes a mnemonic'] },
|
|
209
|
-
"&&Reload"
|
|
210
|
-
)),
|
|
179
|
+
label: ( localizeWithPath(_moduleId, 9, "&&Reload")),
|
|
211
180
|
run: () => mainWindow.location.reload()
|
|
212
181
|
}
|
|
213
182
|
]
|
|
@@ -244,27 +213,19 @@ let BrowserWindow = class BrowserWindow extends BaseWindow {
|
|
|
244
213
|
await this.dialogService.prompt({
|
|
245
214
|
type: Severity$1.Warning,
|
|
246
215
|
message: ( localizeWithPath(
|
|
247
|
-
|
|
248
|
-
|
|
216
|
+
_moduleId,
|
|
217
|
+
10,
|
|
249
218
|
"The browser interrupted the opening of a new tab or window. Press 'Open' to open it anyway."
|
|
250
219
|
)),
|
|
251
220
|
detail: href,
|
|
252
221
|
buttons: [
|
|
253
222
|
{
|
|
254
|
-
label: ( localizeWithPath(
|
|
255
|
-
'vs/workbench/browser/window',
|
|
256
|
-
{ key: 'open', comment: ['&& denotes a mnemonic'] },
|
|
257
|
-
"&&Open"
|
|
258
|
-
)),
|
|
223
|
+
label: ( localizeWithPath(_moduleId, 11, "&&Open")),
|
|
259
224
|
run: () => isAllowedOpener ? windowOpenPopup(href) : windowOpenNoOpener(href)
|
|
260
225
|
},
|
|
261
226
|
{
|
|
262
|
-
label: ( localizeWithPath(
|
|
263
|
-
|
|
264
|
-
{ key: 'learnMore', comment: ['&& denotes a mnemonic'] },
|
|
265
|
-
"&&Learn More"
|
|
266
|
-
)),
|
|
267
|
-
run: () => this.openerService.open(( URI.parse('https://aka.ms/allow-vscode-popup')))
|
|
227
|
+
label: ( localizeWithPath(_moduleId, 12, "&&Learn More")),
|
|
228
|
+
run: () => this.openerService.open(( (URI.parse('https://aka.ms/allow-vscode-popup'))))
|
|
268
229
|
}
|
|
269
230
|
],
|
|
270
231
|
cancelButton: true
|
|
@@ -287,38 +248,30 @@ let BrowserWindow = class BrowserWindow extends BaseWindow {
|
|
|
287
248
|
let detail;
|
|
288
249
|
const buttons = [
|
|
289
250
|
{
|
|
290
|
-
label: ( localizeWithPath(
|
|
291
|
-
'vs/workbench/browser/window',
|
|
292
|
-
{ key: 'openExternalDialogButtonRetry.v2', comment: ['&& denotes a mnemonic'] },
|
|
293
|
-
"&&Try Again"
|
|
294
|
-
)),
|
|
251
|
+
label: ( localizeWithPath(_moduleId, 13, "&&Try Again")),
|
|
295
252
|
run: () => invokeProtocolHandler()
|
|
296
253
|
}
|
|
297
254
|
];
|
|
298
255
|
if (downloadUrl !== undefined) {
|
|
299
256
|
detail = ( localizeWithPath(
|
|
300
|
-
|
|
301
|
-
|
|
257
|
+
_moduleId,
|
|
258
|
+
14,
|
|
302
259
|
"We launched {0} on your computer.\n\nIf {1} did not launch, try again or install it below.",
|
|
303
260
|
this.productService.nameLong,
|
|
304
261
|
this.productService.nameLong
|
|
305
262
|
));
|
|
306
263
|
buttons.push({
|
|
307
|
-
label: ( localizeWithPath(
|
|
308
|
-
'vs/workbench/browser/window',
|
|
309
|
-
{ key: 'openExternalDialogButtonInstall.v3', comment: ['&& denotes a mnemonic'] },
|
|
310
|
-
"&&Install"
|
|
311
|
-
)),
|
|
264
|
+
label: ( localizeWithPath(_moduleId, 15, "&&Install")),
|
|
312
265
|
run: async () => {
|
|
313
|
-
await this.openerService.open(( URI.parse(downloadUrl)));
|
|
266
|
+
await this.openerService.open(( (URI.parse(downloadUrl))));
|
|
314
267
|
showProtocolUrlOpenedDialog();
|
|
315
268
|
}
|
|
316
269
|
});
|
|
317
270
|
}
|
|
318
271
|
else {
|
|
319
272
|
detail = ( localizeWithPath(
|
|
320
|
-
|
|
321
|
-
|
|
273
|
+
_moduleId,
|
|
274
|
+
16,
|
|
322
275
|
"We launched {0} on your computer.\n\nIf {1} did not launch, try again below.",
|
|
323
276
|
this.productService.nameLong,
|
|
324
277
|
this.productService.nameLong
|
|
@@ -326,11 +279,7 @@ let BrowserWindow = class BrowserWindow extends BaseWindow {
|
|
|
326
279
|
}
|
|
327
280
|
await this.hostService.withExpectedShutdown(() => this.dialogService.prompt({
|
|
328
281
|
type: Severity$1.Info,
|
|
329
|
-
message: ( localizeWithPath(
|
|
330
|
-
'vs/workbench/browser/window',
|
|
331
|
-
'openExternalDialogTitle',
|
|
332
|
-
"All done. You can close this tab now."
|
|
333
|
-
)),
|
|
282
|
+
message: ( localizeWithPath(_moduleId, 17, "All done. You can close this tab now.")),
|
|
334
283
|
detail,
|
|
335
284
|
buttons,
|
|
336
285
|
cancelButton: true
|
|
@@ -366,16 +315,16 @@ let BrowserWindow = class BrowserWindow extends BaseWindow {
|
|
|
366
315
|
});
|
|
367
316
|
}
|
|
368
317
|
};
|
|
369
|
-
BrowserWindow = ( __decorate([
|
|
370
|
-
( __param(0, IOpenerService)),
|
|
371
|
-
( __param(1, ILifecycleService)),
|
|
372
|
-
( __param(2, IDialogService)),
|
|
373
|
-
( __param(3, ILabelService)),
|
|
374
|
-
( __param(4, IProductService)),
|
|
375
|
-
( __param(5, IBrowserWorkbenchEnvironmentService)),
|
|
376
|
-
( __param(6, IWorkbenchLayoutService)),
|
|
377
|
-
( __param(7, IInstantiationService)),
|
|
378
|
-
( __param(8, IHostService))
|
|
379
|
-
], BrowserWindow));
|
|
318
|
+
BrowserWindow = ( (__decorate([
|
|
319
|
+
( (__param(0, IOpenerService))),
|
|
320
|
+
( (__param(1, ILifecycleService))),
|
|
321
|
+
( (__param(2, IDialogService))),
|
|
322
|
+
( (__param(3, ILabelService))),
|
|
323
|
+
( (__param(4, IProductService))),
|
|
324
|
+
( (__param(5, IBrowserWorkbenchEnvironmentService))),
|
|
325
|
+
( (__param(6, IWorkbenchLayoutService))),
|
|
326
|
+
( (__param(7, IInstantiationService))),
|
|
327
|
+
( (__param(8, IHostService)))
|
|
328
|
+
], BrowserWindow)));
|
|
380
329
|
|
|
381
330
|
export { BaseWindow, BrowserWindow };
|
|
@@ -20,25 +20,14 @@ import { registerIcon } from 'vscode/vscode/vs/platform/theme/common/iconRegistr
|
|
|
20
20
|
import { isCancellationError } from 'vscode/vscode/vs/base/common/errors';
|
|
21
21
|
|
|
22
22
|
var CallHierarchyController_1;
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
))));
|
|
28
|
-
const _ctxCallHierarchyVisible = ( new RawContextKey('callHierarchyVisible', false, ( localizeWithPath(
|
|
29
|
-
'vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution',
|
|
30
|
-
'callHierarchyVisible',
|
|
31
|
-
'Whether call hierarchy peek is currently showing'
|
|
32
|
-
))));
|
|
33
|
-
const _ctxCallHierarchyDirection = ( new RawContextKey(
|
|
23
|
+
const _moduleId = "vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution";
|
|
24
|
+
const _ctxHasCallHierarchyProvider = ( (new RawContextKey('editorHasCallHierarchyProvider', false, ( localizeWithPath(_moduleId, 0, 'Whether a call hierarchy provider is available')))));
|
|
25
|
+
const _ctxCallHierarchyVisible = ( (new RawContextKey('callHierarchyVisible', false, ( localizeWithPath(_moduleId, 1, 'Whether call hierarchy peek is currently showing')))));
|
|
26
|
+
const _ctxCallHierarchyDirection = ( (new RawContextKey(
|
|
34
27
|
'callHierarchyDirection',
|
|
35
28
|
undefined,
|
|
36
|
-
{ type: 'string', description: ( localizeWithPath(
|
|
37
|
-
|
|
38
|
-
'callHierarchyDirection',
|
|
39
|
-
'Whether call hierarchy shows incoming or outgoing calls'
|
|
40
|
-
)) }
|
|
41
|
-
));
|
|
29
|
+
{ type: 'string', description: ( localizeWithPath(_moduleId, 2, 'Whether call hierarchy shows incoming or outgoing calls')) }
|
|
30
|
+
)));
|
|
42
31
|
function sanitizedDirection(candidate) {
|
|
43
32
|
return candidate === "outgoingCalls" || candidate === "incomingCalls"
|
|
44
33
|
? candidate
|
|
@@ -57,13 +46,13 @@ let CallHierarchyController = class CallHierarchyController {
|
|
|
57
46
|
this._storageService = _storageService;
|
|
58
47
|
this._editorService = _editorService;
|
|
59
48
|
this._instantiationService = _instantiationService;
|
|
60
|
-
this._dispoables = ( new DisposableStore());
|
|
61
|
-
this._sessionDisposables = ( new DisposableStore());
|
|
49
|
+
this._dispoables = ( (new DisposableStore()));
|
|
50
|
+
this._sessionDisposables = ( (new DisposableStore()));
|
|
62
51
|
this._ctxIsVisible = _ctxCallHierarchyVisible.bindTo(this._contextKeyService);
|
|
63
52
|
this._ctxHasProvider = _ctxHasCallHierarchyProvider.bindTo(this._contextKeyService);
|
|
64
53
|
this._ctxDirection = _ctxCallHierarchyDirection.bindTo(this._contextKeyService);
|
|
65
54
|
this._dispoables.add(Event.any(_editor.onDidChangeModel, _editor.onDidChangeModelLanguage, CallHierarchyProviderRegistry.onDidChange)(() => {
|
|
66
|
-
this._ctxHasProvider.set(_editor.hasModel() && ( CallHierarchyProviderRegistry.has(_editor.getModel())));
|
|
55
|
+
this._ctxHasProvider.set(_editor.hasModel() && ( (CallHierarchyProviderRegistry.has(_editor.getModel()))));
|
|
67
56
|
}));
|
|
68
57
|
this._dispoables.add(this._sessionDisposables);
|
|
69
58
|
}
|
|
@@ -79,10 +68,10 @@ let CallHierarchyController = class CallHierarchyController {
|
|
|
79
68
|
}
|
|
80
69
|
const document = this._editor.getModel();
|
|
81
70
|
const position = this._editor.getPosition();
|
|
82
|
-
if (!( CallHierarchyProviderRegistry.has(document))) {
|
|
71
|
+
if (!( (CallHierarchyProviderRegistry.has(document)))) {
|
|
83
72
|
return;
|
|
84
73
|
}
|
|
85
|
-
const cts = ( new CancellationTokenSource());
|
|
74
|
+
const cts = ( (new CancellationTokenSource()));
|
|
86
75
|
const model = CallHierarchyModel.create(document, position, cts.token);
|
|
87
76
|
const direction = sanitizedDirection(this._storageService.get(CallHierarchyController_1._StorageDirection, 0 , "incomingCalls" ));
|
|
88
77
|
this._showCallHierarchyWidget(position, direction, model, cts);
|
|
@@ -102,7 +91,7 @@ let CallHierarchyController = class CallHierarchyController {
|
|
|
102
91
|
}
|
|
103
92
|
const newModel = model.fork(call.item);
|
|
104
93
|
this._sessionDisposables.clear();
|
|
105
|
-
CallHierarchyController_1.get(newEditor)?._showCallHierarchyWidget(Range.lift(newModel.root.selectionRange).getStartPosition(), this._widget.direction, Promise.resolve(newModel), ( new CancellationTokenSource()));
|
|
94
|
+
CallHierarchyController_1.get(newEditor)?._showCallHierarchyWidget(Range.lift(newModel.root.selectionRange).getStartPosition(), this._widget.direction, Promise.resolve(newModel), ( (new CancellationTokenSource())));
|
|
106
95
|
}
|
|
107
96
|
_showCallHierarchyWidget(position, direction, model, cts) {
|
|
108
97
|
this._ctxIsVisible.set(true);
|
|
@@ -125,22 +114,14 @@ let CallHierarchyController = class CallHierarchyController {
|
|
|
125
114
|
this._widget.showModel(model);
|
|
126
115
|
}
|
|
127
116
|
else {
|
|
128
|
-
this._widget.showMessage(( localizeWithPath(
|
|
129
|
-
'vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution',
|
|
130
|
-
'no.item',
|
|
131
|
-
"No results"
|
|
132
|
-
)));
|
|
117
|
+
this._widget.showMessage(( localizeWithPath(_moduleId, 3, "No results")));
|
|
133
118
|
}
|
|
134
119
|
}).catch(err => {
|
|
135
120
|
if (isCancellationError(err)) {
|
|
136
121
|
this.endCallHierarchy();
|
|
137
122
|
return;
|
|
138
123
|
}
|
|
139
|
-
this._widget.showMessage(( localizeWithPath(
|
|
140
|
-
'vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution',
|
|
141
|
-
'error',
|
|
142
|
-
"Failed to show call hierarchy"
|
|
143
|
-
)));
|
|
124
|
+
this._widget.showMessage(( localizeWithPath(_moduleId, 4, "Failed to show call hierarchy")));
|
|
144
125
|
});
|
|
145
126
|
}
|
|
146
127
|
showOutgoingCalls() {
|
|
@@ -157,34 +138,34 @@ let CallHierarchyController = class CallHierarchyController {
|
|
|
157
138
|
this._editor.focus();
|
|
158
139
|
}
|
|
159
140
|
};
|
|
160
|
-
CallHierarchyController = CallHierarchyController_1 = ( __decorate([
|
|
161
|
-
( __param(1, IContextKeyService)),
|
|
162
|
-
( __param(2, IStorageService)),
|
|
163
|
-
( __param(3, ICodeEditorService)),
|
|
164
|
-
( __param(4, IInstantiationService))
|
|
165
|
-
], CallHierarchyController));
|
|
141
|
+
CallHierarchyController = CallHierarchyController_1 = ( (__decorate([
|
|
142
|
+
( (__param(1, IContextKeyService))),
|
|
143
|
+
( (__param(2, IStorageService))),
|
|
144
|
+
( (__param(3, ICodeEditorService))),
|
|
145
|
+
( (__param(4, IInstantiationService)))
|
|
146
|
+
], CallHierarchyController)));
|
|
166
147
|
registerEditorContribution(CallHierarchyController.Id, CallHierarchyController, 0 );
|
|
167
148
|
registerAction2(class PeekCallHierarchyAction extends EditorAction2 {
|
|
168
149
|
constructor() {
|
|
169
150
|
super({
|
|
170
151
|
id: 'editor.showCallHierarchy',
|
|
171
|
-
title: ( localize2WithPath(
|
|
172
|
-
'vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution',
|
|
173
|
-
'title',
|
|
174
|
-
'Peek Call Hierarchy'
|
|
175
|
-
)),
|
|
152
|
+
title: ( localize2WithPath(_moduleId, 5, 'Peek Call Hierarchy')),
|
|
176
153
|
menu: {
|
|
177
154
|
id: MenuId.EditorContextPeek,
|
|
178
155
|
group: 'navigation',
|
|
179
156
|
order: 1000,
|
|
180
|
-
when: ( ContextKeyExpr.and(
|
|
157
|
+
when: ( (ContextKeyExpr.and(
|
|
158
|
+
_ctxHasCallHierarchyProvider,
|
|
159
|
+
PeekContext.notInPeekEditor,
|
|
160
|
+
(EditorContextKeys.isInEmbeddedEditor.toNegated())
|
|
161
|
+
))),
|
|
181
162
|
},
|
|
182
163
|
keybinding: {
|
|
183
164
|
when: EditorContextKeys.editorTextFocus,
|
|
184
165
|
weight: 200 ,
|
|
185
166
|
primary: 1024 + 512 + 38
|
|
186
167
|
},
|
|
187
|
-
precondition: ( ContextKeyExpr.and(_ctxHasCallHierarchyProvider, PeekContext.notInPeekEditor)),
|
|
168
|
+
precondition: ( (ContextKeyExpr.and(_ctxHasCallHierarchyProvider, PeekContext.notInPeekEditor))),
|
|
188
169
|
f1: true
|
|
189
170
|
});
|
|
190
171
|
}
|
|
@@ -196,24 +177,19 @@ registerAction2(class extends EditorAction2 {
|
|
|
196
177
|
constructor() {
|
|
197
178
|
super({
|
|
198
179
|
id: 'editor.showIncomingCalls',
|
|
199
|
-
title: ( localize2WithPath(
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
icon: registerIcon('callhierarchy-incoming', Codicon.callIncoming, ( localizeWithPath(
|
|
205
|
-
'vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution',
|
|
206
|
-
'showIncomingCallsIcons',
|
|
207
|
-
'Icon for incoming calls in the call hierarchy view.'
|
|
180
|
+
title: ( localize2WithPath(_moduleId, 6, 'Show Incoming Calls')),
|
|
181
|
+
icon: registerIcon('callhierarchy-incoming', Codicon.callIncoming, ( localizeWithPath(_moduleId, 7, 'Icon for incoming calls in the call hierarchy view.'))),
|
|
182
|
+
precondition: ( (ContextKeyExpr.and(
|
|
183
|
+
_ctxCallHierarchyVisible,
|
|
184
|
+
(_ctxCallHierarchyDirection.isEqualTo("outgoingCalls" ))
|
|
208
185
|
))),
|
|
209
|
-
precondition: ( ContextKeyExpr.and(_ctxCallHierarchyVisible, ( _ctxCallHierarchyDirection.isEqualTo("outgoingCalls" )))),
|
|
210
186
|
keybinding: {
|
|
211
187
|
weight: 200 ,
|
|
212
188
|
primary: 1024 + 512 + 38 ,
|
|
213
189
|
},
|
|
214
190
|
menu: {
|
|
215
191
|
id: CallHierarchyTreePeekWidget.TitleMenu,
|
|
216
|
-
when: ( _ctxCallHierarchyDirection.isEqualTo("outgoingCalls" )),
|
|
192
|
+
when: ( (_ctxCallHierarchyDirection.isEqualTo("outgoingCalls" ))),
|
|
217
193
|
order: 1,
|
|
218
194
|
}
|
|
219
195
|
});
|
|
@@ -226,24 +202,19 @@ registerAction2(class extends EditorAction2 {
|
|
|
226
202
|
constructor() {
|
|
227
203
|
super({
|
|
228
204
|
id: 'editor.showOutgoingCalls',
|
|
229
|
-
title: ( localize2WithPath(
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
icon: registerIcon('callhierarchy-outgoing', Codicon.callOutgoing, ( localizeWithPath(
|
|
235
|
-
'vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution',
|
|
236
|
-
'showOutgoingCallsIcon',
|
|
237
|
-
'Icon for outgoing calls in the call hierarchy view.'
|
|
205
|
+
title: ( localize2WithPath(_moduleId, 8, 'Show Outgoing Calls')),
|
|
206
|
+
icon: registerIcon('callhierarchy-outgoing', Codicon.callOutgoing, ( localizeWithPath(_moduleId, 9, 'Icon for outgoing calls in the call hierarchy view.'))),
|
|
207
|
+
precondition: ( (ContextKeyExpr.and(
|
|
208
|
+
_ctxCallHierarchyVisible,
|
|
209
|
+
(_ctxCallHierarchyDirection.isEqualTo("incomingCalls" ))
|
|
238
210
|
))),
|
|
239
|
-
precondition: ( ContextKeyExpr.and(_ctxCallHierarchyVisible, ( _ctxCallHierarchyDirection.isEqualTo("incomingCalls" )))),
|
|
240
211
|
keybinding: {
|
|
241
212
|
weight: 200 ,
|
|
242
213
|
primary: 1024 + 512 + 38 ,
|
|
243
214
|
},
|
|
244
215
|
menu: {
|
|
245
216
|
id: CallHierarchyTreePeekWidget.TitleMenu,
|
|
246
|
-
when: ( _ctxCallHierarchyDirection.isEqualTo("incomingCalls" )),
|
|
217
|
+
when: ( (_ctxCallHierarchyDirection.isEqualTo("incomingCalls" ))),
|
|
247
218
|
order: 1
|
|
248
219
|
}
|
|
249
220
|
});
|
|
@@ -256,11 +227,7 @@ registerAction2(class extends EditorAction2 {
|
|
|
256
227
|
constructor() {
|
|
257
228
|
super({
|
|
258
229
|
id: 'editor.refocusCallHierarchy',
|
|
259
|
-
title: ( localize2WithPath(
|
|
260
|
-
'vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution',
|
|
261
|
-
'title.refocus',
|
|
262
|
-
'Refocus Call Hierarchy'
|
|
263
|
-
)),
|
|
230
|
+
title: ( localize2WithPath(_moduleId, 10, 'Refocus Call Hierarchy')),
|
|
264
231
|
precondition: _ctxCallHierarchyVisible,
|
|
265
232
|
keybinding: {
|
|
266
233
|
weight: 200 ,
|
|
@@ -276,11 +243,7 @@ registerAction2(class extends EditorAction2 {
|
|
|
276
243
|
constructor() {
|
|
277
244
|
super({
|
|
278
245
|
id: 'editor.closeCallHierarchy',
|
|
279
|
-
title: ( localizeWithPath(
|
|
280
|
-
'vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution',
|
|
281
|
-
'close',
|
|
282
|
-
'Close'
|
|
283
|
-
)),
|
|
246
|
+
title: ( localizeWithPath(_moduleId, 11, 'Close')),
|
|
284
247
|
icon: Codicon.close,
|
|
285
248
|
precondition: _ctxCallHierarchyVisible,
|
|
286
249
|
keybinding: {
|
|
@@ -25,6 +25,7 @@ import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/
|
|
|
25
25
|
import { createAndFillInActionBarActions } from 'vscode/vscode/vs/platform/actions/browser/menuEntryActionViewItem';
|
|
26
26
|
|
|
27
27
|
var CallHierarchyTreePeekWidget_1;
|
|
28
|
+
const _moduleId = "vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek";
|
|
28
29
|
class LayoutInfo {
|
|
29
30
|
static store(info, storageService) {
|
|
30
31
|
storageService.store('callHierarchyPeekLayout', JSON.stringify(info), 0 , 1 );
|
|
@@ -48,7 +49,7 @@ class CallHierarchyTree extends WorkbenchAsyncDataTree {
|
|
|
48
49
|
}
|
|
49
50
|
let CallHierarchyTreePeekWidget = class CallHierarchyTreePeekWidget extends PeekViewWidget {
|
|
50
51
|
static { CallHierarchyTreePeekWidget_1 = this; }
|
|
51
|
-
static { this.TitleMenu = ( new MenuId('callhierarchy/title')); }
|
|
52
|
+
static { this.TitleMenu = ( (new MenuId('callhierarchy/title'))); }
|
|
52
53
|
constructor(editor, _where, _direction, themeService, _peekViewService, _editorService, _textModelService, _storageService, _menuService, _contextKeyService, _instantiationService) {
|
|
53
54
|
super(editor, { showFrame: true, showArrow: true, isResizeable: true, isAccessible: true }, _instantiationService);
|
|
54
55
|
this._where = _where;
|
|
@@ -60,8 +61,8 @@ let CallHierarchyTreePeekWidget = class CallHierarchyTreePeekWidget extends Peek
|
|
|
60
61
|
this._menuService = _menuService;
|
|
61
62
|
this._contextKeyService = _contextKeyService;
|
|
62
63
|
this._instantiationService = _instantiationService;
|
|
63
|
-
this._treeViewStates = ( new Map());
|
|
64
|
-
this._previewDisposable = ( new DisposableStore());
|
|
64
|
+
this._treeViewStates = ( (new Map()));
|
|
65
|
+
this._previewDisposable = ( (new DisposableStore()));
|
|
65
66
|
this.create();
|
|
66
67
|
this._peekViewService.addExclusiveWidget(editor, this);
|
|
67
68
|
this._applyTheme(themeService.getColorTheme());
|
|
@@ -103,7 +104,7 @@ let CallHierarchyTreePeekWidget = class CallHierarchyTreePeekWidget extends Peek
|
|
|
103
104
|
}
|
|
104
105
|
_fillBody(parent) {
|
|
105
106
|
this._layoutInfo = LayoutInfo.retrieve(this._storageService);
|
|
106
|
-
this._dim = ( new Dimension(0, 0));
|
|
107
|
+
this._dim = ( (new Dimension(0, 0)));
|
|
107
108
|
this._parent = parent;
|
|
108
109
|
parent.classList.add('call-hierarchy');
|
|
109
110
|
const message = document.createElement('div');
|
|
@@ -114,7 +115,7 @@ let CallHierarchyTreePeekWidget = class CallHierarchyTreePeekWidget extends Peek
|
|
|
114
115
|
const container = document.createElement('div');
|
|
115
116
|
container.classList.add('results');
|
|
116
117
|
parent.appendChild(container);
|
|
117
|
-
this._splitView = ( new SplitView(container, { orientation: 1 }));
|
|
118
|
+
this._splitView = ( (new SplitView(container, { orientation: 1 })));
|
|
118
119
|
const editorContainer = document.createElement('div');
|
|
119
120
|
editorContainer.classList.add('editor');
|
|
120
121
|
container.appendChild(editorContainer);
|
|
@@ -245,7 +246,7 @@ let CallHierarchyTreePeekWidget = class CallHierarchyTreePeekWidget extends Peek
|
|
|
245
246
|
locations = [{ uri: element.item.uri, range: element.item.selectionRange }];
|
|
246
247
|
}
|
|
247
248
|
for (const loc of locations) {
|
|
248
|
-
if (( loc.uri.toString()) === ( previewUri.toString())) {
|
|
249
|
+
if (( (loc.uri.toString())) === ( (previewUri.toString()))) {
|
|
249
250
|
decorations.push({ range: loc.range, options });
|
|
250
251
|
fullRange = !fullRange ? loc.range : Range.plusRange(loc.range, fullRange);
|
|
251
252
|
}
|
|
@@ -257,27 +258,13 @@ let CallHierarchyTreePeekWidget = class CallHierarchyTreePeekWidget extends Peek
|
|
|
257
258
|
}
|
|
258
259
|
this._previewDisposable.add(value);
|
|
259
260
|
const title = this._direction === "outgoingCalls"
|
|
260
|
-
? ( localizeWithPath(
|
|
261
|
-
'
|
|
262
|
-
'callFrom',
|
|
263
|
-
"Calls from '{0}'",
|
|
264
|
-
element.model.root.name
|
|
265
|
-
))
|
|
266
|
-
: ( localizeWithPath(
|
|
267
|
-
'vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek',
|
|
268
|
-
'callsTo',
|
|
269
|
-
"Callers of '{0}'",
|
|
270
|
-
element.model.root.name
|
|
271
|
-
));
|
|
261
|
+
? ( localizeWithPath(_moduleId, 0, "Calls from '{0}'", element.model.root.name))
|
|
262
|
+
: ( localizeWithPath(_moduleId, 1, "Callers of '{0}'", element.model.root.name));
|
|
272
263
|
this.setTitle(title);
|
|
273
264
|
}
|
|
274
265
|
showLoading() {
|
|
275
266
|
this._parent.dataset['state'] = "loading" ;
|
|
276
|
-
this.setTitle(( localizeWithPath(
|
|
277
|
-
'vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek',
|
|
278
|
-
'title.loading',
|
|
279
|
-
"Loading..."
|
|
280
|
-
)));
|
|
267
|
+
this.setTitle(( localizeWithPath(_moduleId, 2, "Loading...")));
|
|
281
268
|
this._show();
|
|
282
269
|
}
|
|
283
270
|
showMessage(message) {
|
|
@@ -296,18 +283,8 @@ let CallHierarchyTreePeekWidget = class CallHierarchyTreePeekWidget extends Peek
|
|
|
296
283
|
await this._tree.expand(root.element);
|
|
297
284
|
if (root.children.length === 0) {
|
|
298
285
|
this.showMessage(this._direction === "outgoingCalls"
|
|
299
|
-
? ( localizeWithPath(
|
|
300
|
-
'
|
|
301
|
-
'empt.callsFrom',
|
|
302
|
-
"No calls from '{0}'",
|
|
303
|
-
model.root.name
|
|
304
|
-
))
|
|
305
|
-
: ( localizeWithPath(
|
|
306
|
-
'vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek',
|
|
307
|
-
'empt.callsTo',
|
|
308
|
-
"No callers of '{0}'",
|
|
309
|
-
model.root.name
|
|
310
|
-
)));
|
|
286
|
+
? ( localizeWithPath(_moduleId, 3, "No calls from '{0}'", model.root.name))
|
|
287
|
+
: ( localizeWithPath(_moduleId, 4, "No callers of '{0}'", model.root.name)));
|
|
311
288
|
}
|
|
312
289
|
else {
|
|
313
290
|
this._parent.dataset['state'] = "data" ;
|
|
@@ -346,22 +323,22 @@ let CallHierarchyTreePeekWidget = class CallHierarchyTreePeekWidget extends Peek
|
|
|
346
323
|
_doLayoutBody(height, width) {
|
|
347
324
|
if (this._dim.height !== height || this._dim.width !== width) {
|
|
348
325
|
super._doLayoutBody(height, width);
|
|
349
|
-
this._dim = ( new Dimension(width, height));
|
|
326
|
+
this._dim = ( (new Dimension(width, height)));
|
|
350
327
|
this._layoutInfo.height = this._viewZone ? this._viewZone.heightInLines : this._layoutInfo.height;
|
|
351
328
|
this._splitView.layout(width);
|
|
352
329
|
this._splitView.resizeView(0, width * this._layoutInfo.ratio);
|
|
353
330
|
}
|
|
354
331
|
}
|
|
355
332
|
};
|
|
356
|
-
CallHierarchyTreePeekWidget = CallHierarchyTreePeekWidget_1 = ( __decorate([
|
|
357
|
-
( __param(3, IThemeService)),
|
|
358
|
-
( __param(4, IPeekViewService)),
|
|
359
|
-
( __param(5, IEditorService)),
|
|
360
|
-
( __param(6, ITextModelService)),
|
|
361
|
-
( __param(7, IStorageService)),
|
|
362
|
-
( __param(8, IMenuService)),
|
|
363
|
-
( __param(9, IContextKeyService)),
|
|
364
|
-
( __param(10, IInstantiationService))
|
|
365
|
-
], CallHierarchyTreePeekWidget));
|
|
333
|
+
CallHierarchyTreePeekWidget = CallHierarchyTreePeekWidget_1 = ( (__decorate([
|
|
334
|
+
( (__param(3, IThemeService))),
|
|
335
|
+
( (__param(4, IPeekViewService))),
|
|
336
|
+
( (__param(5, IEditorService))),
|
|
337
|
+
( (__param(6, ITextModelService))),
|
|
338
|
+
( (__param(7, IStorageService))),
|
|
339
|
+
( (__param(8, IMenuService))),
|
|
340
|
+
( (__param(9, IContextKeyService))),
|
|
341
|
+
( (__param(10, IInstantiationService)))
|
|
342
|
+
], CallHierarchyTreePeekWidget)));
|
|
366
343
|
|
|
367
344
|
export { CallHierarchyTreePeekWidget };
|