@codingame/monaco-vscode-api 1.78.5 → 1.78.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/dist/node_modules/tslib/tslib.es6.js +2 -2
- package/dist/vscode/vs/platform/extensionManagement/common/extensionManagement.js +1 -2
- package/dist/vscode/vs/platform/extensionManagement/common/implicitActivationEvents.js +1 -1
- package/dist/vscode/vs/platform/files/common/fileService.js +3 -3
- package/dist/vscode/vs/platform/files/common/inMemoryFilesystemProvider.js +1 -1
- package/dist/vscode/vs/platform/telemetry/common/telemetryUtils.js +1 -1
- package/dist/vscode/vs/platform/workspaces/common/workspaces.js +1 -1
- package/dist/vscode/vs/workbench/api/browser/mainThreadDebugService.js +1 -1
- package/dist/vscode/vs/workbench/api/browser/mainThreadDiagnostics.js +1 -1
- package/dist/vscode/vs/workbench/api/browser/mainThreadDocuments.js +4 -4
- package/dist/vscode/vs/workbench/api/browser/mainThreadDocumentsAndEditors.js +1 -1
- package/dist/vscode/vs/workbench/api/browser/mainThreadFileSystem.js +1 -1
- package/dist/vscode/vs/workbench/api/browser/mainThreadQuickOpen.js +1 -1
- package/dist/vscode/vs/workbench/api/common/cache.js +1 -1
- package/dist/vscode/vs/workbench/api/common/configurationExtensionPoint.js +1 -1
- package/dist/vscode/vs/workbench/api/common/extHostApiDeprecationService.js +1 -1
- package/dist/vscode/vs/workbench/api/common/extHostCommands.js +2 -2
- package/dist/vscode/vs/workbench/api/common/extHostDebugService.js +2 -2
- package/dist/vscode/vs/workbench/api/common/extHostDecorations.js +1 -1
- package/dist/vscode/vs/workbench/api/common/extHostDiagnostics.js +3 -3
- package/dist/vscode/vs/workbench/api/common/extHostDocumentsAndEditors.js +3 -3
- package/dist/vscode/vs/workbench/api/common/extHostExtensionActivator.js +1 -1
- package/dist/vscode/vs/workbench/api/common/extHostExtensionService.js +1 -1
- package/dist/vscode/vs/workbench/api/common/extHostFileSystem.js +1 -1
- package/dist/vscode/vs/workbench/api/common/extHostFileSystemInfo.js +1 -1
- package/dist/vscode/vs/workbench/api/common/extHostLanguages.js +1 -1
- package/dist/vscode/vs/workbench/api/common/extHostLocalizationService.js +1 -1
- package/dist/vscode/vs/workbench/api/common/extHostQuickOpen.js +2 -2
- package/dist/vscode/vs/workbench/api/common/extHostTextEditor.js +1 -1
- package/dist/vscode/vs/workbench/api/common/extHostTypeConverters.js +2 -2
- package/dist/vscode/vs/workbench/api/common/extHostTypes.js +4 -4
- package/dist/vscode/vs/workbench/api/common/extHostWorkspace.js +1 -1
- package/dist/vscode/vs/workbench/browser/parts/editor/editor.contribution.js +6 -795
- package/dist/vscode/vs/workbench/browser/parts/editor/editorActions.js +110 -1487
- package/dist/vscode/vs/workbench/browser/parts/editor/editorPane.js +1 -1
- package/dist/vscode/vs/workbench/browser/parts/editor/editorQuickAccess.js +1 -1
- package/dist/vscode/vs/workbench/browser/parts/editor/editorWithViewState.js +1 -1
- package/dist/vscode/vs/workbench/browser/quickaccess.js +2 -4
- package/dist/vscode/vs/workbench/common/contextkeys.js +1 -30
- package/dist/vscode/vs/workbench/common/editor.js +1 -1
- package/dist/vscode/vs/workbench/common/resources.js +3 -3
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugAdapterManager.js +1 -1
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugConfigurationManager.js +1 -1
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugEditorContribution.js +5 -5
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugSession.js +2 -2
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugToolBar.js +1 -1
- package/dist/vscode/vs/workbench/contrib/debug/common/debugModel.js +3 -3
- package/dist/vscode/vs/workbench/contrib/debug/common/debugUtils.js +1 -1
- package/dist/vscode/vs/workbench/contrib/files/common/explorerFileNestingTrie.js +1 -1
- package/dist/vscode/vs/workbench/contrib/snippets/browser/snippetsFile.js +1 -1
- package/dist/vscode/vs/workbench/contrib/snippets/browser/snippetsService.js +5 -3
- package/dist/vscode/vs/workbench/contrib/testing/common/testItemCollection.js +1 -1
- package/dist/vscode/vs/workbench/services/configuration/browser/configurationService.js +1 -1
- package/dist/vscode/vs/workbench/services/configurationResolver/browser/baseConfigurationResolverService.js +1 -1
- package/dist/vscode/vs/workbench/services/configurationResolver/common/variableResolver.js +1 -1
- package/dist/vscode/vs/workbench/services/extensions/common/extensionDescriptionRegistry.js +10 -10
- package/dist/vscode/vs/workbench/services/extensions/common/extensionsRegistry.js +3 -3
- package/dist/vscode/vs/workbench/services/keybinding/browser/keybindingService.js +3 -3
- package/dist/vscode/vs/workbench/services/keybinding/browser/unboundCommands.js +1 -1
- package/dist/vscode/vs/workbench/services/languageDetection/common/languageDetectionWorkerService.js +1 -2
- package/dist/vscode/vs/workbench/services/layout/browser/layoutService.js +1 -9
- package/dist/vscode/vs/workbench/services/output/common/output.js +1 -1
- package/dist/vscode/vs/workbench/services/preferences/common/preferencesModels.js +1 -1
- package/dist/vscode/vs/workbench/services/search/common/searchService.js +7 -7
- package/dist/vscode/vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl.js +2 -2
- package/dist/vscode/vs/workbench/services/textMate/browser/workerHost/textMateWorkerHost.js +1 -1
- package/dist/vscode/vs/workbench/services/textMate/common/TMGrammarFactory.js +1 -1
- package/dist/vscode/vs/workbench/services/textfile/common/textFileEditorModelManager.js +4 -4
- package/dist/vscode/vs/workbench/services/textmodelResolver/common/textModelResolverService.js +3 -3
- package/dist/vscode/vs/workbench/services/themes/browser/workbenchThemeService.js +1 -1
- package/dist/vscode/vs/workbench/services/workingCopy/common/workingCopyBackupService.js +11 -7
- package/dist/vscode/vs/workbench/services/workingCopy/common/workingCopyService.js +1 -1
- package/monaco-editor-treemending.patch +531 -531
- package/package.json +1 -1
- package/dist/assets/editorstatus.css +0 -51
- package/dist/assets/panelpart.css +0 -75
- package/dist/vscode/vs/workbench/browser/actions/layoutActions.js +0 -1201
- package/dist/vscode/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarActions.js +0 -146
- package/dist/vscode/vs/workbench/browser/parts/editor/editorStatus.js +0 -460
- package/dist/vscode/vs/workbench/browser/parts/panel/panelActions.js +0 -422
|
@@ -1,422 +0,0 @@
|
|
|
1
|
-
import "../../../../../../assets/panelpart.css";
|
|
2
|
-
import { localize } from 'monaco-editor/esm/vs/nls.js';
|
|
3
|
-
import { registerAction2, MenuRegistry, MenuId, Action2 } from 'monaco-editor/esm/vs/platform/actions/common/actions.js';
|
|
4
|
-
import { Categories } from 'monaco-editor/esm/vs/platform/action/common/actionCommonCategories.js';
|
|
5
|
-
import { IWorkbenchLayoutService, positionToString } from '../../../services/layout/browser/layoutService.js';
|
|
6
|
-
import { PanelAlignmentContext, PanelPositionContext, PanelMaximizedContext, PanelVisibleContext, AuxiliaryBarVisibleContext } from '../../../common/contextkeys.js';
|
|
7
|
-
import { ContextKeyExpr } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
|
|
8
|
-
import { Codicon } from 'monaco-editor/esm/vs/base/common/codicons.js';
|
|
9
|
-
import { registerIcon } from 'monaco-editor/esm/vs/platform/theme/common/iconRegistry.js';
|
|
10
|
-
import { ViewContainerLocationToString, IViewDescriptorService, IViewsService } from '../../../common/views.js';
|
|
11
|
-
import { IPaneCompositePartService } from '../../../services/panecomposite/browser/panecomposite.js';
|
|
12
|
-
import { INotificationService } from 'monaco-editor/esm/vs/platform/notification/common/notification.js';
|
|
13
|
-
var _a;
|
|
14
|
-
const maximizeIcon = ( registerIcon('panel-maximize', Codicon.chevronUp, ( localize('maximizeIcon', 'Icon to maximize a panel.'))));
|
|
15
|
-
const restoreIcon = ( registerIcon('panel-restore', Codicon.chevronDown, ( localize('restoreIcon', 'Icon to restore a panel.'))));
|
|
16
|
-
const closeIcon = ( registerIcon('panel-close', Codicon.close, ( localize('closeIcon', 'Icon to close a panel.'))));
|
|
17
|
-
const panelIcon = ( registerIcon('panel-layout-icon', Codicon.layoutPanel, ( localize('togglePanelOffIcon', 'Icon to toggle the panel off when it is on.'))));
|
|
18
|
-
const panelOffIcon = ( registerIcon('panel-layout-icon-off', Codicon.layoutPanelOff, ( localize('togglePanelOnIcon', 'Icon to toggle the panel on when it is off.'))));
|
|
19
|
-
class TogglePanelAction extends Action2 {
|
|
20
|
-
constructor() {
|
|
21
|
-
super({
|
|
22
|
-
id: TogglePanelAction.ID,
|
|
23
|
-
title: { value: TogglePanelAction.LABEL, original: 'Toggle Panel Visibility' },
|
|
24
|
-
toggled: {
|
|
25
|
-
condition: PanelVisibleContext,
|
|
26
|
-
title: ( localize('toggle panel', "Panel")),
|
|
27
|
-
mnemonicTitle: ( localize(
|
|
28
|
-
{ key: 'toggle panel mnemonic', comment: ['&& denotes a mnemonic'] },
|
|
29
|
-
"&&Panel"
|
|
30
|
-
)),
|
|
31
|
-
},
|
|
32
|
-
f1: true,
|
|
33
|
-
category: Categories.View,
|
|
34
|
-
keybinding: { primary: 2048 | 40 , weight: 200 },
|
|
35
|
-
menu: [
|
|
36
|
-
{
|
|
37
|
-
id: MenuId.MenubarAppearanceMenu,
|
|
38
|
-
group: '2_workbench_layout',
|
|
39
|
-
order: 5
|
|
40
|
-
}, {
|
|
41
|
-
id: MenuId.LayoutControlMenuSubmenu,
|
|
42
|
-
group: '0_workbench_layout',
|
|
43
|
-
order: 4
|
|
44
|
-
},
|
|
45
|
-
]
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
async run(accessor) {
|
|
49
|
-
const layoutService = accessor.get(IWorkbenchLayoutService);
|
|
50
|
-
layoutService.setPartHidden(layoutService.isVisible("workbench.parts.panel" ), "workbench.parts.panel" );
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
TogglePanelAction.ID = 'workbench.action.togglePanel';
|
|
54
|
-
TogglePanelAction.LABEL = ( localize('togglePanelVisibility', "Toggle Panel Visibility"));
|
|
55
|
-
registerAction2(TogglePanelAction);
|
|
56
|
-
registerAction2((_a = class extends Action2 {
|
|
57
|
-
constructor() {
|
|
58
|
-
super({
|
|
59
|
-
id: 'workbench.action.focusPanel',
|
|
60
|
-
title: { value: ( localize('focusPanel', "Focus into Panel")), original: 'Focus into Panel' },
|
|
61
|
-
category: Categories.View,
|
|
62
|
-
f1: true,
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
async run(accessor) {
|
|
66
|
-
const layoutService = accessor.get(IWorkbenchLayoutService);
|
|
67
|
-
const paneCompositeService = accessor.get(IPaneCompositePartService);
|
|
68
|
-
if (!layoutService.isVisible("workbench.parts.panel" )) {
|
|
69
|
-
layoutService.setPartHidden(false, "workbench.parts.panel" );
|
|
70
|
-
}
|
|
71
|
-
const panel = paneCompositeService.getActivePaneComposite(1 );
|
|
72
|
-
panel?.focus();
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
_a.ID = 'workbench.action.focusPanel',
|
|
76
|
-
_a.LABEL = ( localize('focusPanel', "Focus into Panel")),
|
|
77
|
-
_a));
|
|
78
|
-
const PositionPanelActionId = {
|
|
79
|
-
LEFT: 'workbench.action.positionPanelLeft',
|
|
80
|
-
RIGHT: 'workbench.action.positionPanelRight',
|
|
81
|
-
BOTTOM: 'workbench.action.positionPanelBottom',
|
|
82
|
-
};
|
|
83
|
-
const AlignPanelActionId = {
|
|
84
|
-
LEFT: 'workbench.action.alignPanelLeft',
|
|
85
|
-
RIGHT: 'workbench.action.alignPanelRight',
|
|
86
|
-
CENTER: 'workbench.action.alignPanelCenter',
|
|
87
|
-
JUSTIFY: 'workbench.action.alignPanelJustify',
|
|
88
|
-
};
|
|
89
|
-
function createPanelActionConfig(id, title, shortLabel, value, when) {
|
|
90
|
-
return {
|
|
91
|
-
id,
|
|
92
|
-
title,
|
|
93
|
-
shortLabel,
|
|
94
|
-
value,
|
|
95
|
-
when,
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
function createPositionPanelActionConfig(id, title, shortLabel, position) {
|
|
99
|
-
return createPanelActionConfig(id, title, shortLabel, position, ( PanelPositionContext.notEqualsTo(positionToString(position))));
|
|
100
|
-
}
|
|
101
|
-
function createAlignmentPanelActionConfig(id, title, shortLabel, alignment) {
|
|
102
|
-
return createPanelActionConfig(id, title, shortLabel, alignment, ( PanelAlignmentContext.notEqualsTo(alignment)));
|
|
103
|
-
}
|
|
104
|
-
const PositionPanelActionConfigs = [
|
|
105
|
-
createPositionPanelActionConfig(PositionPanelActionId.LEFT, { value: ( localize('positionPanelLeft', 'Move Panel Left')), original: 'Move Panel Left' }, ( localize('positionPanelLeftShort', "Left")), 0 ),
|
|
106
|
-
createPositionPanelActionConfig(PositionPanelActionId.RIGHT, { value: ( localize('positionPanelRight', 'Move Panel Right')), original: 'Move Panel Right' }, ( localize('positionPanelRightShort', "Right")), 1 ),
|
|
107
|
-
createPositionPanelActionConfig(PositionPanelActionId.BOTTOM, { value: ( localize('positionPanelBottom', 'Move Panel To Bottom')), original: 'Move Panel To Bottom' }, ( localize('positionPanelBottomShort', "Bottom")), 2 ),
|
|
108
|
-
];
|
|
109
|
-
const AlignPanelActionConfigs = [
|
|
110
|
-
createAlignmentPanelActionConfig(AlignPanelActionId.LEFT, { value: ( localize('alignPanelLeft', 'Set Panel Alignment to Left')), original: 'Set Panel Alignment to Left' }, ( localize('alignPanelLeftShort', "Left")), 'left'),
|
|
111
|
-
createAlignmentPanelActionConfig(AlignPanelActionId.RIGHT, { value: ( localize('alignPanelRight', 'Set Panel Alignment to Right')), original: 'Set Panel Alignment to Right' }, ( localize('alignPanelRightShort', "Right")), 'right'),
|
|
112
|
-
createAlignmentPanelActionConfig(AlignPanelActionId.CENTER, { value: ( localize('alignPanelCenter', 'Set Panel Alignment to Center')), original: 'Set Panel Alignment to Center' }, ( localize('alignPanelCenterShort', "Center")), 'center'),
|
|
113
|
-
createAlignmentPanelActionConfig(AlignPanelActionId.JUSTIFY, { value: ( localize('alignPanelJustify', 'Set Panel Alignment to Justify')), original: 'Set Panel Alignment to Justify' }, ( localize('alignPanelJustifyShort', "Justify")), 'justify'),
|
|
114
|
-
];
|
|
115
|
-
MenuRegistry.appendMenuItem(MenuId.MenubarAppearanceMenu, {
|
|
116
|
-
submenu: MenuId.PanelPositionMenu,
|
|
117
|
-
title: ( localize('positionPanel', "Panel Position")),
|
|
118
|
-
group: '3_workbench_layout_move',
|
|
119
|
-
order: 4
|
|
120
|
-
});
|
|
121
|
-
PositionPanelActionConfigs.forEach(positionPanelAction => {
|
|
122
|
-
const { id, title, shortLabel, value, when } = positionPanelAction;
|
|
123
|
-
registerAction2(class extends Action2 {
|
|
124
|
-
constructor() {
|
|
125
|
-
super({
|
|
126
|
-
id,
|
|
127
|
-
title,
|
|
128
|
-
category: Categories.View,
|
|
129
|
-
f1: true
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
run(accessor) {
|
|
133
|
-
const layoutService = accessor.get(IWorkbenchLayoutService);
|
|
134
|
-
layoutService.setPanelPosition(value === undefined ? 2 : value);
|
|
135
|
-
}
|
|
136
|
-
});
|
|
137
|
-
MenuRegistry.appendMenuItem(MenuId.PanelPositionMenu, {
|
|
138
|
-
command: {
|
|
139
|
-
id,
|
|
140
|
-
title: shortLabel,
|
|
141
|
-
toggled: when.negate()
|
|
142
|
-
},
|
|
143
|
-
order: 5
|
|
144
|
-
});
|
|
145
|
-
});
|
|
146
|
-
MenuRegistry.appendMenuItem(MenuId.MenubarAppearanceMenu, {
|
|
147
|
-
submenu: MenuId.PanelAlignmentMenu,
|
|
148
|
-
title: ( localize('alignPanel', "Align Panel")),
|
|
149
|
-
group: '3_workbench_layout_move',
|
|
150
|
-
order: 5
|
|
151
|
-
});
|
|
152
|
-
AlignPanelActionConfigs.forEach(alignPanelAction => {
|
|
153
|
-
const { id, title, shortLabel, value, when } = alignPanelAction;
|
|
154
|
-
registerAction2(class extends Action2 {
|
|
155
|
-
constructor() {
|
|
156
|
-
super({
|
|
157
|
-
id,
|
|
158
|
-
title: title,
|
|
159
|
-
category: Categories.View,
|
|
160
|
-
toggled: when.negate(),
|
|
161
|
-
f1: true
|
|
162
|
-
});
|
|
163
|
-
}
|
|
164
|
-
run(accessor) {
|
|
165
|
-
const layoutService = accessor.get(IWorkbenchLayoutService);
|
|
166
|
-
layoutService.setPanelAlignment(value === undefined ? 'center' : value);
|
|
167
|
-
}
|
|
168
|
-
});
|
|
169
|
-
MenuRegistry.appendMenuItem(MenuId.PanelAlignmentMenu, {
|
|
170
|
-
command: {
|
|
171
|
-
id,
|
|
172
|
-
title: shortLabel,
|
|
173
|
-
toggled: when.negate()
|
|
174
|
-
},
|
|
175
|
-
order: 5
|
|
176
|
-
});
|
|
177
|
-
});
|
|
178
|
-
class SwitchPanelViewAction extends Action2 {
|
|
179
|
-
constructor(id, title) {
|
|
180
|
-
super({
|
|
181
|
-
id,
|
|
182
|
-
title,
|
|
183
|
-
category: Categories.View,
|
|
184
|
-
f1: true,
|
|
185
|
-
});
|
|
186
|
-
}
|
|
187
|
-
async run(accessor, offset) {
|
|
188
|
-
const paneCompositeService = accessor.get(IPaneCompositePartService);
|
|
189
|
-
const pinnedPanels = paneCompositeService.getPinnedPaneCompositeIds(1 );
|
|
190
|
-
const activePanel = paneCompositeService.getActivePaneComposite(1 );
|
|
191
|
-
if (!activePanel) {
|
|
192
|
-
return;
|
|
193
|
-
}
|
|
194
|
-
let targetPanelId;
|
|
195
|
-
for (let i = 0; i < pinnedPanels.length; i++) {
|
|
196
|
-
if (pinnedPanels[i] === activePanel.getId()) {
|
|
197
|
-
targetPanelId = pinnedPanels[(i + pinnedPanels.length + offset) % pinnedPanels.length];
|
|
198
|
-
break;
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
if (typeof targetPanelId === 'string') {
|
|
202
|
-
await paneCompositeService.openPaneComposite(targetPanelId, 1 , true);
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
registerAction2(class extends SwitchPanelViewAction {
|
|
207
|
-
constructor() {
|
|
208
|
-
super('workbench.action.previousPanelView', {
|
|
209
|
-
value: ( localize('previousPanelView', 'Previous Panel View')),
|
|
210
|
-
original: 'Previous Panel View'
|
|
211
|
-
});
|
|
212
|
-
}
|
|
213
|
-
run(accessor) {
|
|
214
|
-
return super.run(accessor, -1);
|
|
215
|
-
}
|
|
216
|
-
});
|
|
217
|
-
registerAction2(class extends SwitchPanelViewAction {
|
|
218
|
-
constructor() {
|
|
219
|
-
super('workbench.action.nextPanelView', {
|
|
220
|
-
value: ( localize('nextPanelView', 'Next Panel View')),
|
|
221
|
-
original: 'Next Panel View'
|
|
222
|
-
});
|
|
223
|
-
}
|
|
224
|
-
run(accessor) {
|
|
225
|
-
return super.run(accessor, 1);
|
|
226
|
-
}
|
|
227
|
-
});
|
|
228
|
-
registerAction2(class extends Action2 {
|
|
229
|
-
constructor() {
|
|
230
|
-
super({
|
|
231
|
-
id: 'workbench.action.toggleMaximizedPanel',
|
|
232
|
-
title: { value: ( localize('toggleMaximizedPanel', "Toggle Maximized Panel")), original: 'Toggle Maximized Panel' },
|
|
233
|
-
tooltip: ( localize('maximizePanel', "Maximize Panel Size")),
|
|
234
|
-
category: Categories.View,
|
|
235
|
-
f1: true,
|
|
236
|
-
icon: maximizeIcon,
|
|
237
|
-
precondition: ( ContextKeyExpr.or(( PanelAlignmentContext.isEqualTo('center')), ( PanelPositionContext.notEqualsTo('bottom')))),
|
|
238
|
-
toggled: { condition: PanelMaximizedContext, icon: restoreIcon, tooltip: ( localize('minimizePanel', "Restore Panel Size")) },
|
|
239
|
-
menu: [{
|
|
240
|
-
id: MenuId.PanelTitle,
|
|
241
|
-
group: 'navigation',
|
|
242
|
-
order: 1,
|
|
243
|
-
when: ( ContextKeyExpr.or(( PanelAlignmentContext.isEqualTo('center')), ( PanelPositionContext.notEqualsTo('bottom'))))
|
|
244
|
-
}]
|
|
245
|
-
});
|
|
246
|
-
}
|
|
247
|
-
run(accessor) {
|
|
248
|
-
const layoutService = accessor.get(IWorkbenchLayoutService);
|
|
249
|
-
const notificationService = accessor.get(INotificationService);
|
|
250
|
-
if (layoutService.getPanelAlignment() !== 'center' && layoutService.getPanelPosition() === 2 ) {
|
|
251
|
-
notificationService.warn(( localize(
|
|
252
|
-
'panelMaxNotSupported',
|
|
253
|
-
"Maximizing the panel is only supported when it is center aligned."
|
|
254
|
-
)));
|
|
255
|
-
return;
|
|
256
|
-
}
|
|
257
|
-
if (!layoutService.isVisible("workbench.parts.panel" )) {
|
|
258
|
-
layoutService.setPartHidden(false, "workbench.parts.panel" );
|
|
259
|
-
if (!layoutService.isPanelMaximized()) {
|
|
260
|
-
layoutService.toggleMaximizedPanel();
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
else {
|
|
264
|
-
layoutService.toggleMaximizedPanel();
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
});
|
|
268
|
-
registerAction2(class extends Action2 {
|
|
269
|
-
constructor() {
|
|
270
|
-
super({
|
|
271
|
-
id: 'workbench.action.closePanel',
|
|
272
|
-
title: { value: ( localize('closePanel', "Close Panel")), original: 'Close Panel' },
|
|
273
|
-
category: Categories.View,
|
|
274
|
-
icon: closeIcon,
|
|
275
|
-
menu: [{
|
|
276
|
-
id: MenuId.CommandPalette,
|
|
277
|
-
when: PanelVisibleContext,
|
|
278
|
-
}, {
|
|
279
|
-
id: MenuId.PanelTitle,
|
|
280
|
-
group: 'navigation',
|
|
281
|
-
order: 2
|
|
282
|
-
}]
|
|
283
|
-
});
|
|
284
|
-
}
|
|
285
|
-
run(accessor) {
|
|
286
|
-
accessor.get(IWorkbenchLayoutService).setPartHidden(true, "workbench.parts.panel" );
|
|
287
|
-
}
|
|
288
|
-
});
|
|
289
|
-
registerAction2(class extends Action2 {
|
|
290
|
-
constructor() {
|
|
291
|
-
super({
|
|
292
|
-
id: 'workbench.action.closeAuxiliaryBar',
|
|
293
|
-
title: { value: ( localize('closeSecondarySideBar', "Close Secondary Side Bar")), original: 'Close Secondary Side Bar' },
|
|
294
|
-
category: Categories.View,
|
|
295
|
-
icon: closeIcon,
|
|
296
|
-
menu: [{
|
|
297
|
-
id: MenuId.CommandPalette,
|
|
298
|
-
when: AuxiliaryBarVisibleContext,
|
|
299
|
-
}, {
|
|
300
|
-
id: MenuId.AuxiliaryBarTitle,
|
|
301
|
-
group: 'navigation',
|
|
302
|
-
order: 2
|
|
303
|
-
}]
|
|
304
|
-
});
|
|
305
|
-
}
|
|
306
|
-
run(accessor) {
|
|
307
|
-
accessor.get(IWorkbenchLayoutService).setPartHidden(true, "workbench.parts.auxiliarybar" );
|
|
308
|
-
}
|
|
309
|
-
});
|
|
310
|
-
MenuRegistry.appendMenuItems([
|
|
311
|
-
{
|
|
312
|
-
id: MenuId.LayoutControlMenu,
|
|
313
|
-
item: {
|
|
314
|
-
group: '0_workbench_toggles',
|
|
315
|
-
command: {
|
|
316
|
-
id: TogglePanelAction.ID,
|
|
317
|
-
title: ( localize('togglePanel', "Toggle Panel")),
|
|
318
|
-
icon: panelOffIcon,
|
|
319
|
-
toggled: { condition: PanelVisibleContext, icon: panelIcon }
|
|
320
|
-
},
|
|
321
|
-
when: ( ContextKeyExpr.or(( ContextKeyExpr.equals('config.workbench.layoutControl.type', 'toggles')), ( ContextKeyExpr.equals('config.workbench.layoutControl.type', 'both')))),
|
|
322
|
-
order: 1
|
|
323
|
-
}
|
|
324
|
-
}, {
|
|
325
|
-
id: MenuId.ViewTitleContext,
|
|
326
|
-
item: {
|
|
327
|
-
group: '3_workbench_layout_move',
|
|
328
|
-
command: {
|
|
329
|
-
id: TogglePanelAction.ID,
|
|
330
|
-
title: { value: ( localize('hidePanel', "Hide Panel")), original: 'Hide Panel' },
|
|
331
|
-
},
|
|
332
|
-
when: ( ContextKeyExpr.and(PanelVisibleContext, ( ContextKeyExpr.equals(
|
|
333
|
-
'viewLocation',
|
|
334
|
-
ViewContainerLocationToString(1 )
|
|
335
|
-
)))),
|
|
336
|
-
order: 2
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
]);
|
|
340
|
-
class MoveViewsBetweenPanelsAction extends Action2 {
|
|
341
|
-
constructor(source, destination, desc) {
|
|
342
|
-
super(desc);
|
|
343
|
-
this.source = source;
|
|
344
|
-
this.destination = destination;
|
|
345
|
-
}
|
|
346
|
-
run(accessor, ...args) {
|
|
347
|
-
const viewDescriptorService = accessor.get(IViewDescriptorService);
|
|
348
|
-
const layoutService = accessor.get(IWorkbenchLayoutService);
|
|
349
|
-
const viewsService = accessor.get(IViewsService);
|
|
350
|
-
const srcContainers = viewDescriptorService.getViewContainersByLocation(this.source);
|
|
351
|
-
const destContainers = viewDescriptorService.getViewContainersByLocation(this.destination);
|
|
352
|
-
if (srcContainers.length) {
|
|
353
|
-
const activeViewContainer = viewsService.getVisibleViewContainer(this.source);
|
|
354
|
-
srcContainers.forEach(viewContainer => viewDescriptorService.moveViewContainerToLocation(viewContainer, this.destination));
|
|
355
|
-
layoutService.setPartHidden(false, this.destination === 1 ? "workbench.parts.panel" : "workbench.parts.auxiliarybar" );
|
|
356
|
-
if (activeViewContainer && destContainers.length === 0) {
|
|
357
|
-
viewsService.openViewContainer(activeViewContainer.id, true);
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
class MovePanelToSidePanelAction extends MoveViewsBetweenPanelsAction {
|
|
363
|
-
constructor() {
|
|
364
|
-
super(1 , 2 , {
|
|
365
|
-
id: MovePanelToSidePanelAction.ID,
|
|
366
|
-
title: {
|
|
367
|
-
value: ( localize('movePanelToSecondarySideBar', "Move Panel Views To Secondary Side Bar")),
|
|
368
|
-
original: 'Move Panel Views To Secondary Side Bar'
|
|
369
|
-
},
|
|
370
|
-
category: Categories.View,
|
|
371
|
-
f1: false
|
|
372
|
-
});
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
MovePanelToSidePanelAction.ID = 'workbench.action.movePanelToSidePanel';
|
|
376
|
-
class MovePanelToSecondarySideBarAction extends MoveViewsBetweenPanelsAction {
|
|
377
|
-
constructor() {
|
|
378
|
-
super(1 , 2 , {
|
|
379
|
-
id: MovePanelToSecondarySideBarAction.ID,
|
|
380
|
-
title: {
|
|
381
|
-
value: ( localize('movePanelToSecondarySideBar', "Move Panel Views To Secondary Side Bar")),
|
|
382
|
-
original: 'Move Panel Views To Secondary Side Bar'
|
|
383
|
-
},
|
|
384
|
-
category: Categories.View,
|
|
385
|
-
f1: true
|
|
386
|
-
});
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
MovePanelToSecondarySideBarAction.ID = 'workbench.action.movePanelToSecondarySideBar';
|
|
390
|
-
registerAction2(MovePanelToSidePanelAction);
|
|
391
|
-
registerAction2(MovePanelToSecondarySideBarAction);
|
|
392
|
-
class MoveSidePanelToPanelAction extends MoveViewsBetweenPanelsAction {
|
|
393
|
-
constructor() {
|
|
394
|
-
super(2 , 1 , {
|
|
395
|
-
id: MoveSidePanelToPanelAction.ID,
|
|
396
|
-
title: {
|
|
397
|
-
value: ( localize('moveSidePanelToPanel', "Move Secondary Side Bar Views To Panel")),
|
|
398
|
-
original: 'Move Secondary Side Bar Views To Panel'
|
|
399
|
-
},
|
|
400
|
-
category: Categories.View,
|
|
401
|
-
f1: false
|
|
402
|
-
});
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
MoveSidePanelToPanelAction.ID = 'workbench.action.moveSidePanelToPanel';
|
|
406
|
-
class MoveSecondarySideBarToPanelAction extends MoveViewsBetweenPanelsAction {
|
|
407
|
-
constructor() {
|
|
408
|
-
super(2 , 1 , {
|
|
409
|
-
id: MoveSecondarySideBarToPanelAction.ID,
|
|
410
|
-
title: {
|
|
411
|
-
value: ( localize('moveSidePanelToPanel', "Move Secondary Side Bar Views To Panel")),
|
|
412
|
-
original: 'Move Secondary Side Bar Views To Panel'
|
|
413
|
-
},
|
|
414
|
-
category: Categories.View,
|
|
415
|
-
f1: true
|
|
416
|
-
});
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
MoveSecondarySideBarToPanelAction.ID = 'workbench.action.moveSecondarySideBarToPanel';
|
|
420
|
-
registerAction2(MoveSidePanelToPanelAction);
|
|
421
|
-
registerAction2(MoveSecondarySideBarToPanelAction);
|
|
422
|
-
export { MovePanelToSecondarySideBarAction, MoveSecondarySideBarToPanelAction, TogglePanelAction };
|