@codingame/monaco-vscode-view-common-service-override 31.0.0 → 32.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +3 -0
- package/package.json +3 -3
- package/service-override/vs/workbench/contrib/webview/browser/pre/service-worker.js +107 -88
- package/vscode/src/vs/sessions/common/theme.d.ts +21 -0
- package/vscode/src/vs/sessions/common/theme.js +126 -0
- package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +56 -56
- package/vscode/src/vs/workbench/browser/actions/helpActions.js +20 -20
- package/vscode/src/vs/workbench/browser/actions/listCommands.js +3 -3
- package/vscode/src/vs/workbench/browser/actions/navigationActions.js +6 -6
- package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +173 -168
- package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.d.ts +1 -0
- package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +31 -10
- package/vscode/src/vs/workbench/browser/parts/titlebar/menubar.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/browser/parts/titlebar/menubar.contribution.js +78 -0
- package/vscode/src/vs/workbench/browser/workbench.zenMode.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/browser/workbench.zenMode.contribution.js +140 -0
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +12 -12
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +3 -3
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.js +3 -3
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditor.contribution.js +8 -2
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.js +84 -1
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditors.d.ts +11 -1
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditors.js +184 -19
- package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.js +9 -5
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.js +9 -2
- package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.d.ts +27 -1
- package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.js +44 -12
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.js +7 -7
- package/vscode/src/vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution.js +8 -8
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/commands.js +29 -29
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/devCommands.js +14 -14
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution.js +2 -2
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorAccessibilityHelp.js +5 -5
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/colors.js +13 -13
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/conflictActions.js +20 -20
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editorGutter.js +1 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.js +3 -3
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.js +10 -10
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.js +3 -3
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.js +1 -1
- package/vscode/src/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker.js +12 -12
- package/vscode/src/vs/workbench/contrib/sash/browser/sash.contribution.js +2 -2
- package/vscode/src/vs/workbench/contrib/scrollLocking/browser/scrollLocking.js +7 -7
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.js +10 -10
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +3 -3
- package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.js +3 -3
- package/vscode/src/vs/workbench/contrib/webview/browser/overlayWebview.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/webview/browser/overlayWebview.js +16 -8
- package/vscode/src/vs/workbench/contrib/webview/browser/resourceLoading.d.ts +9 -5
- package/vscode/src/vs/workbench/contrib/webview/browser/resourceLoading.js +22 -5
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.d.ts +4 -7
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +133 -32
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.js +5 -5
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.js +1 -1
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewPane.d.ts +0 -5
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewPane.js +5 -27
- package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.d.ts +15 -7
- package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.js +129 -55
- package/vscode/src/vs/workbench/services/history/browser/historyService.js +9 -9
- package/vscode/src/vs/workbench/services/progress/browser/progressService.js +7 -7
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorHandler.js +1 -2
- package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.d.ts +3 -2
- package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +31 -33
- package/vscode/src/vs/workbench/services/views/browser/viewsService.js +9 -9
|
@@ -14,6 +14,7 @@ export declare class DynamicEditorConfigurations extends Disposable implements I
|
|
|
14
14
|
private autoLockConfigurationNode;
|
|
15
15
|
private defaultBinaryEditorConfigurationNode;
|
|
16
16
|
private editorAssociationsConfigurationNode;
|
|
17
|
+
private diffEditorAssociationsConfigurationNode;
|
|
17
18
|
private editorLargeFileConfirmationConfigurationNode;
|
|
18
19
|
constructor(editorResolverService: IEditorResolverService, extensionService: IExtensionService, environmentService: IWorkbenchEnvironmentService);
|
|
19
20
|
private registerListeners;
|
|
@@ -5,7 +5,7 @@ import { Registry } from '@codingame/monaco-vscode-api/vscode/vs/platform/regist
|
|
|
5
5
|
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
6
6
|
import { Extensions, ConfigurationScope } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configurationRegistry';
|
|
7
7
|
import { workbenchConfigurationNodeBase } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/configuration';
|
|
8
|
-
import { RegisteredEditorPriority } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorResolverService';
|
|
8
|
+
import { RegisteredEditorPriority, editorsAssociationsSettingId, diffEditorsAssociationsSettingId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorResolverService';
|
|
9
9
|
import { IEditorResolverService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorResolverService.service';
|
|
10
10
|
import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
11
11
|
import { coalesce } from '@codingame/monaco-vscode-api/vscode/vs/base/common/arrays';
|
|
@@ -33,19 +33,19 @@ let DynamicEditorConfigurations = class DynamicEditorConfigurations extends Disp
|
|
|
33
33
|
this.AUTO_LOCK_EXTRA_EDITORS = [
|
|
34
34
|
{
|
|
35
35
|
id: "workbench.input.interactive",
|
|
36
|
-
label: ( localize(
|
|
36
|
+
label: ( localize(3506, "Interactive Window")),
|
|
37
37
|
priority: RegisteredEditorPriority.builtin
|
|
38
38
|
}, {
|
|
39
39
|
id: "mainThreadWebview-markdown.preview",
|
|
40
|
-
label: ( localize(
|
|
40
|
+
label: ( localize(3507, "Markdown Preview")),
|
|
41
41
|
priority: RegisteredEditorPriority.builtin
|
|
42
42
|
}, {
|
|
43
43
|
id: "mainThreadWebview-simpleBrowser.view",
|
|
44
|
-
label: ( localize(
|
|
44
|
+
label: ( localize(3508, "Simple Browser")),
|
|
45
45
|
priority: RegisteredEditorPriority.builtin
|
|
46
46
|
}, {
|
|
47
47
|
id: "mainThreadWebview-browserPreview",
|
|
48
|
-
label: ( localize(
|
|
48
|
+
label: ( localize(3509, "Live Preview")),
|
|
49
49
|
priority: RegisteredEditorPriority.builtin
|
|
50
50
|
}];
|
|
51
51
|
}
|
|
@@ -94,7 +94,7 @@ let DynamicEditorConfigurations = class DynamicEditorConfigurations extends Disp
|
|
|
94
94
|
"workbench.editor.autoLockGroups": {
|
|
95
95
|
type: "object",
|
|
96
96
|
description: ( localize(
|
|
97
|
-
|
|
97
|
+
3510,
|
|
98
98
|
"If an editor matching one of the listed types is opened as the first in an editor group and more than one group is open, the group is automatically locked. Locked groups will only be used for opening editors when explicitly chosen by a user gesture (for example drag and drop), but not by default. Consequently, the active editor in a locked group is less likely to be replaced accidentally with a different editor."
|
|
99
99
|
)),
|
|
100
100
|
properties: autoLockGroupConfiguration,
|
|
@@ -112,7 +112,7 @@ let DynamicEditorConfigurations = class DynamicEditorConfigurations extends Disp
|
|
|
112
112
|
default: "",
|
|
113
113
|
enum: [...binaryEditorCandidates, ""],
|
|
114
114
|
description: ( localize(
|
|
115
|
-
|
|
115
|
+
3511,
|
|
116
116
|
"The default editor for files detected as binary. If undefined, the user will be presented with a picker."
|
|
117
117
|
))
|
|
118
118
|
}
|
|
@@ -122,10 +122,10 @@ let DynamicEditorConfigurations = class DynamicEditorConfigurations extends Disp
|
|
|
122
122
|
this.editorAssociationsConfigurationNode = {
|
|
123
123
|
...workbenchConfigurationNodeBase,
|
|
124
124
|
properties: {
|
|
125
|
-
|
|
125
|
+
[editorsAssociationsSettingId]: {
|
|
126
126
|
type: "object",
|
|
127
127
|
markdownDescription: ( localize(
|
|
128
|
-
|
|
128
|
+
3512,
|
|
129
129
|
"Configure [glob patterns](https://aka.ms/vscode-glob-patterns) to editors (for example `\"*.hex\": \"hexEditor.hexedit\"`). These have precedence over the default behavior."
|
|
130
130
|
)),
|
|
131
131
|
patternProperties: {
|
|
@@ -137,6 +137,25 @@ let DynamicEditorConfigurations = class DynamicEditorConfigurations extends Disp
|
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
};
|
|
140
|
+
const oldDiffEditorAssociationsConfigurationNode = this.diffEditorAssociationsConfigurationNode;
|
|
141
|
+
this.diffEditorAssociationsConfigurationNode = {
|
|
142
|
+
...workbenchConfigurationNodeBase,
|
|
143
|
+
properties: {
|
|
144
|
+
[diffEditorsAssociationsSettingId]: {
|
|
145
|
+
type: "object",
|
|
146
|
+
markdownDescription: ( localize(
|
|
147
|
+
3513,
|
|
148
|
+
"Configure [glob patterns](https://aka.ms/vscode-glob-patterns) to editors for diff views (for example `\"*.md\": \"vscode.markdown.preview.editor\"`). These override `workbench.editorAssociations` for diffs."
|
|
149
|
+
)),
|
|
150
|
+
patternProperties: {
|
|
151
|
+
".*": {
|
|
152
|
+
type: "string",
|
|
153
|
+
enum: binaryEditorCandidates
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
};
|
|
140
159
|
const oldEditorLargeFileConfirmationConfigurationNode = this.editorLargeFileConfirmationConfigurationNode;
|
|
141
160
|
this.editorLargeFileConfirmationConfigurationNode = {
|
|
142
161
|
...workbenchConfigurationNodeBase,
|
|
@@ -147,7 +166,7 @@ let DynamicEditorConfigurations = class DynamicEditorConfigurations extends Disp
|
|
|
147
166
|
minimum: 1,
|
|
148
167
|
scope: ConfigurationScope.RESOURCE,
|
|
149
168
|
markdownDescription: ( localize(
|
|
150
|
-
|
|
169
|
+
3514,
|
|
151
170
|
"Controls the minimum size of a file in MB before asking for confirmation when opening in the editor. Note that this setting may not apply to all editor types and environments."
|
|
152
171
|
))
|
|
153
172
|
}
|
|
@@ -158,12 +177,14 @@ let DynamicEditorConfigurations = class DynamicEditorConfigurations extends Disp
|
|
|
158
177
|
this.autoLockConfigurationNode,
|
|
159
178
|
this.defaultBinaryEditorConfigurationNode,
|
|
160
179
|
this.editorAssociationsConfigurationNode,
|
|
180
|
+
this.diffEditorAssociationsConfigurationNode,
|
|
161
181
|
this.editorLargeFileConfirmationConfigurationNode
|
|
162
182
|
],
|
|
163
183
|
remove: coalesce([
|
|
164
184
|
oldAutoLockConfigurationNode,
|
|
165
185
|
oldDefaultBinaryEditorConfigurationNode,
|
|
166
186
|
oldEditorAssociationsConfigurationNode,
|
|
187
|
+
oldDiffEditorAssociationsConfigurationNode,
|
|
167
188
|
oldEditorLargeFileConfirmationConfigurationNode
|
|
168
189
|
])
|
|
169
190
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
|
|
2
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
3
|
+
import { MenuRegistry, MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
4
|
+
import { IsMacNativeContext } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkeys';
|
|
5
|
+
|
|
6
|
+
MenuRegistry.appendMenuItem(MenuId.MenubarMainMenu, {
|
|
7
|
+
submenu: MenuId.MenubarFileMenu,
|
|
8
|
+
title: {
|
|
9
|
+
value: "File",
|
|
10
|
+
original: "File",
|
|
11
|
+
mnemonicTitle: ( localize(3774, "&&File"))
|
|
12
|
+
},
|
|
13
|
+
order: 1
|
|
14
|
+
});
|
|
15
|
+
MenuRegistry.appendMenuItem(MenuId.MenubarMainMenu, {
|
|
16
|
+
submenu: MenuId.MenubarEditMenu,
|
|
17
|
+
title: {
|
|
18
|
+
value: "Edit",
|
|
19
|
+
original: "Edit",
|
|
20
|
+
mnemonicTitle: ( localize(3775, "&&Edit"))
|
|
21
|
+
},
|
|
22
|
+
order: 2
|
|
23
|
+
});
|
|
24
|
+
MenuRegistry.appendMenuItem(MenuId.MenubarMainMenu, {
|
|
25
|
+
submenu: MenuId.MenubarSelectionMenu,
|
|
26
|
+
title: {
|
|
27
|
+
value: "Selection",
|
|
28
|
+
original: "Selection",
|
|
29
|
+
mnemonicTitle: ( localize(3776, "&&Selection"))
|
|
30
|
+
},
|
|
31
|
+
order: 3
|
|
32
|
+
});
|
|
33
|
+
MenuRegistry.appendMenuItem(MenuId.MenubarMainMenu, {
|
|
34
|
+
submenu: MenuId.MenubarViewMenu,
|
|
35
|
+
title: {
|
|
36
|
+
value: "View",
|
|
37
|
+
original: "View",
|
|
38
|
+
mnemonicTitle: ( localize(3777, "&&View"))
|
|
39
|
+
},
|
|
40
|
+
order: 4
|
|
41
|
+
});
|
|
42
|
+
MenuRegistry.appendMenuItem(MenuId.MenubarMainMenu, {
|
|
43
|
+
submenu: MenuId.MenubarGoMenu,
|
|
44
|
+
title: {
|
|
45
|
+
value: "Go",
|
|
46
|
+
original: "Go",
|
|
47
|
+
mnemonicTitle: ( localize(3778, "&&Go"))
|
|
48
|
+
},
|
|
49
|
+
order: 5
|
|
50
|
+
});
|
|
51
|
+
MenuRegistry.appendMenuItem(MenuId.MenubarMainMenu, {
|
|
52
|
+
submenu: MenuId.MenubarTerminalMenu,
|
|
53
|
+
title: {
|
|
54
|
+
value: "Terminal",
|
|
55
|
+
original: "Terminal",
|
|
56
|
+
mnemonicTitle: ( localize(3779, "&&Terminal"))
|
|
57
|
+
},
|
|
58
|
+
order: 7
|
|
59
|
+
});
|
|
60
|
+
MenuRegistry.appendMenuItem(MenuId.MenubarMainMenu, {
|
|
61
|
+
submenu: MenuId.MenubarHelpMenu,
|
|
62
|
+
title: {
|
|
63
|
+
value: "Help",
|
|
64
|
+
original: "Help",
|
|
65
|
+
mnemonicTitle: ( localize(3780, "&&Help"))
|
|
66
|
+
},
|
|
67
|
+
order: 8
|
|
68
|
+
});
|
|
69
|
+
MenuRegistry.appendMenuItem(MenuId.MenubarMainMenu, {
|
|
70
|
+
submenu: MenuId.MenubarPreferencesMenu,
|
|
71
|
+
title: {
|
|
72
|
+
value: "Preferences",
|
|
73
|
+
original: "Preferences",
|
|
74
|
+
mnemonicTitle: ( localize(3781, "&&Preferences"))
|
|
75
|
+
},
|
|
76
|
+
when: IsMacNativeContext,
|
|
77
|
+
order: 9
|
|
78
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
|
|
2
|
+
import { KeyChord, KeyMod, KeyCode } from '@codingame/monaco-vscode-api/vscode/vs/base/common/keyCodes';
|
|
3
|
+
import { localize, localize2 } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
4
|
+
import { Categories } from '@codingame/monaco-vscode-api/vscode/vs/platform/action/common/actionCommonCategories';
|
|
5
|
+
import { registerAction2, MenuRegistry, MenuId, Action2 } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
6
|
+
import { Extensions } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configurationRegistry';
|
|
7
|
+
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
8
|
+
import { KeybindingWeight, KeybindingsRegistry } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
9
|
+
import { Registry } from '@codingame/monaco-vscode-api/vscode/vs/platform/registry/common/platform';
|
|
10
|
+
import { InEditorZenModeContext, IsAuxiliaryWindowFocusedContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contextkeys';
|
|
11
|
+
import { IWorkbenchLayoutService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/layout/browser/layoutService.service';
|
|
12
|
+
import { ZenHideEditorTabsAction, ZenShowMultipleEditorTabsAction, ZenShowSingleEditorTabAction } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/actions/layoutActions';
|
|
13
|
+
|
|
14
|
+
(function registerZenModeConfiguration() {
|
|
15
|
+
const registry = ( Registry.as(Extensions.Configuration));
|
|
16
|
+
registry.registerConfiguration({
|
|
17
|
+
"id": "zenMode",
|
|
18
|
+
"order": 9,
|
|
19
|
+
"title": ( localize(4102, "Zen Mode")),
|
|
20
|
+
"type": "object",
|
|
21
|
+
"properties": {
|
|
22
|
+
"zenMode.fullScreen": {
|
|
23
|
+
"type": "boolean",
|
|
24
|
+
"default": true,
|
|
25
|
+
"description": ( localize(
|
|
26
|
+
4103,
|
|
27
|
+
"Controls whether turning on Zen Mode also puts the workbench into full screen mode."
|
|
28
|
+
))
|
|
29
|
+
},
|
|
30
|
+
"zenMode.centerLayout": {
|
|
31
|
+
"type": "boolean",
|
|
32
|
+
"default": true,
|
|
33
|
+
"description": ( localize(4104, "Controls whether turning on Zen Mode also centers the layout."))
|
|
34
|
+
},
|
|
35
|
+
"zenMode.showTabs": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"enum": ["multiple", "single", "none"],
|
|
38
|
+
"description": ( localize(
|
|
39
|
+
4105,
|
|
40
|
+
"Controls whether turning on Zen Mode should show multiple editor tabs, a single editor tab, or hide the editor title area completely."
|
|
41
|
+
)),
|
|
42
|
+
"enumDescriptions": [( localize(4106, "Each editor is displayed as a tab in the editor title area.")), ( localize(
|
|
43
|
+
4107,
|
|
44
|
+
"The active editor is displayed as a single large tab in the editor title area."
|
|
45
|
+
)), ( localize(4108, "The editor title area is not displayed."))],
|
|
46
|
+
"default": "multiple"
|
|
47
|
+
},
|
|
48
|
+
"zenMode.hideStatusBar": {
|
|
49
|
+
"type": "boolean",
|
|
50
|
+
"default": true,
|
|
51
|
+
"description": ( localize(
|
|
52
|
+
4109,
|
|
53
|
+
"Controls whether turning on Zen Mode also hides the status bar at the bottom of the workbench."
|
|
54
|
+
))
|
|
55
|
+
},
|
|
56
|
+
"zenMode.hideActivityBar": {
|
|
57
|
+
"type": "boolean",
|
|
58
|
+
"default": true,
|
|
59
|
+
"description": ( localize(
|
|
60
|
+
4110,
|
|
61
|
+
"Controls whether turning on Zen Mode also hides the activity bar either at the left or right of the workbench."
|
|
62
|
+
))
|
|
63
|
+
},
|
|
64
|
+
"zenMode.hideLineNumbers": {
|
|
65
|
+
"type": "boolean",
|
|
66
|
+
"default": true,
|
|
67
|
+
"description": ( localize(
|
|
68
|
+
4111,
|
|
69
|
+
"Controls whether turning on Zen Mode also hides the editor line numbers."
|
|
70
|
+
))
|
|
71
|
+
},
|
|
72
|
+
"zenMode.restore": {
|
|
73
|
+
"type": "boolean",
|
|
74
|
+
"default": true,
|
|
75
|
+
"description": ( localize(
|
|
76
|
+
4112,
|
|
77
|
+
"Controls whether a window should restore to Zen Mode if it was exited in Zen Mode."
|
|
78
|
+
))
|
|
79
|
+
},
|
|
80
|
+
"zenMode.silentNotifications": {
|
|
81
|
+
"type": "boolean",
|
|
82
|
+
"default": true,
|
|
83
|
+
"description": ( localize(
|
|
84
|
+
4113,
|
|
85
|
+
"Controls whether notifications do not disturb mode should be enabled while in Zen Mode. If true, only error notifications will pop out."
|
|
86
|
+
))
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
})();
|
|
91
|
+
registerAction2(ZenHideEditorTabsAction);
|
|
92
|
+
registerAction2(ZenShowMultipleEditorTabsAction);
|
|
93
|
+
registerAction2(ZenShowSingleEditorTabAction);
|
|
94
|
+
MenuRegistry.appendMenuItem(MenuId.MenubarAppearanceMenu, {
|
|
95
|
+
submenu: MenuId.EditorTabsBarShowTabsZenModeSubmenu,
|
|
96
|
+
title: ( localize(4114, "Tab Bar")),
|
|
97
|
+
group: "3_workbench_layout_move",
|
|
98
|
+
order: 10,
|
|
99
|
+
when: InEditorZenModeContext
|
|
100
|
+
});
|
|
101
|
+
registerAction2(class extends Action2 {
|
|
102
|
+
constructor() {
|
|
103
|
+
super({
|
|
104
|
+
id: "workbench.action.toggleZenMode",
|
|
105
|
+
title: {
|
|
106
|
+
...( localize2(4115, "Toggle Zen Mode")),
|
|
107
|
+
mnemonicTitle: ( localize(4116, "Zen Mode"))
|
|
108
|
+
},
|
|
109
|
+
precondition: ( IsAuxiliaryWindowFocusedContext.toNegated()),
|
|
110
|
+
category: Categories.View,
|
|
111
|
+
f1: true,
|
|
112
|
+
keybinding: {
|
|
113
|
+
weight: KeybindingWeight.WorkbenchContrib,
|
|
114
|
+
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyCode.KeyZ)
|
|
115
|
+
},
|
|
116
|
+
toggled: InEditorZenModeContext,
|
|
117
|
+
menu: [{
|
|
118
|
+
id: MenuId.MenubarAppearanceMenu,
|
|
119
|
+
group: "1_toggle_view",
|
|
120
|
+
order: 2
|
|
121
|
+
}]
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
run(accessor) {
|
|
125
|
+
return accessor.get(IWorkbenchLayoutService).toggleZenMode();
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
129
|
+
id: "workbench.action.exitZenMode",
|
|
130
|
+
weight: KeybindingWeight.EditorContrib - 1000,
|
|
131
|
+
handler(accessor) {
|
|
132
|
+
const layoutService = accessor.get(IWorkbenchLayoutService);
|
|
133
|
+
const contextKeyService = accessor.get(IContextKeyService);
|
|
134
|
+
if (InEditorZenModeContext.getValue(contextKeyService)) {
|
|
135
|
+
layoutService.toggleZenMode();
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
when: InEditorZenModeContext,
|
|
139
|
+
primary: KeyChord(KeyCode.Escape, KeyCode.Escape)
|
|
140
|
+
});
|
|
@@ -24,11 +24,11 @@ import { registerIcon } from '@codingame/monaco-vscode-api/vscode/vs/platform/th
|
|
|
24
24
|
import { isCancellationError } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
|
|
25
25
|
|
|
26
26
|
var CallHierarchyController_1;
|
|
27
|
-
const _ctxHasCallHierarchyProvider = ( new RawContextKey("editorHasCallHierarchyProvider", false, ( localize(
|
|
28
|
-
const _ctxCallHierarchyVisible = ( new RawContextKey("callHierarchyVisible", false, ( localize(
|
|
27
|
+
const _ctxHasCallHierarchyProvider = ( new RawContextKey("editorHasCallHierarchyProvider", false, ( localize(4726, "Whether a call hierarchy provider is available"))));
|
|
28
|
+
const _ctxCallHierarchyVisible = ( new RawContextKey("callHierarchyVisible", false, ( localize(4727, "Whether call hierarchy peek is currently showing"))));
|
|
29
29
|
const _ctxCallHierarchyDirection = ( new RawContextKey("callHierarchyDirection", undefined, {
|
|
30
30
|
type: "string",
|
|
31
|
-
description: ( localize(
|
|
31
|
+
description: ( localize(4728, "Whether call hierarchy shows incoming or outgoing calls"))
|
|
32
32
|
}));
|
|
33
33
|
function sanitizedDirection(candidate) {
|
|
34
34
|
return candidate === CallHierarchyDirection.CallsFrom || candidate === CallHierarchyDirection.CallsTo ? candidate : CallHierarchyDirection.CallsTo;
|
|
@@ -149,14 +149,14 @@ let CallHierarchyController = class CallHierarchyController {
|
|
|
149
149
|
this._sessionDisposables.add(model);
|
|
150
150
|
this._widget.showModel(model);
|
|
151
151
|
} else {
|
|
152
|
-
this._widget.showMessage(( localize(
|
|
152
|
+
this._widget.showMessage(( localize(4729, "No results")));
|
|
153
153
|
}
|
|
154
154
|
}).catch(err => {
|
|
155
155
|
if (isCancellationError(err)) {
|
|
156
156
|
this.endCallHierarchy();
|
|
157
157
|
return;
|
|
158
158
|
}
|
|
159
|
-
this._widget.showMessage(( localize(
|
|
159
|
+
this._widget.showMessage(( localize(4730, "Failed to show call hierarchy")));
|
|
160
160
|
});
|
|
161
161
|
}
|
|
162
162
|
showOutgoingCalls() {
|
|
@@ -183,7 +183,7 @@ registerAction2(class PeekCallHierarchyAction extends EditorAction2 {
|
|
|
183
183
|
constructor() {
|
|
184
184
|
super({
|
|
185
185
|
id: "editor.showCallHierarchy",
|
|
186
|
-
title: ( localize2(
|
|
186
|
+
title: ( localize2(4731, "Peek Call Hierarchy")),
|
|
187
187
|
menu: {
|
|
188
188
|
id: MenuId.EditorContextPeek,
|
|
189
189
|
group: "navigation",
|
|
@@ -207,8 +207,8 @@ registerAction2(class extends EditorAction2 {
|
|
|
207
207
|
constructor() {
|
|
208
208
|
super({
|
|
209
209
|
id: "editor.showIncomingCalls",
|
|
210
|
-
title: ( localize2(
|
|
211
|
-
icon: registerIcon("callhierarchy-incoming", Codicon.callIncoming, ( localize(
|
|
210
|
+
title: ( localize2(4732, "Show Incoming Calls")),
|
|
211
|
+
icon: registerIcon("callhierarchy-incoming", Codicon.callIncoming, ( localize(4733, "Icon for incoming calls in the call hierarchy view."))),
|
|
212
212
|
precondition: ( ContextKeyExpr.and(_ctxCallHierarchyVisible, ( _ctxCallHierarchyDirection.isEqualTo(CallHierarchyDirection.CallsFrom)))),
|
|
213
213
|
keybinding: {
|
|
214
214
|
weight: KeybindingWeight.WorkbenchContrib,
|
|
@@ -229,8 +229,8 @@ registerAction2(class extends EditorAction2 {
|
|
|
229
229
|
constructor() {
|
|
230
230
|
super({
|
|
231
231
|
id: "editor.showOutgoingCalls",
|
|
232
|
-
title: ( localize2(
|
|
233
|
-
icon: registerIcon("callhierarchy-outgoing", Codicon.callOutgoing, ( localize(
|
|
232
|
+
title: ( localize2(4734, "Show Outgoing Calls")),
|
|
233
|
+
icon: registerIcon("callhierarchy-outgoing", Codicon.callOutgoing, ( localize(4735, "Icon for outgoing calls in the call hierarchy view."))),
|
|
234
234
|
precondition: ( ContextKeyExpr.and(_ctxCallHierarchyVisible, ( _ctxCallHierarchyDirection.isEqualTo(CallHierarchyDirection.CallsTo)))),
|
|
235
235
|
keybinding: {
|
|
236
236
|
weight: KeybindingWeight.WorkbenchContrib,
|
|
@@ -251,7 +251,7 @@ registerAction2(class extends EditorAction2 {
|
|
|
251
251
|
constructor() {
|
|
252
252
|
super({
|
|
253
253
|
id: "editor.refocusCallHierarchy",
|
|
254
|
-
title: ( localize2(
|
|
254
|
+
title: ( localize2(4736, "Refocus Call Hierarchy")),
|
|
255
255
|
precondition: _ctxCallHierarchyVisible,
|
|
256
256
|
keybinding: {
|
|
257
257
|
weight: KeybindingWeight.WorkbenchContrib,
|
|
@@ -267,7 +267,7 @@ registerAction2(class extends EditorAction2 {
|
|
|
267
267
|
constructor() {
|
|
268
268
|
super({
|
|
269
269
|
id: "editor.closeCallHierarchy",
|
|
270
|
-
title: ( localize(
|
|
270
|
+
title: ( localize(4737, "Close")),
|
|
271
271
|
icon: Codicon.close,
|
|
272
272
|
precondition: _ctxCallHierarchyVisible,
|
|
273
273
|
keybinding: {
|
|
@@ -323,12 +323,12 @@ let CallHierarchyTreePeekWidget = class CallHierarchyTreePeekWidget extends Peek
|
|
|
323
323
|
this._previewDisposable.add(toDisposable(() => decorationsCollection.clear()));
|
|
324
324
|
}
|
|
325
325
|
this._previewDisposable.add(value);
|
|
326
|
-
const title = this._direction === CallHierarchyDirection.CallsFrom ? ( localize(
|
|
326
|
+
const title = this._direction === CallHierarchyDirection.CallsFrom ? ( localize(4738, "Calls from '{0}'", element.model.root.name)) : ( localize(4739, "Callers of '{0}'", element.model.root.name));
|
|
327
327
|
this.setTitle(title);
|
|
328
328
|
}
|
|
329
329
|
showLoading() {
|
|
330
330
|
this._parent.dataset["state"] = State.Loading;
|
|
331
|
-
this.setTitle(( localize(
|
|
331
|
+
this.setTitle(( localize(4740, "Loading...")));
|
|
332
332
|
this._show();
|
|
333
333
|
}
|
|
334
334
|
showMessage(message) {
|
|
@@ -346,7 +346,7 @@ let CallHierarchyTreePeekWidget = class CallHierarchyTreePeekWidget extends Peek
|
|
|
346
346
|
const root = this._tree.getNode(model).children[0];
|
|
347
347
|
await this._tree.expand(root.element);
|
|
348
348
|
if (root.children.length === 0) {
|
|
349
|
-
this.showMessage(this._direction === CallHierarchyDirection.CallsFrom ? ( localize(
|
|
349
|
+
this.showMessage(this._direction === CallHierarchyDirection.CallsFrom ? ( localize(4741, "No calls from '{0}'", model.root.name)) : ( localize(4742, "No callers of '{0}'", model.root.name)));
|
|
350
350
|
} else {
|
|
351
351
|
this._parent.dataset["state"] = State.Data;
|
|
352
352
|
if (!viewState || this._tree.getFocus().length === 0) {
|
|
@@ -131,13 +131,13 @@ class AccessibilityProvider {
|
|
|
131
131
|
this.getDirection = getDirection;
|
|
132
132
|
}
|
|
133
133
|
getWidgetAriaLabel() {
|
|
134
|
-
return localize(
|
|
134
|
+
return localize(4743, "Call Hierarchy");
|
|
135
135
|
}
|
|
136
136
|
getAriaLabel(element) {
|
|
137
137
|
if (this.getDirection() === CallHierarchyDirection.CallsFrom) {
|
|
138
|
-
return localize(
|
|
138
|
+
return localize(4744, "calls from {0}", element.item.name);
|
|
139
139
|
} else {
|
|
140
|
-
return localize(
|
|
140
|
+
return localize(4745, "callers of {0}", element.item.name);
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
}
|
|
@@ -5,17 +5,23 @@ import { Registry } from '@codingame/monaco-vscode-api/vscode/vs/platform/regist
|
|
|
5
5
|
import { EditorPaneDescriptor } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/editor';
|
|
6
6
|
import { registerWorkbenchContribution2, WorkbenchPhase } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions';
|
|
7
7
|
import { EditorExtensions } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
|
|
8
|
-
import { CustomEditorInputSerializer, ComplexCustomWorkingCopyEditorHandler } from './customEditorInputFactory.js';
|
|
8
|
+
import { CustomEditorInputSerializer, CustomEditorDiffInputSerializer, CustomEditorSideBySideDiffInputSerializer, ComplexCustomWorkingCopyEditorHandler } from './customEditorInputFactory.js';
|
|
9
9
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
10
10
|
import { WebviewEditor } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/webviewPanel/browser/webviewEditor';
|
|
11
11
|
import { CustomEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/customEditor/browser/customEditorInput';
|
|
12
|
+
import { CustomEditorDiffInput, CustomEditorSideBySideDiffInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/customEditor/browser/customEditorDiffInput';
|
|
12
13
|
import './customEditors.js';
|
|
13
14
|
|
|
14
15
|
( Registry.as(EditorExtensions.EditorPane)).registerEditorPane(
|
|
15
16
|
EditorPaneDescriptor.create(WebviewEditor, WebviewEditor.ID, "Webview Editor"),
|
|
16
|
-
[( new SyncDescriptor(CustomEditorInput))]
|
|
17
|
+
[( new SyncDescriptor(CustomEditorInput)), ( new SyncDescriptor(CustomEditorDiffInput)), ( new SyncDescriptor(CustomEditorSideBySideDiffInput))]
|
|
17
18
|
);
|
|
18
19
|
( Registry.as(EditorExtensions.EditorFactory)).registerEditorSerializer(CustomEditorInputSerializer.ID, CustomEditorInputSerializer);
|
|
20
|
+
( Registry.as(EditorExtensions.EditorFactory)).registerEditorSerializer(CustomEditorDiffInputSerializer.ID, CustomEditorDiffInputSerializer);
|
|
21
|
+
( Registry.as(EditorExtensions.EditorFactory)).registerEditorSerializer(
|
|
22
|
+
CustomEditorSideBySideDiffInputSerializer.ID,
|
|
23
|
+
CustomEditorSideBySideDiffInputSerializer
|
|
24
|
+
);
|
|
19
25
|
registerWorkbenchContribution2(
|
|
20
26
|
ComplexCustomWorkingCopyEditorHandler.ID,
|
|
21
27
|
ComplexCustomWorkingCopyEditorHandler,
|
|
@@ -2,8 +2,10 @@ import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/l
|
|
|
2
2
|
import { URI, UriComponents } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
3
3
|
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
4
4
|
import { IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions";
|
|
5
|
+
import { IEditorSerializer } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor";
|
|
5
6
|
import { EditorInput } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor/editorInput";
|
|
6
7
|
import { CustomEditorInput } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/customEditor/browser/customEditorInput";
|
|
8
|
+
import { CustomEditorDiffInput, CustomEditorSideBySideDiffInput } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/customEditor/browser/customEditorDiffInput";
|
|
7
9
|
import { ICustomEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/customEditor/common/customEditor.service";
|
|
8
10
|
import { IWebviewService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/webview/browser/webview.service";
|
|
9
11
|
import { DeserializedWebview, SerializedWebview, SerializedWebviewOptions, WebviewEditorInputSerializer } from "../../webviewPanel/browser/webviewEditorInputSerializer.js";
|
|
@@ -51,6 +53,22 @@ export declare class CustomEditorInputSerializer extends WebviewEditorInputSeria
|
|
|
51
53
|
protected fromJson(data: SerializedCustomEditor): DeserializedCustomEditor;
|
|
52
54
|
deserialize(_instantiationService: IInstantiationService, serializedEditorInput: string): CustomEditorInput;
|
|
53
55
|
}
|
|
56
|
+
export declare class CustomEditorDiffInputSerializer implements IEditorSerializer {
|
|
57
|
+
private readonly _instantiationService;
|
|
58
|
+
static readonly ID = "workbench.editors.customDiffEditor";
|
|
59
|
+
constructor(_instantiationService: IInstantiationService);
|
|
60
|
+
canSerialize(input: EditorInput): boolean;
|
|
61
|
+
serialize(input: CustomEditorDiffInput): string | undefined;
|
|
62
|
+
deserialize(_instantiationService: IInstantiationService, serializedEditorInput: string): EditorInput;
|
|
63
|
+
}
|
|
64
|
+
export declare class CustomEditorSideBySideDiffInputSerializer implements IEditorSerializer {
|
|
65
|
+
private readonly _instantiationService;
|
|
66
|
+
static readonly ID = "workbench.editors.customSideBySideDiffEditor";
|
|
67
|
+
constructor(_instantiationService: IInstantiationService);
|
|
68
|
+
canSerialize(input: EditorInput): boolean;
|
|
69
|
+
serialize(input: CustomEditorSideBySideDiffInput): string | undefined;
|
|
70
|
+
deserialize(_instantiationService: IInstantiationService, serializedEditorInput: string): EditorInput;
|
|
71
|
+
}
|
|
54
72
|
export declare class ComplexCustomWorkingCopyEditorHandler extends Disposable implements IWorkbenchContribution, IWorkingCopyEditorHandler {
|
|
55
73
|
private readonly _instantiationService;
|
|
56
74
|
private readonly _workingCopyBackupService;
|
|
@@ -6,6 +6,7 @@ import { isEqual } from '@codingame/monaco-vscode-api/vscode/vs/base/common/reso
|
|
|
6
6
|
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
7
7
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
8
8
|
import { CustomEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/customEditor/browser/customEditorInput';
|
|
9
|
+
import { CustomEditorDiffInput, CustomEditorSideBySideDiffInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/customEditor/browser/customEditorDiffInput';
|
|
9
10
|
import { ICustomEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/customEditor/common/customEditor.service';
|
|
10
11
|
import { NotebookEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookEditorInput';
|
|
11
12
|
import { WebviewContentPurpose } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/webview/browser/webview';
|
|
@@ -52,6 +53,7 @@ let CustomEditorInputSerializer = class CustomEditorInputSerializer extends Webv
|
|
|
52
53
|
resource: data.editorResource,
|
|
53
54
|
viewType: data.viewType,
|
|
54
55
|
webviewTitle: data.title,
|
|
56
|
+
preferredName: undefined,
|
|
55
57
|
iconPath: data.iconPath
|
|
56
58
|
}, webview, {
|
|
57
59
|
startsDirty: data.dirty,
|
|
@@ -64,6 +66,86 @@ let CustomEditorInputSerializer = class CustomEditorInputSerializer extends Webv
|
|
|
64
66
|
}
|
|
65
67
|
};
|
|
66
68
|
CustomEditorInputSerializer = ( __decorate([( __param(0, IWebviewWorkbenchService)), ( __param(1, IInstantiationService)), ( __param(2, IWebviewService))], CustomEditorInputSerializer));
|
|
69
|
+
let CustomEditorDiffInputSerializer = class CustomEditorDiffInputSerializer {
|
|
70
|
+
static {
|
|
71
|
+
this.ID = CustomEditorDiffInput.typeId;
|
|
72
|
+
}
|
|
73
|
+
constructor(_instantiationService) {
|
|
74
|
+
this._instantiationService = _instantiationService;
|
|
75
|
+
}
|
|
76
|
+
canSerialize(input) {
|
|
77
|
+
return input instanceof CustomEditorDiffInput;
|
|
78
|
+
}
|
|
79
|
+
serialize(input) {
|
|
80
|
+
const data = {
|
|
81
|
+
originalResource: input.originalResource.toJSON(),
|
|
82
|
+
modifiedResource: input.modifiedResource.toJSON(),
|
|
83
|
+
viewType: input.viewType,
|
|
84
|
+
label: input.getName(),
|
|
85
|
+
description: input.getDescription(),
|
|
86
|
+
dirty: input.isDirty()
|
|
87
|
+
};
|
|
88
|
+
try {
|
|
89
|
+
return JSON.stringify(data);
|
|
90
|
+
} catch {
|
|
91
|
+
return undefined;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
deserialize(_instantiationService, serializedEditorInput) {
|
|
95
|
+
const data = JSON.parse(serializedEditorInput);
|
|
96
|
+
return CustomEditorDiffInput.create(this._instantiationService, {
|
|
97
|
+
originalResource: URI.revive(data.originalResource),
|
|
98
|
+
modifiedResource: URI.revive(data.modifiedResource),
|
|
99
|
+
viewType: data.viewType,
|
|
100
|
+
label: data.label,
|
|
101
|
+
description: data.description,
|
|
102
|
+
iconPath: undefined
|
|
103
|
+
}, undefined);
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
CustomEditorDiffInputSerializer = ( __decorate([( __param(0, IInstantiationService))], CustomEditorDiffInputSerializer));
|
|
107
|
+
let CustomEditorSideBySideDiffInputSerializer = class CustomEditorSideBySideDiffInputSerializer {
|
|
108
|
+
static {
|
|
109
|
+
this.ID = CustomEditorSideBySideDiffInput.typeId;
|
|
110
|
+
}
|
|
111
|
+
constructor(_instantiationService) {
|
|
112
|
+
this._instantiationService = _instantiationService;
|
|
113
|
+
}
|
|
114
|
+
canSerialize(input) {
|
|
115
|
+
return input instanceof CustomEditorSideBySideDiffInput;
|
|
116
|
+
}
|
|
117
|
+
serialize(input) {
|
|
118
|
+
const data = {
|
|
119
|
+
originalResource: input.originalResource.toJSON(),
|
|
120
|
+
modifiedResource: input.modifiedResource.toJSON(),
|
|
121
|
+
viewType: input.viewType,
|
|
122
|
+
label: input.getName(),
|
|
123
|
+
description: input.getDescription(),
|
|
124
|
+
dirty: input.isDirty(),
|
|
125
|
+
diffId: input.diffId,
|
|
126
|
+
side: input.side
|
|
127
|
+
};
|
|
128
|
+
try {
|
|
129
|
+
return JSON.stringify(data);
|
|
130
|
+
} catch {
|
|
131
|
+
return undefined;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
deserialize(_instantiationService, serializedEditorInput) {
|
|
135
|
+
const data = JSON.parse(serializedEditorInput);
|
|
136
|
+
return CustomEditorSideBySideDiffInput.create(this._instantiationService, {
|
|
137
|
+
originalResource: URI.revive(data.originalResource),
|
|
138
|
+
modifiedResource: URI.revive(data.modifiedResource),
|
|
139
|
+
viewType: data.viewType,
|
|
140
|
+
label: data.label,
|
|
141
|
+
description: data.description,
|
|
142
|
+
iconPath: undefined,
|
|
143
|
+
diffId: data.diffId,
|
|
144
|
+
side: data.side
|
|
145
|
+
}, undefined);
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
CustomEditorSideBySideDiffInputSerializer = ( __decorate([( __param(0, IInstantiationService))], CustomEditorSideBySideDiffInputSerializer));
|
|
67
149
|
function reviveWebview(webviewService, data) {
|
|
68
150
|
const webview = webviewService.createWebviewOverlay({
|
|
69
151
|
providedViewType: data.viewType,
|
|
@@ -147,6 +229,7 @@ let ComplexCustomWorkingCopyEditorHandler = class ComplexCustomWorkingCopyEditor
|
|
|
147
229
|
resource: URI.revive(backupData.editorResource),
|
|
148
230
|
viewType: backupData.viewType,
|
|
149
231
|
webviewTitle: backupData.customTitle,
|
|
232
|
+
preferredName: undefined,
|
|
150
233
|
iconPath: reviveWebviewIconPath(backupData.iconPath)
|
|
151
234
|
}, webview, {
|
|
152
235
|
backupId: backupData.backupId
|
|
@@ -157,4 +240,4 @@ let ComplexCustomWorkingCopyEditorHandler = class ComplexCustomWorkingCopyEditor
|
|
|
157
240
|
};
|
|
158
241
|
ComplexCustomWorkingCopyEditorHandler = ( __decorate([( __param(0, IInstantiationService)), ( __param(1, IWorkingCopyEditorService)), ( __param(2, IWorkingCopyBackupService)), ( __param(3, IWebviewService)), ( __param(4, ICustomEditorService))], ComplexCustomWorkingCopyEditorHandler));
|
|
159
242
|
|
|
160
|
-
export { ComplexCustomWorkingCopyEditorHandler, CustomEditorInputSerializer };
|
|
243
|
+
export { ComplexCustomWorkingCopyEditorHandler, CustomEditorDiffInputSerializer, CustomEditorInputSerializer, CustomEditorSideBySideDiffInputSerializer };
|