@codingame/monaco-vscode-views-service-override 1.83.4 → 1.83.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +8 -3
- package/index.js +7 -1
- package/l10n.js +8 -0
- package/missing-services.js +2141 -0
- package/package.json +2 -2
- package/services.js +95 -0
- package/views.d.ts +51 -15
- package/views.js +124 -96
- package/vscode/src/vs/base/browser/ui/tree/treeDefaults.js +1 -1
- package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +262 -49
- package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarActions.js +57 -42
- package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.js +51 -11
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.js +14 -2
- package/vscode/src/vs/workbench/browser/parts/compositeBar.js +5 -1
- package/vscode/src/vs/workbench/browser/parts/compositePart.js +18 -3
- package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbsControl.js +52 -20
- package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbsPicker.js +5 -1
- package/vscode/src/vs/workbench/browser/parts/editor/editorDropTarget.js +6 -1
- package/vscode/src/vs/workbench/browser/parts/editor/editorGroupView.js +23 -4
- package/vscode/src/vs/workbench/browser/parts/editor/editorGroupWatermark.js +60 -12
- package/vscode/src/vs/workbench/browser/parts/editor/editorPane.d.ts +112 -0
- package/vscode/src/vs/workbench/browser/parts/editor/editorPanes.js +11 -2
- package/vscode/src/vs/workbench/browser/parts/editor/editorTabsControl.js +12 -2
- package/vscode/src/vs/workbench/browser/parts/editor/multiEditorTabsControl.js +5 -4
- package/vscode/src/vs/workbench/browser/parts/panel/panelPart.js +27 -15
- package/vscode/src/vs/workbench/browser/parts/views/checkbox.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/views/treeView.js +32 -19
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +58 -18
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +29 -5
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.js +17 -3
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.js +55 -10
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/outline/documentSymbolsOutline.js +5 -3
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/outline/documentSymbolsTree.js +22 -3
- package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.js +5 -1
- package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.js +40 -8
- package/vscode/src/vs/workbench/contrib/files/browser/editors/binaryFileEditor.js +5 -1
- package/vscode/src/vs/workbench/contrib/files/browser/editors/textFileEditor.js +36 -10
- package/vscode/src/vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler.js +111 -16
- package/vscode/src/vs/workbench/contrib/files/browser/fileActions.contribution.js +153 -97
- package/vscode/src/vs/workbench/contrib/files/browser/fileCommands.js +28 -6
- package/vscode/src/vs/workbench/contrib/files/browser/files.contribution2.js +11 -463
- package/vscode/src/vs/workbench/contrib/files/browser/workspaceWatcher.js +16 -4
- package/vscode/src/vs/workbench/contrib/files/common/dirtyFilesIndicator.js +10 -4
- package/vscode/src/vs/workbench/contrib/languageDetection/browser/languageDetection.contribution.js +27 -5
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.js +53 -28
- package/vscode/src/vs/workbench/contrib/outline/browser/outline.contribution.js +180 -36
- package/vscode/src/vs/workbench/contrib/outline/browser/outlinePane.js +17 -3
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteExplorer.js +29 -5
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteIcons.js +85 -17
- package/vscode/src/vs/workbench/contrib/remote/browser/tunnelView.js +301 -62
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.js +48 -16
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +29 -5
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.js +17 -3
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +6 -1
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.js +25 -5
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.js +5 -1
- package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.js +49 -9
- package/vscode/src/vs/workbench/services/history/browser/historyService.js +36 -36
- package/vscode/src/vs/workbench/services/hover/browser/hoverWidget.js +6 -1
- package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfileIcons.js +5 -1
- package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +14 -5
- package/vscode/src/vs/workbench/services/views/common/viewContainerModel.js +5 -1
|
@@ -11,19 +11,67 @@ import { h, append, $, clearNode } from 'monaco-editor/esm/vs/base/browser/dom.j
|
|
|
11
11
|
import { CommandsRegistry } from 'monaco-editor/esm/vs/platform/commands/common/commands.js';
|
|
12
12
|
import { ContextKeyExpr, IContextKeyService } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
|
|
13
13
|
|
|
14
|
-
const showCommands = { text: nls.localizeWithPath(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
|
|
14
|
+
const showCommands = { text: ( nls.localizeWithPath(
|
|
15
|
+
'vs/workbench/browser/parts/editor/editorGroupWatermark',
|
|
16
|
+
'watermark.showCommands',
|
|
17
|
+
"Show All Commands"
|
|
18
|
+
)), id: 'workbench.action.showCommands' };
|
|
19
|
+
const quickAccess = { text: ( nls.localizeWithPath(
|
|
20
|
+
'vs/workbench/browser/parts/editor/editorGroupWatermark',
|
|
21
|
+
'watermark.quickAccess',
|
|
22
|
+
"Go to File"
|
|
23
|
+
)), id: 'workbench.action.quickOpen' };
|
|
24
|
+
const openFileNonMacOnly = { text: ( nls.localizeWithPath(
|
|
25
|
+
'vs/workbench/browser/parts/editor/editorGroupWatermark',
|
|
26
|
+
'watermark.openFile',
|
|
27
|
+
"Open File"
|
|
28
|
+
)), id: 'workbench.action.files.openFile', mac: false };
|
|
29
|
+
const openFolderNonMacOnly = { text: ( nls.localizeWithPath(
|
|
30
|
+
'vs/workbench/browser/parts/editor/editorGroupWatermark',
|
|
31
|
+
'watermark.openFolder',
|
|
32
|
+
"Open Folder"
|
|
33
|
+
)), id: 'workbench.action.files.openFolder', mac: false };
|
|
34
|
+
const openFileOrFolderMacOnly = { text: ( nls.localizeWithPath(
|
|
35
|
+
'vs/workbench/browser/parts/editor/editorGroupWatermark',
|
|
36
|
+
'watermark.openFileFolder',
|
|
37
|
+
"Open File or Folder"
|
|
38
|
+
)), id: 'workbench.action.files.openFileFolder', mac: true };
|
|
39
|
+
const openRecent = { text: ( nls.localizeWithPath(
|
|
40
|
+
'vs/workbench/browser/parts/editor/editorGroupWatermark',
|
|
41
|
+
'watermark.openRecent',
|
|
42
|
+
"Open Recent"
|
|
43
|
+
)), id: 'workbench.action.openRecent' };
|
|
44
|
+
const newUntitledFile = { text: ( nls.localizeWithPath(
|
|
45
|
+
'vs/workbench/browser/parts/editor/editorGroupWatermark',
|
|
46
|
+
'watermark.newUntitledFile',
|
|
47
|
+
"New Untitled Text File"
|
|
48
|
+
)), id: 'workbench.action.files.newUntitledFile' };
|
|
21
49
|
const newUntitledFileMacOnly = Object.assign({ mac: true }, newUntitledFile);
|
|
22
|
-
const findInFiles = { text: nls.localizeWithPath(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
50
|
+
const findInFiles = { text: ( nls.localizeWithPath(
|
|
51
|
+
'vs/workbench/browser/parts/editor/editorGroupWatermark',
|
|
52
|
+
'watermark.findInFiles',
|
|
53
|
+
"Find in Files"
|
|
54
|
+
)), id: 'workbench.action.findInFiles' };
|
|
55
|
+
const toggleTerminal = { text: ( nls.localizeWithPath(
|
|
56
|
+
'vs/workbench/browser/parts/editor/editorGroupWatermark',
|
|
57
|
+
{ key: 'watermark.toggleTerminal', comment: ['toggle is a verb here'] },
|
|
58
|
+
"Toggle Terminal"
|
|
59
|
+
)), id: 'workbench.action.terminal.toggleTerminal', when: ( ContextKeyExpr.equals('terminalProcessSupported', true)) };
|
|
60
|
+
const startDebugging = { text: ( nls.localizeWithPath(
|
|
61
|
+
'vs/workbench/browser/parts/editor/editorGroupWatermark',
|
|
62
|
+
'watermark.startDebugging',
|
|
63
|
+
"Start Debugging"
|
|
64
|
+
)), id: 'workbench.action.debug.start', when: ( ContextKeyExpr.equals('terminalProcessSupported', true)) };
|
|
65
|
+
const toggleFullscreen = { text: ( nls.localizeWithPath(
|
|
66
|
+
'vs/workbench/browser/parts/editor/editorGroupWatermark',
|
|
67
|
+
{ key: 'watermark.toggleFullscreen', comment: ['toggle is a verb here'] },
|
|
68
|
+
"Toggle Full Screen"
|
|
69
|
+
)), id: 'workbench.action.toggleFullScreen', when: ( ( ContextKeyExpr.equals('terminalProcessSupported', true)).negate()) };
|
|
70
|
+
const showSettings = { text: ( nls.localizeWithPath(
|
|
71
|
+
'vs/workbench/browser/parts/editor/editorGroupWatermark',
|
|
72
|
+
'watermark.showSettings',
|
|
73
|
+
"Show Settings"
|
|
74
|
+
)), id: 'workbench.action.openSettings', when: ( ( ContextKeyExpr.equals('terminalProcessSupported', true)).negate()) };
|
|
27
75
|
const noFolderEntries = [
|
|
28
76
|
showCommands,
|
|
29
77
|
openFileNonMacOnly,
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { Composite } from 'vscode/vscode/vs/workbench/browser/composite';
|
|
2
|
+
import { IEditorPane, IEditorOpenContext, IEditorMemento } from 'vscode/vscode/vs/workbench/common/editor';
|
|
3
|
+
import { EditorInput } from 'vscode/vscode/vs/workbench/common/editor/editorInput';
|
|
4
|
+
import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry';
|
|
5
|
+
import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService';
|
|
6
|
+
import { CancellationToken } from 'vscode/vscode/vs/base/common/cancellation';
|
|
7
|
+
import { IEditorGroup, IEditorGroupsService } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService';
|
|
8
|
+
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
9
|
+
import { Event, Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
10
|
+
import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
11
|
+
import { IEditorOptions } from 'vscode/vscode/vs/platform/editor/common/editor';
|
|
12
|
+
import { ITextResourceConfigurationService } from 'vscode/vscode/vs/editor/common/services/textResourceConfiguration';
|
|
13
|
+
import { IBoundarySashes } from 'vscode/vscode/vs/base/browser/ui/sash/sash';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The base class of editors in the workbench. Editors register themselves for specific editor inputs.
|
|
17
|
+
* Editors are layed out in the editor part of the workbench in editor groups. Multiple editors can be
|
|
18
|
+
* open at the same time. Each editor has a minimized representation that is good enough to provide some
|
|
19
|
+
* information about the state of the editor data.
|
|
20
|
+
*
|
|
21
|
+
* The workbench will keep an editor alive after it has been created and show/hide it based on
|
|
22
|
+
* user interaction. The lifecycle of a editor goes in the order:
|
|
23
|
+
*
|
|
24
|
+
* - `createEditor()`
|
|
25
|
+
* - `setEditorVisible()`
|
|
26
|
+
* - `layout()`
|
|
27
|
+
* - `setInput()`
|
|
28
|
+
* - `focus()`
|
|
29
|
+
* - `dispose()`: when the editor group the editor is in closes
|
|
30
|
+
*
|
|
31
|
+
* During use of the workbench, a editor will often receive a `clearInput()`, `setEditorVisible()`, `layout()` and
|
|
32
|
+
* `focus()` calls, but only one `create()` and `dispose()` call.
|
|
33
|
+
*
|
|
34
|
+
* This class is only intended to be subclassed and not instantiated.
|
|
35
|
+
*/
|
|
36
|
+
declare abstract class EditorPane extends Composite implements IEditorPane {
|
|
37
|
+
readonly onDidChangeSizeConstraints: Event<any>;
|
|
38
|
+
protected readonly _onDidChangeControl: Emitter<void>;
|
|
39
|
+
readonly onDidChangeControl: Event<void>;
|
|
40
|
+
private static readonly EDITOR_MEMENTOS;
|
|
41
|
+
get minimumWidth(): number;
|
|
42
|
+
get maximumWidth(): number;
|
|
43
|
+
get minimumHeight(): number;
|
|
44
|
+
get maximumHeight(): number;
|
|
45
|
+
protected _input: EditorInput | undefined;
|
|
46
|
+
get input(): EditorInput | undefined;
|
|
47
|
+
protected _options: IEditorOptions | undefined;
|
|
48
|
+
get options(): IEditorOptions | undefined;
|
|
49
|
+
private _group;
|
|
50
|
+
get group(): IEditorGroup | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* Should be overridden by editors that have their own ScopedContextKeyService
|
|
53
|
+
*/
|
|
54
|
+
get scopedContextKeyService(): IContextKeyService | undefined;
|
|
55
|
+
constructor(id: string, telemetryService: ITelemetryService, themeService: IThemeService, storageService: IStorageService);
|
|
56
|
+
create(parent: HTMLElement): void;
|
|
57
|
+
/**
|
|
58
|
+
* Called to create the editor in the parent HTMLElement. Subclasses implement
|
|
59
|
+
* this method to construct the editor widget.
|
|
60
|
+
*/
|
|
61
|
+
protected abstract createEditor(parent: HTMLElement): void;
|
|
62
|
+
/**
|
|
63
|
+
* Note: Clients should not call this method, the workbench calls this
|
|
64
|
+
* method. Calling it otherwise may result in unexpected behavior.
|
|
65
|
+
*
|
|
66
|
+
* Sets the given input with the options to the editor. The input is guaranteed
|
|
67
|
+
* to be different from the previous input that was set using the `input.matches()`
|
|
68
|
+
* method.
|
|
69
|
+
*
|
|
70
|
+
* The provided context gives more information around how the editor was opened.
|
|
71
|
+
*
|
|
72
|
+
* The provided cancellation token should be used to test if the operation
|
|
73
|
+
* was cancelled.
|
|
74
|
+
*/
|
|
75
|
+
setInput(input: EditorInput, options: IEditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken): Promise<void>;
|
|
76
|
+
/**
|
|
77
|
+
* Called to indicate to the editor that the input should be cleared and
|
|
78
|
+
* resources associated with the input should be freed.
|
|
79
|
+
*
|
|
80
|
+
* This method can be called based on different contexts, e.g. when opening
|
|
81
|
+
* a different input or different editor control or when closing all editors
|
|
82
|
+
* in a group.
|
|
83
|
+
*
|
|
84
|
+
* To monitor the lifecycle of editor inputs, you should not rely on this
|
|
85
|
+
* method, rather refer to the listeners on `IEditorGroup` via `IEditorGroupsService`.
|
|
86
|
+
*/
|
|
87
|
+
clearInput(): void;
|
|
88
|
+
/**
|
|
89
|
+
* Note: Clients should not call this method, the workbench calls this
|
|
90
|
+
* method. Calling it otherwise may result in unexpected behavior.
|
|
91
|
+
*
|
|
92
|
+
* Sets the given options to the editor. Clients should apply the options
|
|
93
|
+
* to the current input.
|
|
94
|
+
*/
|
|
95
|
+
setOptions(options: IEditorOptions | undefined): void;
|
|
96
|
+
setVisible(visible: boolean, group?: IEditorGroup): void;
|
|
97
|
+
/**
|
|
98
|
+
* Indicates that the editor control got visible or hidden in a specific group. A
|
|
99
|
+
* editor instance will only ever be visible in one editor group.
|
|
100
|
+
*
|
|
101
|
+
* @param visible the state of visibility of this editor
|
|
102
|
+
* @param group the editor group this editor is in.
|
|
103
|
+
*/
|
|
104
|
+
protected setEditorVisible(visible: boolean, group: IEditorGroup | undefined): void;
|
|
105
|
+
setBoundarySashes(_sashes: IBoundarySashes): void;
|
|
106
|
+
protected getEditorMemento<T>(editorGroupService: IEditorGroupsService, configurationService: ITextResourceConfigurationService, key: string, limit?: number): IEditorMemento<T>;
|
|
107
|
+
getViewState(): object | undefined;
|
|
108
|
+
protected saveState(): void;
|
|
109
|
+
dispose(): void;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export { EditorPane };
|
|
@@ -101,7 +101,12 @@ let EditorPanes = class EditorPanes extends Disposable {
|
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
if (!message) {
|
|
104
|
-
message =
|
|
104
|
+
message = ( localizeWithPath(
|
|
105
|
+
'vs/workbench/browser/parts/editor/editorPanes',
|
|
106
|
+
'editorOpenErrorDialog',
|
|
107
|
+
"Unable to open '{0}'",
|
|
108
|
+
editor.getName()
|
|
109
|
+
));
|
|
105
110
|
}
|
|
106
111
|
const buttons = [];
|
|
107
112
|
if (errorActions && errorActions.length > 0) {
|
|
@@ -114,7 +119,11 @@ let EditorPanes = class EditorPanes extends Disposable {
|
|
|
114
119
|
}
|
|
115
120
|
else {
|
|
116
121
|
buttons.push({
|
|
117
|
-
label: localizeWithPath(
|
|
122
|
+
label: ( localizeWithPath(
|
|
123
|
+
'vs/workbench/browser/parts/editor/editorPanes',
|
|
124
|
+
{ key: 'ok', comment: ['&& denotes a mnemonic'] },
|
|
125
|
+
"&&OK"
|
|
126
|
+
)),
|
|
118
127
|
run: () => undefined
|
|
119
128
|
});
|
|
120
129
|
}
|
|
@@ -91,7 +91,11 @@ let EditorTabsControl = class EditorTabsControl extends Themable {
|
|
|
91
91
|
this.editorActionsToolbar = this._register(this.instantiationService.createInstance(WorkbenchToolBar, container, {
|
|
92
92
|
actionViewItemProvider: action => this.actionViewItemProvider(action),
|
|
93
93
|
orientation: 0 ,
|
|
94
|
-
ariaLabel: localizeWithPath(
|
|
94
|
+
ariaLabel: ( localizeWithPath(
|
|
95
|
+
'vs/workbench/browser/parts/editor/editorTabsControl',
|
|
96
|
+
'ariaLabelEditorActions',
|
|
97
|
+
"Editor actions"
|
|
98
|
+
)),
|
|
95
99
|
getKeyBinding: action => this.getKeybinding(action),
|
|
96
100
|
actionRunner: this._register(( new EditorCommandsContextActionRunner(context))),
|
|
97
101
|
anchorAlignmentProvider: () => 1 ,
|
|
@@ -182,7 +186,13 @@ let EditorTabsControl = class EditorTabsControl extends Themable {
|
|
|
182
186
|
if (this.groupView.activeEditor) {
|
|
183
187
|
let label = this.groupView.activeEditor.getName();
|
|
184
188
|
if (this.groupsView.partOptions.showTabs && this.groupView.count > 1) {
|
|
185
|
-
label =
|
|
189
|
+
label = ( localizeWithPath(
|
|
190
|
+
'vs/workbench/browser/parts/editor/editorTabsControl',
|
|
191
|
+
'draggedEditorGroup',
|
|
192
|
+
"{0} (+{1})",
|
|
193
|
+
label,
|
|
194
|
+
this.groupView.count - 1
|
|
195
|
+
));
|
|
186
196
|
}
|
|
187
197
|
applyDragImage(e, label, 'monaco-editor-group-drag-image', this.getColor(listActiveSelectionBackground), this.getColor(listActiveSelectionForeground));
|
|
188
198
|
}
|
|
@@ -525,10 +525,11 @@ let MultiEditorTabsControl = class MultiEditorTabsControl extends EditorTabsCont
|
|
|
525
525
|
groupId: this.groupView.id,
|
|
526
526
|
get editorIndex() { return that.toEditorIndex(tabIndex); }
|
|
527
527
|
}));
|
|
528
|
-
const tabActionBar = ( new ActionBar(
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
528
|
+
const tabActionBar = ( new ActionBar(tabActionsContainer, { ariaLabel: ( localizeWithPath(
|
|
529
|
+
'vs/workbench/browser/parts/editor/multiEditorTabsControl',
|
|
530
|
+
'ariaLabelTabActions',
|
|
531
|
+
"Tab actions"
|
|
532
|
+
)), actionRunner: tabActionRunner }));
|
|
532
533
|
const tabActionListener = tabActionBar.onWillRun(e => {
|
|
533
534
|
if (e.action.id === this.closeEditorAction.id) {
|
|
534
535
|
this.blockRevealActiveTabOnce();
|
|
@@ -129,7 +129,11 @@ let BasePanelPart = class BasePanelPart extends CompositePart {
|
|
|
129
129
|
const viewContainer = this.viewDescriptorService.getViewContainerById(compositeId);
|
|
130
130
|
const defaultLocation = this.viewDescriptorService.getDefaultViewContainerLocation(viewContainer);
|
|
131
131
|
if (defaultLocation !== this.viewDescriptorService.getViewContainerLocation(viewContainer)) {
|
|
132
|
-
result.push(toAction({ id: 'resetLocationAction', label:
|
|
132
|
+
result.push(toAction({ id: 'resetLocationAction', label: ( localizeWithPath(
|
|
133
|
+
'vs/workbench/browser/parts/panel/panelPart',
|
|
134
|
+
'resetLocation',
|
|
135
|
+
"Reset Location"
|
|
136
|
+
)), run: () => this.viewDescriptorService.moveViewContainerToLocation(viewContainer, defaultLocation) }));
|
|
133
137
|
}
|
|
134
138
|
else {
|
|
135
139
|
const viewContainerModel = this.viewDescriptorService.getViewContainerModel(viewContainer);
|
|
@@ -137,7 +141,11 @@ let BasePanelPart = class BasePanelPart extends CompositePart {
|
|
|
137
141
|
const viewToReset = viewContainerModel.allViewDescriptors[0];
|
|
138
142
|
const defaultContainer = this.viewDescriptorService.getDefaultContainerById(viewToReset.id);
|
|
139
143
|
if (defaultContainer !== viewContainer) {
|
|
140
|
-
result.push(toAction({ id: 'resetLocationAction', label:
|
|
144
|
+
result.push(toAction({ id: 'resetLocationAction', label: ( localizeWithPath(
|
|
145
|
+
'vs/workbench/browser/parts/panel/panelPart',
|
|
146
|
+
'resetLocation',
|
|
147
|
+
"Reset Location"
|
|
148
|
+
)), run: () => this.viewDescriptorService.moveViewsToContainer([viewToReset], defaultContainer) }));
|
|
141
149
|
}
|
|
142
150
|
}
|
|
143
151
|
}
|
|
@@ -355,7 +363,11 @@ let BasePanelPart = class BasePanelPart extends CompositePart {
|
|
|
355
363
|
this.emptyPanelMessageElement.classList.add('empty-panel-message-area');
|
|
356
364
|
const messageElement = document.createElement('div');
|
|
357
365
|
messageElement.classList.add('empty-panel-message');
|
|
358
|
-
messageElement.innerText = localizeWithPath(
|
|
366
|
+
messageElement.innerText = ( localizeWithPath(
|
|
367
|
+
'vs/workbench/browser/parts/panel/panelPart',
|
|
368
|
+
'panel.emptyMessage',
|
|
369
|
+
"Drag a view here to display."
|
|
370
|
+
));
|
|
359
371
|
this.emptyPanelMessageElement.appendChild(messageElement);
|
|
360
372
|
contentArea.appendChild(this.emptyPanelMessageElement);
|
|
361
373
|
this._register(CompositeDragAndDropObserver.INSTANCE.registerTarget(this.emptyPanelMessageElement, {
|
|
@@ -392,7 +404,11 @@ let BasePanelPart = class BasePanelPart extends CompositePart {
|
|
|
392
404
|
orientation: 0 ,
|
|
393
405
|
getKeyBinding: action => this.keybindingService.lookupKeybinding(action.id),
|
|
394
406
|
anchorAlignmentProvider: () => this.getTitleAreaDropDownAnchorAlignment(),
|
|
395
|
-
toggleMenuTitle: localizeWithPath(
|
|
407
|
+
toggleMenuTitle: ( localizeWithPath(
|
|
408
|
+
'vs/workbench/browser/parts/panel/panelPart',
|
|
409
|
+
'moreActions',
|
|
410
|
+
"More Actions..."
|
|
411
|
+
))
|
|
396
412
|
})));
|
|
397
413
|
this.updateGlobalToolbarActions();
|
|
398
414
|
return element;
|
|
@@ -718,17 +734,13 @@ let PanelPart = class PanelPart extends BasePanelPart {
|
|
|
718
734
|
panelPositionMenu.dispose();
|
|
719
735
|
actions.push(...[
|
|
720
736
|
( new Separator()),
|
|
721
|
-
( new SubmenuAction(
|
|
722
|
-
'workbench
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
)),
|
|
726
|
-
( new SubmenuAction(
|
|
727
|
-
|
|
728
|
-
localizeWithPath('vs/workbench/browser/parts/panel/panelPart', 'align panel', "Align Panel"),
|
|
729
|
-
alignActions
|
|
730
|
-
)),
|
|
731
|
-
toAction({ id: TogglePanelAction.ID, label: localizeWithPath('vs/workbench/browser/parts/panel/panelPart', 'hidePanel', "Hide Panel"), run: () => this.commandService.executeCommand(TogglePanelAction.ID) })
|
|
737
|
+
( new SubmenuAction('workbench.action.panel.position', ( localizeWithPath(
|
|
738
|
+
'vs/workbench/browser/parts/panel/panelPart',
|
|
739
|
+
'panel position',
|
|
740
|
+
"Panel Position"
|
|
741
|
+
)), positionActions)),
|
|
742
|
+
( new SubmenuAction('workbench.action.panel.align', ( localizeWithPath('vs/workbench/browser/parts/panel/panelPart', 'align panel', "Align Panel")), alignActions)),
|
|
743
|
+
toAction({ id: TogglePanelAction.ID, label: ( localizeWithPath('vs/workbench/browser/parts/panel/panelPart', 'hidePanel', "Hide Panel")), run: () => this.commandService.executeCommand(TogglePanelAction.ID) })
|
|
732
744
|
]);
|
|
733
745
|
}
|
|
734
746
|
layout(width, height, top, left) {
|
|
@@ -86,7 +86,7 @@ class TreeItemCheckbox extends Disposable {
|
|
|
86
86
|
}
|
|
87
87
|
checkboxHoverContent(checkbox) {
|
|
88
88
|
return checkbox.tooltip ? checkbox.tooltip :
|
|
89
|
-
checkbox.isChecked ? localizeWithPath('vs/workbench/browser/parts/views/checkbox', 'checked', 'Checked') : localizeWithPath('vs/workbench/browser/parts/views/checkbox', 'unchecked', 'Unchecked');
|
|
89
|
+
checkbox.isChecked ? ( localizeWithPath('vs/workbench/browser/parts/views/checkbox', 'checked', 'Checked')) : ( localizeWithPath('vs/workbench/browser/parts/views/checkbox', 'unchecked', 'Unchecked'));
|
|
90
90
|
}
|
|
91
91
|
setAccessibilityInformation(checkbox) {
|
|
92
92
|
if (this.toggle && checkbox.accessibilityInformation) {
|
|
@@ -158,7 +158,11 @@ function isTreeCommandEnabled(treeCommand, contextKeyService) {
|
|
|
158
158
|
function isRenderedMessageValue(messageValue) {
|
|
159
159
|
return !!messageValue && typeof messageValue !== 'string' && 'element' in messageValue && 'dispose' in messageValue;
|
|
160
160
|
}
|
|
161
|
-
const noDataProviderMessage = localizeWithPath(
|
|
161
|
+
const noDataProviderMessage = ( localizeWithPath(
|
|
162
|
+
'vs/workbench/browser/parts/views/treeView',
|
|
163
|
+
'no-dataprovider',
|
|
164
|
+
"There is no data provider registered that can provide view data."
|
|
165
|
+
));
|
|
162
166
|
const RawCustomTreeViewContextKey = ( new RawContextKey('customTreeView', false));
|
|
163
167
|
class Tree extends WorkbenchAsyncDataTree {
|
|
164
168
|
}
|
|
@@ -387,11 +391,12 @@ let AbstractTreeView = class AbstractTreeView extends Disposable {
|
|
|
387
391
|
}
|
|
388
392
|
initializeShowCollapseAllAction(startingValue = false) {
|
|
389
393
|
if (!this.collapseAllContext) {
|
|
390
|
-
this.collapseAllContextKey = ( new RawContextKey(
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
394
|
+
this.collapseAllContextKey = ( new RawContextKey(`treeView.${this.id}.enableCollapseAll`, startingValue, ( localizeWithPath(
|
|
395
|
+
'vs/workbench/browser/parts/views/treeView',
|
|
396
|
+
'treeView.enableCollapseAll',
|
|
397
|
+
"Whether the the tree view with id {0} enables collapse all.",
|
|
398
|
+
this.id
|
|
399
|
+
))));
|
|
395
400
|
this.collapseAllContext = this.collapseAllContextKey.bindTo(this.contextKeyService);
|
|
396
401
|
}
|
|
397
402
|
return true;
|
|
@@ -406,11 +411,12 @@ let AbstractTreeView = class AbstractTreeView extends Disposable {
|
|
|
406
411
|
}
|
|
407
412
|
initializeShowRefreshAction(startingValue = false) {
|
|
408
413
|
if (!this.refreshContext) {
|
|
409
|
-
this.refreshContextKey = ( new RawContextKey(
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
+
this.refreshContextKey = ( new RawContextKey(`treeView.${this.id}.enableRefresh`, startingValue, ( localizeWithPath(
|
|
415
|
+
'vs/workbench/browser/parts/views/treeView',
|
|
416
|
+
'treeView.enableRefresh',
|
|
417
|
+
"Whether the tree view with id {0} enables refresh.",
|
|
418
|
+
this.id
|
|
419
|
+
))));
|
|
414
420
|
this.refreshContext = this.refreshContextKey.bindTo(this.contextKeyService);
|
|
415
421
|
}
|
|
416
422
|
}
|
|
@@ -428,7 +434,7 @@ let AbstractTreeView = class AbstractTreeView extends Disposable {
|
|
|
428
434
|
constructor() {
|
|
429
435
|
super({
|
|
430
436
|
id: `workbench.actions.treeView.${that.id}.refresh`,
|
|
431
|
-
title: localizeWithPath('vs/workbench/browser/parts/views/treeView', 'refresh', "Refresh"),
|
|
437
|
+
title: ( localizeWithPath('vs/workbench/browser/parts/views/treeView', 'refresh', "Refresh")),
|
|
432
438
|
menu: {
|
|
433
439
|
id: MenuId.ViewTitle,
|
|
434
440
|
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('view', that.id)), that.refreshContextKey)),
|
|
@@ -446,7 +452,7 @@ let AbstractTreeView = class AbstractTreeView extends Disposable {
|
|
|
446
452
|
constructor() {
|
|
447
453
|
super({
|
|
448
454
|
id: `workbench.actions.treeView.${that.id}.collapseAll`,
|
|
449
|
-
title: localizeWithPath('vs/workbench/browser/parts/views/treeView', 'collapseAll', "Collapse All"),
|
|
455
|
+
title: ( localizeWithPath('vs/workbench/browser/parts/views/treeView', 'collapseAll', "Collapse All")),
|
|
450
456
|
menu: {
|
|
451
457
|
id: MenuId.ViewTitle,
|
|
452
458
|
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('view', that.id)), that.collapseAllContextKey)),
|
|
@@ -841,11 +847,12 @@ let AbstractTreeView = class AbstractTreeView extends Disposable {
|
|
|
841
847
|
}
|
|
842
848
|
initializeCollapseAllToggle() {
|
|
843
849
|
if (!this.collapseAllToggleContext) {
|
|
844
|
-
this.collapseAllToggleContextKey = ( new RawContextKey(
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
850
|
+
this.collapseAllToggleContextKey = ( new RawContextKey(`treeView.${this.id}.toggleCollapseAll`, false, ( localizeWithPath(
|
|
851
|
+
'vs/workbench/browser/parts/views/treeView',
|
|
852
|
+
'treeView.toggleCollapseAll',
|
|
853
|
+
"Whether collapse all is toggled for the tree view with id {0}.",
|
|
854
|
+
this.id
|
|
855
|
+
))));
|
|
849
856
|
this.collapseAllToggleContext = this.collapseAllToggleContextKey.bindTo(this.contextKeyService);
|
|
850
857
|
}
|
|
851
858
|
}
|
|
@@ -1296,7 +1303,13 @@ class MultipleSelectionActionRunner extends ActionRunner {
|
|
|
1296
1303
|
this.getSelectedResources = getSelectedResources;
|
|
1297
1304
|
this._register(this.onDidRun(e => {
|
|
1298
1305
|
if (e.error && !isCancellationError(e.error)) {
|
|
1299
|
-
notificationService.error(localizeWithPath(
|
|
1306
|
+
notificationService.error(( localizeWithPath(
|
|
1307
|
+
'vs/workbench/browser/parts/views/treeView',
|
|
1308
|
+
'command-error',
|
|
1309
|
+
'Error running command {1}: {0}. This is likely caused by the extension that contributes {1}.',
|
|
1310
|
+
e.error.message,
|
|
1311
|
+
e.action.id
|
|
1312
|
+
)));
|
|
1300
1313
|
}
|
|
1301
1314
|
}));
|
|
1302
1315
|
}
|
|
@@ -19,20 +19,24 @@ import { registerIcon } from 'monaco-editor/esm/vs/platform/theme/common/iconReg
|
|
|
19
19
|
import { isCancellationError } from 'monaco-editor/esm/vs/base/common/errors.js';
|
|
20
20
|
|
|
21
21
|
var CallHierarchyController_1;
|
|
22
|
-
const _ctxHasCallHierarchyProvider = ( new RawContextKey(
|
|
22
|
+
const _ctxHasCallHierarchyProvider = ( new RawContextKey('editorHasCallHierarchyProvider', false, ( localizeWithPath(
|
|
23
|
+
'vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution',
|
|
23
24
|
'editorHasCallHierarchyProvider',
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
'Whether a call hierarchy provider is available'
|
|
26
|
+
))));
|
|
27
|
+
const _ctxCallHierarchyVisible = ( new RawContextKey('callHierarchyVisible', false, ( localizeWithPath(
|
|
28
|
+
'vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution',
|
|
28
29
|
'callHierarchyVisible',
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
));
|
|
30
|
+
'Whether call hierarchy peek is currently showing'
|
|
31
|
+
))));
|
|
32
32
|
const _ctxCallHierarchyDirection = ( new RawContextKey(
|
|
33
33
|
'callHierarchyDirection',
|
|
34
34
|
undefined,
|
|
35
|
-
{ type: 'string', description: localizeWithPath(
|
|
35
|
+
{ type: 'string', description: ( localizeWithPath(
|
|
36
|
+
'vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution',
|
|
37
|
+
'callHierarchyDirection',
|
|
38
|
+
'Whether call hierarchy shows incoming or outgoing calls'
|
|
39
|
+
)) }
|
|
36
40
|
));
|
|
37
41
|
function sanitizedDirection(candidate) {
|
|
38
42
|
return candidate === "outgoingCalls" || candidate === "incomingCalls"
|
|
@@ -120,14 +124,22 @@ let CallHierarchyController = class CallHierarchyController {
|
|
|
120
124
|
this._widget.showModel(model);
|
|
121
125
|
}
|
|
122
126
|
else {
|
|
123
|
-
this._widget.showMessage(localizeWithPath(
|
|
127
|
+
this._widget.showMessage(( localizeWithPath(
|
|
128
|
+
'vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution',
|
|
129
|
+
'no.item',
|
|
130
|
+
"No results"
|
|
131
|
+
)));
|
|
124
132
|
}
|
|
125
133
|
}).catch(err => {
|
|
126
134
|
if (isCancellationError(err)) {
|
|
127
135
|
this.endCallHierarchy();
|
|
128
136
|
return;
|
|
129
137
|
}
|
|
130
|
-
this._widget.showMessage(localizeWithPath(
|
|
138
|
+
this._widget.showMessage(( localizeWithPath(
|
|
139
|
+
'vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution',
|
|
140
|
+
'error',
|
|
141
|
+
"Failed to show call hierarchy"
|
|
142
|
+
)));
|
|
131
143
|
});
|
|
132
144
|
}
|
|
133
145
|
showOutgoingCalls() {
|
|
@@ -155,7 +167,11 @@ registerAction2(class PeekCallHierarchyAction extends EditorAction2 {
|
|
|
155
167
|
constructor() {
|
|
156
168
|
super({
|
|
157
169
|
id: 'editor.showCallHierarchy',
|
|
158
|
-
title: { value: localizeWithPath(
|
|
170
|
+
title: { value: ( localizeWithPath(
|
|
171
|
+
'vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution',
|
|
172
|
+
'title',
|
|
173
|
+
"Peek Call Hierarchy"
|
|
174
|
+
)), original: 'Peek Call Hierarchy' },
|
|
159
175
|
menu: {
|
|
160
176
|
id: MenuId.EditorContextPeek,
|
|
161
177
|
group: 'navigation',
|
|
@@ -179,8 +195,16 @@ registerAction2(class extends EditorAction2 {
|
|
|
179
195
|
constructor() {
|
|
180
196
|
super({
|
|
181
197
|
id: 'editor.showIncomingCalls',
|
|
182
|
-
title: { value: localizeWithPath(
|
|
183
|
-
|
|
198
|
+
title: { value: ( localizeWithPath(
|
|
199
|
+
'vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution',
|
|
200
|
+
'title.incoming',
|
|
201
|
+
"Show Incoming Calls"
|
|
202
|
+
)), original: 'Show Incoming Calls' },
|
|
203
|
+
icon: registerIcon('callhierarchy-incoming', Codicon.callIncoming, ( localizeWithPath(
|
|
204
|
+
'vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution',
|
|
205
|
+
'showIncomingCallsIcons',
|
|
206
|
+
'Icon for incoming calls in the call hierarchy view.'
|
|
207
|
+
))),
|
|
184
208
|
precondition: ( ContextKeyExpr.and(_ctxCallHierarchyVisible, ( _ctxCallHierarchyDirection.isEqualTo("outgoingCalls" )))),
|
|
185
209
|
keybinding: {
|
|
186
210
|
weight: 200 ,
|
|
@@ -201,8 +225,16 @@ registerAction2(class extends EditorAction2 {
|
|
|
201
225
|
constructor() {
|
|
202
226
|
super({
|
|
203
227
|
id: 'editor.showOutgoingCalls',
|
|
204
|
-
title: { value: localizeWithPath(
|
|
205
|
-
|
|
228
|
+
title: { value: ( localizeWithPath(
|
|
229
|
+
'vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution',
|
|
230
|
+
'title.outgoing',
|
|
231
|
+
"Show Outgoing Calls"
|
|
232
|
+
)), original: 'Show Outgoing Calls' },
|
|
233
|
+
icon: registerIcon('callhierarchy-outgoing', Codicon.callOutgoing, ( localizeWithPath(
|
|
234
|
+
'vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution',
|
|
235
|
+
'showOutgoingCallsIcon',
|
|
236
|
+
'Icon for outgoing calls in the call hierarchy view.'
|
|
237
|
+
))),
|
|
206
238
|
precondition: ( ContextKeyExpr.and(_ctxCallHierarchyVisible, ( _ctxCallHierarchyDirection.isEqualTo("incomingCalls" )))),
|
|
207
239
|
keybinding: {
|
|
208
240
|
weight: 200 ,
|
|
@@ -223,7 +255,11 @@ registerAction2(class extends EditorAction2 {
|
|
|
223
255
|
constructor() {
|
|
224
256
|
super({
|
|
225
257
|
id: 'editor.refocusCallHierarchy',
|
|
226
|
-
title: { value: localizeWithPath(
|
|
258
|
+
title: { value: ( localizeWithPath(
|
|
259
|
+
'vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution',
|
|
260
|
+
'title.refocus',
|
|
261
|
+
"Refocus Call Hierarchy"
|
|
262
|
+
)), original: 'Refocus Call Hierarchy' },
|
|
227
263
|
precondition: _ctxCallHierarchyVisible,
|
|
228
264
|
keybinding: {
|
|
229
265
|
weight: 200 ,
|
|
@@ -239,7 +275,11 @@ registerAction2(class extends EditorAction2 {
|
|
|
239
275
|
constructor() {
|
|
240
276
|
super({
|
|
241
277
|
id: 'editor.closeCallHierarchy',
|
|
242
|
-
title: localizeWithPath(
|
|
278
|
+
title: ( localizeWithPath(
|
|
279
|
+
'vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution',
|
|
280
|
+
'close',
|
|
281
|
+
'Close'
|
|
282
|
+
)),
|
|
243
283
|
icon: Codicon.close,
|
|
244
284
|
precondition: _ctxCallHierarchyVisible,
|
|
245
285
|
keybinding: {
|