@codingame/monaco-vscode-api 1.83.2 → 1.83.3-next.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.
Files changed (216) hide show
  1. package/extensions.d.ts +3 -3
  2. package/extensions.js +31 -33
  3. package/l10n.d.ts +4 -0
  4. package/l10n.js +10 -0
  5. package/missing-services.js +4 -2
  6. package/monaco-editor-treemending.patch +12268 -1070
  7. package/monaco-treemending.js +8 -2
  8. package/package.json +8 -1
  9. package/service-override/extensions.js +2 -2
  10. package/service-override/layout.js +2 -2
  11. package/tools/l10n.js +177 -0
  12. package/tools.js +22 -1
  13. package/vscode/src/vs/base/browser/ui/menu/menubar.js +1 -1
  14. package/vscode/src/vs/base/browser/ui/splitview/paneview.js +2 -2
  15. package/vscode/src/vs/base/common/date.js +55 -55
  16. package/vscode/src/vs/base/common/jsonErrorMessages.js +10 -10
  17. package/vscode/src/vs/base/common/tfIdf.js +137 -0
  18. package/vscode/src/vs/editor/contrib/quickAccess/browser/commandsQuickAccess.js +23 -0
  19. package/vscode/src/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess.js +115 -0
  20. package/vscode/src/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +112 -0
  21. package/vscode/src/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +334 -0
  22. package/vscode/src/vs/platform/dialogs/common/dialogs.js +10 -14
  23. package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +3 -0
  24. package/vscode/src/vs/platform/extensionManagement/common/extensionNls.js +2 -2
  25. package/vscode/src/vs/platform/files/common/fileService.js +28 -37
  26. package/vscode/src/vs/platform/files/common/files.js +6 -6
  27. package/vscode/src/vs/platform/files/common/io.js +2 -2
  28. package/vscode/src/vs/platform/keyboardLayout/common/keyboardConfig.js +3 -9
  29. package/vscode/src/vs/platform/quickinput/browser/commandsQuickAccess.js +300 -0
  30. package/vscode/src/vs/platform/quickinput/browser/helpQuickAccess.js +59 -0
  31. package/vscode/src/vs/platform/quickinput/browser/pickerQuickAccess.js +212 -0
  32. package/vscode/src/vs/platform/request/common/request.js +2 -2
  33. package/vscode/src/vs/platform/theme/common/tokenClassificationRegistry.js +42 -63
  34. package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +13 -32
  35. package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +2 -2
  36. package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +3 -3
  37. package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +4 -5
  38. package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +38 -50
  39. package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +21 -53
  40. package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +4 -4
  41. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +4 -5
  42. package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +6 -2
  43. package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +4 -2
  44. package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +1 -1
  45. package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +2 -12
  46. package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +15 -9
  47. package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +2 -6
  48. package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +6 -28
  49. package/vscode/src/vs/workbench/api/browser/statusBarExtensionPoint.js +60 -0
  50. package/vscode/src/vs/workbench/api/common/extHostChat.js +3 -3
  51. package/vscode/src/vs/workbench/api/common/extHostDiagnostics.js +2 -6
  52. package/vscode/src/vs/workbench/api/common/extHostExtensionService.js +2 -2
  53. package/vscode/src/vs/workbench/api/common/extHostLanguageFeatures.js +3 -11
  54. package/vscode/src/vs/workbench/api/common/extHostLogService.js +2 -2
  55. package/vscode/src/vs/workbench/api/common/extHostNotebook.js +3 -3
  56. package/vscode/src/vs/workbench/api/common/extHostProgress.js +2 -6
  57. package/vscode/src/vs/workbench/api/common/extHostStatusBar.js +3 -7
  58. package/vscode/src/vs/workbench/api/common/extHostTelemetry.js +2 -6
  59. package/vscode/src/vs/workbench/api/common/extHostTerminalService.js +2 -6
  60. package/vscode/src/vs/workbench/api/common/extHostTreeViews.js +2 -2
  61. package/vscode/src/vs/workbench/api/common/extHostTunnelService.js +2 -2
  62. package/vscode/src/vs/workbench/api/common/extHostWorkspace.js +2 -7
  63. package/vscode/src/vs/workbench/api/common/jsonValidationExtensionPoint.js +9 -34
  64. package/vscode/src/vs/workbench/browser/actions/layoutActions.js +898 -68
  65. package/vscode/src/vs/workbench/browser/actions/quickAccessActions.js +7 -7
  66. package/vscode/src/vs/workbench/browser/actions/windowActions.js +32 -38
  67. package/vscode/src/vs/workbench/browser/actions/workspaceActions.js +103 -13
  68. package/vscode/src/vs/workbench/browser/actions/workspaceCommands.js +2 -2
  69. package/vscode/src/vs/workbench/browser/editor.js +3 -3
  70. package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarActions.js +12 -27
  71. package/vscode/src/vs/workbench/browser/parts/compositeBarActions.js +12 -12
  72. package/vscode/src/vs/workbench/browser/parts/editor/binaryDiffEditor.js +2 -7
  73. package/vscode/src/vs/workbench/browser/parts/editor/binaryEditor.js +4 -7
  74. package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbs.js +42 -90
  75. package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +140 -272
  76. package/vscode/src/vs/workbench/browser/parts/editor/editorActions.js +115 -148
  77. package/vscode/src/vs/workbench/browser/parts/editor/editorCommands.js +21 -33
  78. package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +7 -19
  79. package/vscode/src/vs/workbench/browser/parts/editor/editorPlaceholder.js +10 -26
  80. package/vscode/src/vs/workbench/browser/parts/editor/editorQuickAccess.js +7 -17
  81. package/vscode/src/vs/workbench/browser/parts/editor/editorStatus.js +60 -81
  82. package/vscode/src/vs/workbench/browser/parts/editor/sideBySideEditor.js +2 -2
  83. package/vscode/src/vs/workbench/browser/parts/editor/textCodeEditor.js +2 -2
  84. package/vscode/src/vs/workbench/browser/parts/editor/textDiffEditor.js +4 -11
  85. package/vscode/src/vs/workbench/browser/parts/editor/textEditor.js +2 -2
  86. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsCommands.js +8 -8
  87. package/vscode/src/vs/workbench/browser/parts/panel/panelActions.js +69 -34
  88. package/vscode/src/vs/workbench/browser/parts/titlebar/menubarControl.js +58 -34
  89. package/vscode/src/vs/workbench/browser/parts/views/viewFilter.js +2 -2
  90. package/vscode/src/vs/workbench/browser/parts/views/viewPane.js +3 -9
  91. package/vscode/src/vs/workbench/browser/parts/views/viewPaneContainer.js +6 -6
  92. package/vscode/src/vs/workbench/browser/parts/views/viewsService.js +7 -11
  93. package/vscode/src/vs/workbench/browser/quickaccess.js +7 -3
  94. package/vscode/src/vs/workbench/browser/workbench.contribution.js +186 -683
  95. package/vscode/src/vs/workbench/common/configuration.js +12 -15
  96. package/vscode/src/vs/workbench/common/contextkeys.js +272 -90
  97. package/vscode/src/vs/workbench/common/editor/diffEditorInput.js +2 -2
  98. package/vscode/src/vs/workbench/common/editor/sideBySideEditorInput.js +2 -7
  99. package/vscode/src/vs/workbench/common/editor/textEditorModel.js +2 -6
  100. package/vscode/src/vs/workbench/common/editor.js +5 -5
  101. package/vscode/src/vs/workbench/common/theme.js +137 -527
  102. package/vscode/src/vs/workbench/common/views.js +4 -8
  103. package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.js +15 -55
  104. package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityContributions.js +3 -8
  105. package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleView.js +22 -60
  106. package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleViewActions.js +9 -15
  107. package/vscode/src/vs/workbench/contrib/bulkEdit/browser/bulkEditService.js +18 -48
  108. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.js +2 -0
  109. package/vscode/src/vs/workbench/contrib/chat/common/chatAgents.js +5 -10
  110. package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.js +5 -13
  111. package/vscode/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.js +8 -27
  112. package/vscode/src/vs/workbench/contrib/codeActions/common/codeActionsExtensionPoint.js +5 -17
  113. package/vscode/src/vs/workbench/contrib/codeActions/common/documentationExtensionPoint.js +6 -15
  114. package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.js +7 -20
  115. package/vscode/src/vs/workbench/contrib/codeEditor/browser/inspectEditorTokens/inspectEditorTokens.js +2 -2
  116. package/vscode/src/vs/workbench/contrib/codeEditor/browser/languageConfigurationExtensionPoint.js +63 -216
  117. package/vscode/src/vs/workbench/contrib/codeEditor/browser/largeFileOptimizations.js +4 -7
  118. package/vscode/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoLineQuickAccess.js +5 -8
  119. package/vscode/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess.js +8 -11
  120. package/vscode/src/vs/workbench/contrib/codeEditor/browser/saveParticipants.js +5 -15
  121. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMinimap.js +3 -3
  122. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier.js +5 -5
  123. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderControlCharacter.js +3 -6
  124. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderWhitespace.js +3 -6
  125. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.js +10 -9
  126. package/vscode/src/vs/workbench/contrib/comments/browser/commentColors.js +6 -15
  127. package/vscode/src/vs/workbench/contrib/comments/browser/commentGlyphWidget.js +5 -20
  128. package/vscode/src/vs/workbench/contrib/comments/browser/commentNode.js +3 -10
  129. package/vscode/src/vs/workbench/contrib/comments/browser/commentReply.js +4 -4
  130. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadBody.js +3 -20
  131. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadHeader.js +9 -3
  132. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadWidget.js +4 -13
  133. package/vscode/src/vs/workbench/contrib/comments/browser/comments.contribution.js +26 -77
  134. package/vscode/src/vs/workbench/contrib/comments/browser/commentsController.js +5 -17
  135. package/vscode/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.js +7 -12
  136. package/vscode/src/vs/workbench/contrib/comments/browser/commentsView.js +10 -29
  137. package/vscode/src/vs/workbench/contrib/comments/browser/commentsViewActions.js +10 -10
  138. package/vscode/src/vs/workbench/contrib/comments/browser/reactionsAction.js +8 -8
  139. package/vscode/src/vs/workbench/contrib/comments/common/commentContextKeys.js +25 -21
  140. package/vscode/src/vs/workbench/contrib/comments/common/commentModel.js +2 -2
  141. package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.js +1 -4
  142. package/vscode/src/vs/workbench/contrib/debug/browser/debugColors.js +13 -13
  143. package/vscode/src/vs/workbench/contrib/debug/browser/debugIcons.js +56 -98
  144. package/vscode/src/vs/workbench/contrib/debug/common/abstractDebugAdapter.js +2 -2
  145. package/vscode/src/vs/workbench/contrib/debug/common/debug.js +96 -180
  146. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsIcons.js +25 -79
  147. package/vscode/src/vs/workbench/contrib/externalUriOpener/common/configuration.js +4 -15
  148. package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpenerService.js +4 -8
  149. package/vscode/src/vs/workbench/contrib/files/browser/explorerViewlet.js +56 -19
  150. package/vscode/src/vs/workbench/contrib/files/browser/fileActions.js +76 -230
  151. package/vscode/src/vs/workbench/contrib/files/browser/fileConstants.js +6 -5
  152. package/vscode/src/vs/workbench/contrib/files/browser/fileImportExport.js +33 -103
  153. package/vscode/src/vs/workbench/contrib/files/browser/files.contribution.js +228 -99
  154. package/vscode/src/vs/workbench/contrib/files/browser/views/emptyView.js +1 -1
  155. package/vscode/src/vs/workbench/contrib/files/browser/views/explorerDecorationsProvider.js +5 -9
  156. package/vscode/src/vs/workbench/contrib/files/browser/views/explorerView.js +5 -5
  157. package/vscode/src/vs/workbench/contrib/files/browser/views/explorerViewer.js +15 -35
  158. package/vscode/src/vs/workbench/contrib/files/browser/views/openEditorsView.js +5 -8
  159. package/vscode/src/vs/workbench/contrib/files/common/files.js +27 -48
  160. package/vscode/src/vs/workbench/contrib/folding/browser/folding.contribution.js +3 -6
  161. package/vscode/src/vs/workbench/contrib/format/browser/formatModified.js +1 -1
  162. package/vscode/src/vs/workbench/contrib/inlayHints/browser/inlayHintsAccessibilty.js +5 -8
  163. package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +112 -52
  164. package/vscode/src/vs/workbench/contrib/keybindings/browser/keybindings.contribution.js +1 -1
  165. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.js +2 -2
  166. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +30 -96
  167. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel.js +3 -3
  168. package/vscode/src/vs/workbench/contrib/mergeEditor/common/mergeEditor.js +42 -0
  169. package/vscode/src/vs/workbench/contrib/output/browser/output.contribution.js +23 -29
  170. package/vscode/src/vs/workbench/contrib/output/browser/outputView.js +3 -3
  171. package/vscode/src/vs/workbench/contrib/quickaccess/browser/commandsQuickAccess.js +13 -16
  172. package/vscode/src/vs/workbench/contrib/quickaccess/browser/quickAccess.contribution.js +15 -34
  173. package/vscode/src/vs/workbench/contrib/quickaccess/browser/viewQuickAccess.js +12 -17
  174. package/vscode/src/vs/workbench/contrib/scm/browser/dirtyDiffSwitcher.js +2 -2
  175. package/vscode/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.js +26 -75
  176. package/vscode/src/vs/workbench/contrib/snippets/browser/snippetCompletionProvider.js +4 -19
  177. package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsFile.js +4 -4
  178. package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsService.js +10 -41
  179. package/vscode/src/vs/workbench/contrib/tasks/common/taskDefinitionRegistry.js +5 -14
  180. package/vscode/src/vs/workbench/contrib/tasks/common/taskService.js +26 -13
  181. package/vscode/src/vs/workbench/contrib/tasks/common/tasks.js +8 -6
  182. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalEditorInput.js +5 -17
  183. package/vscode/src/vs/workbench/contrib/terminal/common/terminal.js +7 -28
  184. package/vscode/src/vs/workbench/contrib/terminal/common/terminalColorRegistry.js +21 -78
  185. package/vscode/src/vs/workbench/contrib/terminal/common/terminalContextKey.js +21 -53
  186. package/vscode/src/vs/workbench/contrib/testing/common/testResult.js +2 -2
  187. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditor.js +2 -5
  188. package/vscode/src/vs/workbench/services/actions/common/menusExtensionPoint.js +113 -348
  189. package/vscode/src/vs/workbench/services/assignment/common/assignmentService.js +2 -5
  190. package/vscode/src/vs/workbench/services/authentication/browser/authenticationService.js +31 -1
  191. package/vscode/src/vs/workbench/services/configuration/common/jsonEditingService.js +1 -4
  192. package/vscode/src/vs/workbench/services/configurationResolver/common/variableResolver.js +16 -16
  193. package/vscode/src/vs/workbench/services/decorations/browser/decorationsService.js +2 -2
  194. package/vscode/src/vs/workbench/services/editor/common/editorResolverService.js +2 -5
  195. package/vscode/src/vs/workbench/services/extensions/browser/extensionUrlHandler.js +4 -4
  196. package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +10 -45
  197. package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +1 -1
  198. package/vscode/src/vs/workbench/services/extensions/common/extensionsRegistry.js +80 -296
  199. package/vscode/src/vs/workbench/services/filesConfiguration/common/filesConfigurationService.js +6 -21
  200. package/vscode/src/vs/workbench/services/host/browser/browserHostService.js +3 -6
  201. package/vscode/src/vs/workbench/services/keybinding/browser/keybindingService.js +24 -81
  202. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayoutService.js +2 -2
  203. package/vscode/src/vs/workbench/services/keybinding/common/keybindingEditing.js +11 -17
  204. package/vscode/src/vs/workbench/services/language/common/languageService.js +23 -98
  205. package/vscode/src/vs/workbench/services/remote/common/tunnelModel.js +9 -11
  206. package/vscode/src/vs/workbench/services/search/common/queryBuilder.js +1 -5
  207. package/vscode/src/vs/workbench/services/textfile/browser/textFileService.js +11 -23
  208. package/vscode/src/vs/workbench/services/textfile/common/textFileEditorModel.js +2 -2
  209. package/vscode/src/vs/workbench/services/textfile/common/textFileEditorModelManager.js +2 -7
  210. package/vscode/src/vs/workbench/services/textfile/common/textFileSaveParticipant.js +2 -2
  211. package/vscode/src/vs/workbench/services/themes/common/colorExtensionPoint.js +16 -53
  212. package/vscode/src/vs/workbench/services/themes/common/iconExtensionPoint.js +50 -1
  213. package/vscode/src/vs/workbench/services/themes/common/tokenClassificationExtensionPoint.js +25 -99
  214. package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfile.js +6 -3
  215. package/vscode/src/vs/workbench/services/userDataSync/common/userDataSync.js +15 -3
  216. package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopySaveParticipant.js +2 -2
@@ -1,44 +1,56 @@
1
- import { localize } from 'monaco-editor/esm/vs/nls.js';
2
- import { Action2, MenuId, registerAction2 } from 'monaco-editor/esm/vs/platform/actions/common/actions.js';
1
+ import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js';
2
+ import { registerAction2, Action2, MenuId, MenuRegistry } from 'monaco-editor/esm/vs/platform/actions/common/actions.js';
3
3
  import { Categories } from 'monaco-editor/esm/vs/platform/action/common/actionCommonCategories.js';
4
4
  import { IConfigurationService } from 'monaco-editor/esm/vs/platform/configuration/common/configuration.js';
5
5
  import { IWorkbenchLayoutService, positionToString } from '../../services/layout/browser/layoutService.js';
6
+ import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
6
7
  import { KeyChord } from 'monaco-editor/esm/vs/base/common/keyCodes.js';
7
- import { isMacintosh, isNative } from 'monaco-editor/esm/vs/base/common/platform.js';
8
+ import { isWindows, isLinux, isWeb, isMacintosh, isNative } from 'monaco-editor/esm/vs/base/common/platform.js';
8
9
  import { IsMacNativeContext } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkeys.js';
9
10
  import { KeybindingsRegistry } from 'monaco-editor/esm/vs/platform/keybinding/common/keybindingsRegistry.js';
10
11
  import { ContextKeyExpr, IContextKeyService } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
12
+ import { ViewContainerLocationToString, IViewDescriptorService, IViewsService } from '../../common/views.js';
13
+ import { IQuickInputService } from 'monaco-editor/esm/vs/platform/quickinput/common/quickInput.js';
11
14
  import '../../../../../../override/vs/platform/dialogs/common/dialogs.js';
15
+ import { IPaneCompositePartService } from '../../services/panecomposite/browser/panecomposite.js';
12
16
  import { ToggleAuxiliaryBarAction } from '../parts/auxiliarybar/auxiliaryBarActions.js';
13
17
  import { TogglePanelAction } from '../parts/panel/panelActions.js';
14
- import { SideBarVisibleContext, InEditorZenModeContext, AuxiliaryBarVisibleContext, PanelVisibleContext, PanelAlignmentContext, IsFullscreenContext, IsCenteredLayoutContext } from '../../common/contextkeys.js';
18
+ import { ICommandService } from 'monaco-editor/esm/vs/platform/commands/common/commands.js';
19
+ import { IsCenteredLayoutContext, EditorAreaVisibleContext, PanelAlignmentContext, PanelPositionContext, SideBarVisibleContext, InEditorZenModeContext, FocusedViewContext, AuxiliaryBarVisibleContext, PanelVisibleContext, IsFullscreenContext } from '../../common/contextkeys.js';
15
20
  import { Codicon } from 'monaco-editor/esm/vs/base/common/codicons.js';
21
+ import { ThemeIcon } from 'monaco-editor/esm/vs/base/common/themables.js';
22
+ import { DisposableStore } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
16
23
  import { registerIcon } from 'monaco-editor/esm/vs/platform/theme/common/iconRegistry.js';
17
- const menubarIcon = registerIcon('menuBar', Codicon.layoutMenubar, ( localize('menuBarIcon', "Represents the menu bar")));
18
- const activityBarLeftIcon = registerIcon('activity-bar-left', Codicon.layoutActivitybarLeft, ( localize('activityBarLeft', "Represents the activity bar in the left position")));
19
- const activityBarRightIcon = registerIcon('activity-bar-right', Codicon.layoutActivitybarRight, ( localize('activityBarRight', "Represents the activity bar in the right position")));
20
- const panelLeftIcon = registerIcon('panel-left', Codicon.layoutSidebarLeft, ( localize('panelLeft', "Represents a side bar in the left position")));
21
- registerIcon('panel-left-off', Codicon.layoutSidebarLeftOff, ( localize('panelLeftOff', "Represents a side bar in the left position toggled off")));
22
- const panelRightIcon = registerIcon('panel-right', Codicon.layoutSidebarRight, ( localize('panelRight', "Represents side bar in the right position")));
23
- registerIcon('panel-right-off', Codicon.layoutSidebarRightOff, ( localize('panelRightOff', "Represents side bar in the right position toggled off")));
24
- const panelIcon = registerIcon('panel-bottom', Codicon.layoutPanel, ( localize('panelBottom', "Represents the bottom panel")));
25
- const statusBarIcon = registerIcon('statusBar', Codicon.layoutStatusbar, ( localize('statusBarIcon', "Represents the status bar")));
26
- const panelAlignmentLeftIcon = registerIcon('panel-align-left', Codicon.layoutPanelLeft, ( localize('panelBottomLeft', "Represents the bottom panel alignment set to the left")));
27
- const panelAlignmentRightIcon = registerIcon('panel-align-right', Codicon.layoutPanelRight, ( localize(
28
- 'panelBottomRight',
29
- "Represents the bottom panel alignment set to the right"
30
- )));
31
- const panelAlignmentCenterIcon = registerIcon('panel-align-center', Codicon.layoutPanelCenter, ( localize(
32
- 'panelBottomCenter',
33
- "Represents the bottom panel alignment set to the center"
34
- )));
35
- const panelAlignmentJustifyIcon = registerIcon('panel-align-justify', Codicon.layoutPanelJustify, ( localize(
36
- 'panelBottomJustify',
37
- "Represents the bottom panel alignment set to justified"
38
- )));
39
- const fullscreenIcon = registerIcon('fullscreen', Codicon.screenFull, ( localize('fullScreenIcon', "Represents full screen")));
40
- const centerLayoutIcon = registerIcon('centerLayoutIcon', Codicon.layoutCentered, ( localize('centerLayoutIcon', "Represents centered layout mode")));
41
- const zenModeIcon = registerIcon('zenMode', Codicon.target, ( localize('zenModeIcon', "Represents zen mode")));
24
+ import { IDialogService } from '../../../platform/dialogs/common/dialogs.js';
25
+ const menubarIcon = registerIcon('menuBar', Codicon.layoutMenubar, localizeWithPath('vs/workbench/browser/actions/layoutActions', 'menuBarIcon', "Represents the menu bar"));
26
+ const activityBarLeftIcon = registerIcon('activity-bar-left', Codicon.layoutActivitybarLeft, localizeWithPath('vs/workbench/browser/actions/layoutActions', 'activityBarLeft', "Represents the activity bar in the left position"));
27
+ const activityBarRightIcon = registerIcon('activity-bar-right', Codicon.layoutActivitybarRight, localizeWithPath('vs/workbench/browser/actions/layoutActions', 'activityBarRight', "Represents the activity bar in the right position"));
28
+ const panelLeftIcon = registerIcon('panel-left', Codicon.layoutSidebarLeft, localizeWithPath('vs/workbench/browser/actions/layoutActions', 'panelLeft', "Represents a side bar in the left position"));
29
+ const panelLeftOffIcon = registerIcon('panel-left-off', Codicon.layoutSidebarLeftOff, localizeWithPath('vs/workbench/browser/actions/layoutActions', 'panelLeftOff', "Represents a side bar in the left position toggled off"));
30
+ const panelRightIcon = registerIcon('panel-right', Codicon.layoutSidebarRight, localizeWithPath('vs/workbench/browser/actions/layoutActions', 'panelRight', "Represents side bar in the right position"));
31
+ const panelRightOffIcon = registerIcon('panel-right-off', Codicon.layoutSidebarRightOff, localizeWithPath('vs/workbench/browser/actions/layoutActions', 'panelRightOff', "Represents side bar in the right position toggled off"));
32
+ const panelIcon = registerIcon('panel-bottom', Codicon.layoutPanel, localizeWithPath('vs/workbench/browser/actions/layoutActions', 'panelBottom', "Represents the bottom panel"));
33
+ const statusBarIcon = registerIcon('statusBar', Codicon.layoutStatusbar, localizeWithPath('vs/workbench/browser/actions/layoutActions', 'statusBarIcon', "Represents the status bar"));
34
+ const panelAlignmentLeftIcon = registerIcon('panel-align-left', Codicon.layoutPanelLeft, localizeWithPath('vs/workbench/browser/actions/layoutActions', 'panelBottomLeft', "Represents the bottom panel alignment set to the left"));
35
+ const panelAlignmentRightIcon = registerIcon('panel-align-right', Codicon.layoutPanelRight, localizeWithPath('vs/workbench/browser/actions/layoutActions', 'panelBottomRight', "Represents the bottom panel alignment set to the right"));
36
+ const panelAlignmentCenterIcon = registerIcon('panel-align-center', Codicon.layoutPanelCenter, localizeWithPath('vs/workbench/browser/actions/layoutActions', 'panelBottomCenter', "Represents the bottom panel alignment set to the center"));
37
+ const panelAlignmentJustifyIcon = registerIcon('panel-align-justify', Codicon.layoutPanelJustify, localizeWithPath('vs/workbench/browser/actions/layoutActions', 'panelBottomJustify', "Represents the bottom panel alignment set to justified"));
38
+ const fullscreenIcon = registerIcon('fullscreen', Codicon.screenFull, localizeWithPath('vs/workbench/browser/actions/layoutActions', 'fullScreenIcon', "Represents full screen"));
39
+ const centerLayoutIcon = registerIcon('centerLayoutIcon', Codicon.layoutCentered, localizeWithPath('vs/workbench/browser/actions/layoutActions', 'centerLayoutIcon', "Represents centered layout mode"));
40
+ const zenModeIcon = registerIcon('zenMode', Codicon.target, localizeWithPath('vs/workbench/browser/actions/layoutActions', 'zenModeIcon', "Represents zen mode"));
41
+ registerAction2(class extends Action2 {
42
+ constructor() {
43
+ super({
44
+ id: 'workbench.action.closeSidebar',
45
+ title: { value: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'closeSidebar', "Close Primary Side Bar"), original: 'Close Primary Side Bar' },
46
+ category: Categories.View,
47
+ f1: true
48
+ });
49
+ }
50
+ run(accessor) {
51
+ accessor.get(IWorkbenchLayoutService).setPartHidden(true, "workbench.parts.sidebar" );
52
+ }
53
+ });
42
54
  class ToggleActivityBarVisibilityAction extends Action2 {
43
55
  static { this.ID = 'workbench.action.toggleActivityBarVisibility'; }
44
56
  static { this.activityBarVisibleKey = 'workbench.activityBar.visible'; }
@@ -46,11 +58,8 @@ class ToggleActivityBarVisibilityAction extends Action2 {
46
58
  super({
47
59
  id: ToggleActivityBarVisibilityAction.ID,
48
60
  title: {
49
- value: ( localize('toggleActivityBar', "Toggle Activity Bar Visibility")),
50
- mnemonicTitle: ( localize(
51
- { key: 'miActivityBar', comment: ['&& denotes a mnemonic'] },
52
- "&&Activity Bar"
53
- )),
61
+ value: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'toggleActivityBar', "Toggle Activity Bar Visibility"),
62
+ mnemonicTitle: localizeWithPath('vs/workbench/browser/actions/layoutActions', { key: 'miActivityBar', comment: ['&& denotes a mnemonic'] }, "&&Activity Bar"),
54
63
  original: 'Toggle Activity Bar Visibility'
55
64
  },
56
65
  category: Categories.View,
@@ -71,6 +80,31 @@ class ToggleActivityBarVisibilityAction extends Action2 {
71
80
  configurationService.updateValue(ToggleActivityBarVisibilityAction.activityBarVisibleKey, newVisibilityValue);
72
81
  }
73
82
  }
83
+ registerAction2(ToggleActivityBarVisibilityAction);
84
+ registerAction2(class extends Action2 {
85
+ constructor() {
86
+ super({
87
+ id: 'workbench.action.toggleCenteredLayout',
88
+ title: {
89
+ value: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'toggleCenteredLayout', "Toggle Centered Layout"),
90
+ mnemonicTitle: localizeWithPath('vs/workbench/browser/actions/layoutActions', { key: 'miToggleCenteredLayout', comment: ['&& denotes a mnemonic'] }, "&&Centered Layout"),
91
+ original: 'Toggle Centered Layout'
92
+ },
93
+ category: Categories.View,
94
+ f1: true,
95
+ toggled: IsCenteredLayoutContext,
96
+ menu: [{
97
+ id: MenuId.MenubarAppearanceMenu,
98
+ group: '1_toggle_view',
99
+ order: 3
100
+ }]
101
+ });
102
+ }
103
+ run(accessor) {
104
+ const layoutService = accessor.get(IWorkbenchLayoutService);
105
+ layoutService.centerEditorLayout(!layoutService.isEditorLayoutCentered());
106
+ }
107
+ });
74
108
  const sidebarPositionConfigurationKey = 'workbench.sideBar.location';
75
109
  class MoveSidebarPositionAction extends Action2 {
76
110
  constructor(id, title, position) {
@@ -94,7 +128,7 @@ class MoveSidebarRightAction extends MoveSidebarPositionAction {
94
128
  static { this.ID = 'workbench.action.moveSideBarRight'; }
95
129
  constructor() {
96
130
  super(MoveSidebarRightAction.ID, {
97
- value: ( localize('moveSidebarRight', "Move Primary Side Bar Right")),
131
+ value: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'moveSidebarRight', "Move Primary Side Bar Right"),
98
132
  original: 'Move Primary Side Bar Right'
99
133
  }, 1 );
100
134
  }
@@ -103,21 +137,23 @@ class MoveSidebarLeftAction extends MoveSidebarPositionAction {
103
137
  static { this.ID = 'workbench.action.moveSideBarLeft'; }
104
138
  constructor() {
105
139
  super(MoveSidebarLeftAction.ID, {
106
- value: ( localize('moveSidebarLeft', "Move Primary Side Bar Left")),
140
+ value: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'moveSidebarLeft', "Move Primary Side Bar Left"),
107
141
  original: 'Move Primary Side Bar Left'
108
142
  }, 0 );
109
143
  }
110
144
  }
145
+ registerAction2(MoveSidebarRightAction);
146
+ registerAction2(MoveSidebarLeftAction);
111
147
  class ToggleSidebarPositionAction extends Action2 {
112
148
  static { this.ID = 'workbench.action.toggleSidebarPosition'; }
113
- static { this.LABEL = ( localize('toggleSidebarPosition', "Toggle Primary Side Bar Position")); }
149
+ static { this.LABEL = localizeWithPath('vs/workbench/browser/actions/layoutActions', 'toggleSidebarPosition', "Toggle Primary Side Bar Position"); }
114
150
  static getLabel(layoutService) {
115
- return layoutService.getSideBarPosition() === 0 ? ( localize('moveSidebarRight', "Move Primary Side Bar Right")) : ( localize('moveSidebarLeft', "Move Primary Side Bar Left"));
151
+ return layoutService.getSideBarPosition() === 0 ? localizeWithPath('vs/workbench/browser/actions/layoutActions', 'moveSidebarRight', "Move Primary Side Bar Right") : localizeWithPath('vs/workbench/browser/actions/layoutActions', 'moveSidebarLeft', "Move Primary Side Bar Left");
116
152
  }
117
153
  constructor() {
118
154
  super({
119
155
  id: ToggleSidebarPositionAction.ID,
120
- title: { value: ( localize('toggleSidebarPosition', "Toggle Primary Side Bar Position")), original: 'Toggle Primary Side Bar Position' },
156
+ title: { value: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'toggleSidebarPosition', "Toggle Primary Side Bar Position"), original: 'Toggle Primary Side Bar Position' },
121
157
  category: Categories.View,
122
158
  f1: true
123
159
  });
@@ -130,20 +166,153 @@ class ToggleSidebarPositionAction extends Action2 {
130
166
  return configurationService.updateValue(sidebarPositionConfigurationKey, newPositionValue);
131
167
  }
132
168
  }
133
- registerIcon('configure-layout-icon', Codicon.layout, ( localize('cofigureLayoutIcon', 'Icon represents workbench layout configuration.')));
169
+ registerAction2(ToggleSidebarPositionAction);
170
+ const configureLayoutIcon = registerIcon('configure-layout-icon', Codicon.layout, localizeWithPath('vs/workbench/browser/actions/layoutActions', 'cofigureLayoutIcon', 'Icon represents workbench layout configuration.'));
171
+ ( MenuRegistry.appendMenuItem(MenuId.LayoutControlMenu, {
172
+ submenu: MenuId.LayoutControlMenuSubmenu,
173
+ title: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'configureLayout', "Configure Layout"),
174
+ icon: configureLayoutIcon,
175
+ group: '1_workbench_layout',
176
+ when: ( ContextKeyExpr.equals('config.workbench.layoutControl.type', 'menu'))
177
+ }));
178
+ ( MenuRegistry.appendMenuItems([{
179
+ id: MenuId.ViewContainerTitleContext,
180
+ item: {
181
+ group: '3_workbench_layout_move',
182
+ command: {
183
+ id: ToggleSidebarPositionAction.ID,
184
+ title: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'move side bar right', "Move Primary Side Bar Right")
185
+ },
186
+ when: ( ContextKeyExpr.and(( ContextKeyExpr.notEquals('config.workbench.sideBar.location', 'right')), ( ContextKeyExpr.equals(
187
+ 'viewContainerLocation',
188
+ ViewContainerLocationToString(0 )
189
+ )))),
190
+ order: 1
191
+ }
192
+ }, {
193
+ id: MenuId.ViewTitleContext,
194
+ item: {
195
+ group: '3_workbench_layout_move',
196
+ command: {
197
+ id: ToggleSidebarPositionAction.ID,
198
+ title: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'move sidebar right', "Move Primary Side Bar Right")
199
+ },
200
+ when: ( ContextKeyExpr.and(( ContextKeyExpr.notEquals('config.workbench.sideBar.location', 'right')), ( ContextKeyExpr.equals(
201
+ 'viewLocation',
202
+ ViewContainerLocationToString(0 )
203
+ )))),
204
+ order: 1
205
+ }
206
+ }, {
207
+ id: MenuId.ViewContainerTitleContext,
208
+ item: {
209
+ group: '3_workbench_layout_move',
210
+ command: {
211
+ id: ToggleSidebarPositionAction.ID,
212
+ title: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'move sidebar left', "Move Primary Side Bar Left")
213
+ },
214
+ when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('config.workbench.sideBar.location', 'right')), ( ContextKeyExpr.equals(
215
+ 'viewContainerLocation',
216
+ ViewContainerLocationToString(0 )
217
+ )))),
218
+ order: 1
219
+ }
220
+ }, {
221
+ id: MenuId.ViewTitleContext,
222
+ item: {
223
+ group: '3_workbench_layout_move',
224
+ command: {
225
+ id: ToggleSidebarPositionAction.ID,
226
+ title: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'move sidebar left', "Move Primary Side Bar Left")
227
+ },
228
+ when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('config.workbench.sideBar.location', 'right')), ( ContextKeyExpr.equals(
229
+ 'viewLocation',
230
+ ViewContainerLocationToString(0 )
231
+ )))),
232
+ order: 1
233
+ }
234
+ }, {
235
+ id: MenuId.ViewTitleContext,
236
+ item: {
237
+ group: '3_workbench_layout_move',
238
+ command: {
239
+ id: ToggleSidebarPositionAction.ID,
240
+ title: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'move second sidebar left', "Move Secondary Side Bar Left")
241
+ },
242
+ when: ( ContextKeyExpr.and(( ContextKeyExpr.notEquals('config.workbench.sideBar.location', 'right')), ( ContextKeyExpr.equals(
243
+ 'viewLocation',
244
+ ViewContainerLocationToString(2 )
245
+ )))),
246
+ order: 1
247
+ }
248
+ }, {
249
+ id: MenuId.ViewTitleContext,
250
+ item: {
251
+ group: '3_workbench_layout_move',
252
+ command: {
253
+ id: ToggleSidebarPositionAction.ID,
254
+ title: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'move second sidebar right', "Move Secondary Side Bar Right")
255
+ },
256
+ when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('config.workbench.sideBar.location', 'right')), ( ContextKeyExpr.equals(
257
+ 'viewLocation',
258
+ ViewContainerLocationToString(2 )
259
+ )))),
260
+ order: 1
261
+ }
262
+ }]));
263
+ ( MenuRegistry.appendMenuItem(MenuId.MenubarAppearanceMenu, {
264
+ group: '3_workbench_layout_move',
265
+ command: {
266
+ id: ToggleSidebarPositionAction.ID,
267
+ title: localizeWithPath('vs/workbench/browser/actions/layoutActions', { key: 'miMoveSidebarRight', comment: ['&& denotes a mnemonic'] }, "&&Move Primary Side Bar Right")
268
+ },
269
+ when: ( ContextKeyExpr.notEquals('config.workbench.sideBar.location', 'right')),
270
+ order: 2
271
+ }));
272
+ ( MenuRegistry.appendMenuItem(MenuId.MenubarAppearanceMenu, {
273
+ group: '3_workbench_layout_move',
274
+ command: {
275
+ id: ToggleSidebarPositionAction.ID,
276
+ title: localizeWithPath('vs/workbench/browser/actions/layoutActions', { key: 'miMoveSidebarLeft', comment: ['&& denotes a mnemonic'] }, "&&Move Primary Side Bar Left")
277
+ },
278
+ when: ( ContextKeyExpr.equals('config.workbench.sideBar.location', 'right')),
279
+ order: 2
280
+ }));
281
+ registerAction2(class extends Action2 {
282
+ constructor() {
283
+ super({
284
+ id: 'workbench.action.toggleEditorVisibility',
285
+ title: {
286
+ value: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'toggleEditor', "Toggle Editor Area Visibility"),
287
+ mnemonicTitle: localizeWithPath('vs/workbench/browser/actions/layoutActions', { key: 'miShowEditorArea', comment: ['&& denotes a mnemonic'] }, "Show &&Editor Area"),
288
+ original: 'Toggle Editor Area Visibility'
289
+ },
290
+ category: Categories.View,
291
+ f1: true,
292
+ toggled: EditorAreaVisibleContext,
293
+ precondition: ( ContextKeyExpr.or(( PanelAlignmentContext.isEqualTo('center')), ( PanelPositionContext.notEqualsTo('bottom'))))
294
+ });
295
+ }
296
+ run(accessor) {
297
+ accessor.get(IWorkbenchLayoutService).toggleMaximizedPanel();
298
+ }
299
+ });
300
+ ( MenuRegistry.appendMenuItem(MenuId.MenubarViewMenu, {
301
+ group: '2_appearance',
302
+ title: localizeWithPath('vs/workbench/browser/actions/layoutActions', { key: 'miAppearance', comment: ['&& denotes a mnemonic'] }, "&&Appearance"),
303
+ submenu: MenuId.MenubarAppearanceMenu,
304
+ order: 1
305
+ }));
134
306
  class ToggleSidebarVisibilityAction extends Action2 {
135
307
  static { this.ID = 'workbench.action.toggleSidebarVisibility'; }
136
308
  constructor() {
137
309
  super({
138
310
  id: ToggleSidebarVisibilityAction.ID,
139
- title: { value: ( localize('toggleSidebar', "Toggle Primary Side Bar Visibility")), original: 'Toggle Primary Side Bar Visibility' },
311
+ title: { value: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'toggleSidebar', "Toggle Primary Side Bar Visibility"), original: 'Toggle Primary Side Bar Visibility' },
140
312
  toggled: {
141
313
  condition: SideBarVisibleContext,
142
- title: ( localize('primary sidebar', "Primary Side Bar")),
143
- mnemonicTitle: ( localize(
144
- { key: 'primary sidebar mnemonic', comment: ['&& denotes a mnemonic'] },
145
- "&&Primary Side Bar"
146
- )),
314
+ title: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'primary sidebar', "Primary Side Bar"),
315
+ mnemonicTitle: localizeWithPath('vs/workbench/browser/actions/layoutActions', { key: 'primary sidebar mnemonic', comment: ['&& denotes a mnemonic'] }, "&&Primary Side Bar"),
147
316
  },
148
317
  category: Categories.View,
149
318
  f1: true,
@@ -170,6 +339,64 @@ class ToggleSidebarVisibilityAction extends Action2 {
170
339
  layoutService.setPartHidden(layoutService.isVisible("workbench.parts.sidebar" ), "workbench.parts.sidebar" );
171
340
  }
172
341
  }
342
+ registerAction2(ToggleSidebarVisibilityAction);
343
+ ( MenuRegistry.appendMenuItems([
344
+ {
345
+ id: MenuId.ViewContainerTitleContext,
346
+ item: {
347
+ group: '3_workbench_layout_move',
348
+ command: {
349
+ id: ToggleSidebarVisibilityAction.ID,
350
+ title: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'compositePart.hideSideBarLabel', "Hide Primary Side Bar"),
351
+ },
352
+ when: ( ContextKeyExpr.and(SideBarVisibleContext, ( ContextKeyExpr.equals(
353
+ 'viewContainerLocation',
354
+ ViewContainerLocationToString(0 )
355
+ )))),
356
+ order: 2
357
+ }
358
+ }, {
359
+ id: MenuId.ViewTitleContext,
360
+ item: {
361
+ group: '3_workbench_layout_move',
362
+ command: {
363
+ id: ToggleSidebarVisibilityAction.ID,
364
+ title: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'compositePart.hideSideBarLabel', "Hide Primary Side Bar"),
365
+ },
366
+ when: ( ContextKeyExpr.and(SideBarVisibleContext, ( ContextKeyExpr.equals(
367
+ 'viewLocation',
368
+ ViewContainerLocationToString(0 )
369
+ )))),
370
+ order: 2
371
+ }
372
+ }, {
373
+ id: MenuId.LayoutControlMenu,
374
+ item: {
375
+ group: '0_workbench_toggles',
376
+ command: {
377
+ id: ToggleSidebarVisibilityAction.ID,
378
+ title: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'toggleSideBar', "Toggle Primary Side Bar"),
379
+ icon: panelLeftOffIcon,
380
+ toggled: { condition: SideBarVisibleContext, icon: panelLeftIcon }
381
+ },
382
+ when: ( ContextKeyExpr.and(( ContextKeyExpr.or(( ContextKeyExpr.equals('config.workbench.layoutControl.type', 'toggles')), ( ContextKeyExpr.equals('config.workbench.layoutControl.type', 'both')))), ( ContextKeyExpr.equals('config.workbench.sideBar.location', 'left')))),
383
+ order: 0
384
+ }
385
+ }, {
386
+ id: MenuId.LayoutControlMenu,
387
+ item: {
388
+ group: '0_workbench_toggles',
389
+ command: {
390
+ id: ToggleSidebarVisibilityAction.ID,
391
+ title: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'toggleSideBar', "Toggle Primary Side Bar"),
392
+ icon: panelRightOffIcon,
393
+ toggled: { condition: SideBarVisibleContext, icon: panelRightIcon }
394
+ },
395
+ when: ( ContextKeyExpr.and(( ContextKeyExpr.or(( ContextKeyExpr.equals('config.workbench.layoutControl.type', 'toggles')), ( ContextKeyExpr.equals('config.workbench.layoutControl.type', 'both')))), ( ContextKeyExpr.equals('config.workbench.sideBar.location', 'right')))),
396
+ order: 2
397
+ }
398
+ }
399
+ ]));
173
400
  class ToggleStatusbarVisibilityAction extends Action2 {
174
401
  static { this.ID = 'workbench.action.toggleStatusbarVisibility'; }
175
402
  static { this.statusbarVisibleKey = 'workbench.statusBar.visible'; }
@@ -177,8 +404,8 @@ class ToggleStatusbarVisibilityAction extends Action2 {
177
404
  super({
178
405
  id: ToggleStatusbarVisibilityAction.ID,
179
406
  title: {
180
- value: ( localize('toggleStatusbar', "Toggle Status Bar Visibility")),
181
- mnemonicTitle: ( localize({ key: 'miStatusbar', comment: ['&& denotes a mnemonic'] }, "S&&tatus Bar")),
407
+ value: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'toggleStatusbar', "Toggle Status Bar Visibility"),
408
+ mnemonicTitle: localizeWithPath('vs/workbench/browser/actions/layoutActions', { key: 'miStatusbar', comment: ['&& denotes a mnemonic'] }, "S&&tatus Bar"),
182
409
  original: 'Toggle Status Bar Visibility'
183
410
  },
184
411
  category: Categories.View,
@@ -199,6 +426,7 @@ class ToggleStatusbarVisibilityAction extends Action2 {
199
426
  return configurationService.updateValue(ToggleStatusbarVisibilityAction.statusbarVisibleKey, newVisibilityValue);
200
427
  }
201
428
  }
429
+ registerAction2(ToggleStatusbarVisibilityAction);
202
430
  class BaseToggleBooleanSettingAction extends Action2 {
203
431
  run(accessor) {
204
432
  const configurationService = accessor.get(IConfigurationService);
@@ -213,7 +441,7 @@ class ToggleTabsVisibilityAction extends BaseToggleBooleanSettingAction {
213
441
  super({
214
442
  id: ToggleTabsVisibilityAction.ID,
215
443
  title: {
216
- value: ( localize('toggleTabs', "Toggle Editor Tab Visibility")),
444
+ value: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'toggleTabs', "Toggle Editor Tab Visibility"),
217
445
  original: 'Toggle Editor Tab Visibility'
218
446
  },
219
447
  category: Categories.View,
@@ -231,7 +459,7 @@ class ToggleSeparatePinnedTabsAction extends BaseToggleBooleanSettingAction {
231
459
  super({
232
460
  id: ToggleSeparatePinnedTabsAction.ID,
233
461
  title: {
234
- value: ( localize('toggleSeparatePinnedEditorTabs', "Separate Pinned Editor Tabs")),
462
+ value: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'toggleSeparatePinnedEditorTabs', "Separate Pinned Editor Tabs"),
235
463
  original: 'Separate Pinned Editor Tabs'
236
464
  },
237
465
  category: Categories.View,
@@ -243,6 +471,34 @@ class ToggleSeparatePinnedTabsAction extends BaseToggleBooleanSettingAction {
243
471
  return 'workbench.editor.pinnedTabsOnSeparateRow';
244
472
  }
245
473
  }
474
+ registerAction2(ToggleSeparatePinnedTabsAction);
475
+ registerAction2(class extends Action2 {
476
+ constructor() {
477
+ super({
478
+ id: 'workbench.action.toggleZenMode',
479
+ title: {
480
+ value: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'toggleZenMode', "Toggle Zen Mode"),
481
+ mnemonicTitle: localizeWithPath('vs/workbench/browser/actions/layoutActions', { key: 'miToggleZenMode', comment: ['&& denotes a mnemonic'] }, "Zen Mode"),
482
+ original: 'Toggle Zen Mode'
483
+ },
484
+ category: Categories.View,
485
+ f1: true,
486
+ keybinding: {
487
+ weight: 200 ,
488
+ primary: KeyChord(2048 | 41 , 56 )
489
+ },
490
+ toggled: InEditorZenModeContext,
491
+ menu: [{
492
+ id: MenuId.MenubarAppearanceMenu,
493
+ group: '1_toggle_view',
494
+ order: 2
495
+ }]
496
+ });
497
+ }
498
+ run(accessor) {
499
+ return accessor.get(IWorkbenchLayoutService).toggleZenMode();
500
+ }
501
+ });
246
502
  KeybindingsRegistry.registerCommandAndKeybindingRule({
247
503
  id: 'workbench.action.exitZenMode',
248
504
  weight: 100 - 1000,
@@ -256,6 +512,345 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
256
512
  when: InEditorZenModeContext,
257
513
  primary: KeyChord(9 , 9 )
258
514
  });
515
+ if (isWindows || isLinux || isWeb) {
516
+ registerAction2(class ToggleMenubarAction extends Action2 {
517
+ constructor() {
518
+ super({
519
+ id: 'workbench.action.toggleMenuBar',
520
+ title: {
521
+ value: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'toggleMenuBar', "Toggle Menu Bar"),
522
+ mnemonicTitle: localizeWithPath('vs/workbench/browser/actions/layoutActions', { key: 'miMenuBar', comment: ['&& denotes a mnemonic'] }, "Menu &&Bar"),
523
+ original: 'Toggle Menu Bar'
524
+ },
525
+ category: Categories.View,
526
+ f1: true,
527
+ toggled: ( ContextKeyExpr.and(( IsMacNativeContext.toNegated()), ( ContextKeyExpr.notEquals('config.window.menuBarVisibility', 'hidden')), ( ContextKeyExpr.notEquals('config.window.menuBarVisibility', 'toggle')), ( ContextKeyExpr.notEquals('config.window.menuBarVisibility', 'compact')))),
528
+ menu: [{
529
+ id: MenuId.MenubarAppearanceMenu,
530
+ group: '2_workbench_layout',
531
+ order: 0
532
+ }]
533
+ });
534
+ }
535
+ run(accessor) {
536
+ return accessor.get(IWorkbenchLayoutService).toggleMenuBar();
537
+ }
538
+ });
539
+ ( MenuRegistry.appendMenuItem(MenuId.TitleBarContext, {
540
+ command: {
541
+ id: 'workbench.action.toggleMenuBar',
542
+ title: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'miMenuBarNoMnemonic', "Menu Bar"),
543
+ toggled: ( ContextKeyExpr.and(( IsMacNativeContext.toNegated()), ( ContextKeyExpr.notEquals('config.window.menuBarVisibility', 'hidden')), ( ContextKeyExpr.notEquals('config.window.menuBarVisibility', 'toggle')), ( ContextKeyExpr.notEquals('config.window.menuBarVisibility', 'compact'))))
544
+ },
545
+ order: 0
546
+ }));
547
+ }
548
+ registerAction2(class extends Action2 {
549
+ constructor() {
550
+ super({
551
+ id: 'workbench.action.resetViewLocations',
552
+ title: {
553
+ value: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'resetViewLocations', "Reset View Locations"),
554
+ original: 'Reset View Locations'
555
+ },
556
+ category: Categories.View,
557
+ f1: true
558
+ });
559
+ }
560
+ run(accessor) {
561
+ return accessor.get(IViewDescriptorService).reset();
562
+ }
563
+ });
564
+ registerAction2(class extends Action2 {
565
+ constructor() {
566
+ super({
567
+ id: 'workbench.action.moveView',
568
+ title: {
569
+ value: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'moveView', "Move View"),
570
+ original: 'Move View'
571
+ },
572
+ category: Categories.View,
573
+ f1: true
574
+ });
575
+ }
576
+ async run(accessor) {
577
+ const viewDescriptorService = accessor.get(IViewDescriptorService);
578
+ const instantiationService = accessor.get(IInstantiationService);
579
+ const quickInputService = accessor.get(IQuickInputService);
580
+ const contextKeyService = accessor.get(IContextKeyService);
581
+ const paneCompositePartService = accessor.get(IPaneCompositePartService);
582
+ const focusedViewId = FocusedViewContext.getValue(contextKeyService);
583
+ let viewId;
584
+ if (focusedViewId && viewDescriptorService.getViewDescriptorById(focusedViewId)?.canMoveView) {
585
+ viewId = focusedViewId;
586
+ }
587
+ try {
588
+ viewId = await this.getView(quickInputService, viewDescriptorService, paneCompositePartService, viewId);
589
+ if (!viewId) {
590
+ return;
591
+ }
592
+ const moveFocusedViewAction = ( new MoveFocusedViewAction());
593
+ instantiationService.invokeFunction(accessor => moveFocusedViewAction.run(accessor, viewId));
594
+ }
595
+ catch { }
596
+ }
597
+ getViewItems(viewDescriptorService, paneCompositePartService) {
598
+ const results = [];
599
+ const viewlets = paneCompositePartService.getVisiblePaneCompositeIds(0 );
600
+ viewlets.forEach(viewletId => {
601
+ const container = viewDescriptorService.getViewContainerById(viewletId);
602
+ const containerModel = viewDescriptorService.getViewContainerModel(container);
603
+ let hasAddedView = false;
604
+ containerModel.visibleViewDescriptors.forEach(viewDescriptor => {
605
+ if (viewDescriptor.canMoveView) {
606
+ if (!hasAddedView) {
607
+ results.push({
608
+ type: 'separator',
609
+ label: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'sidebarContainer', "Side Bar / {0}", containerModel.title)
610
+ });
611
+ hasAddedView = true;
612
+ }
613
+ results.push({
614
+ id: viewDescriptor.id,
615
+ label: viewDescriptor.name
616
+ });
617
+ }
618
+ });
619
+ });
620
+ const panels = paneCompositePartService.getPinnedPaneCompositeIds(1 );
621
+ panels.forEach(panel => {
622
+ const container = viewDescriptorService.getViewContainerById(panel);
623
+ const containerModel = viewDescriptorService.getViewContainerModel(container);
624
+ let hasAddedView = false;
625
+ containerModel.visibleViewDescriptors.forEach(viewDescriptor => {
626
+ if (viewDescriptor.canMoveView) {
627
+ if (!hasAddedView) {
628
+ results.push({
629
+ type: 'separator',
630
+ label: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'panelContainer', "Panel / {0}", containerModel.title)
631
+ });
632
+ hasAddedView = true;
633
+ }
634
+ results.push({
635
+ id: viewDescriptor.id,
636
+ label: viewDescriptor.name
637
+ });
638
+ }
639
+ });
640
+ });
641
+ const sidePanels = paneCompositePartService.getPinnedPaneCompositeIds(2 );
642
+ sidePanels.forEach(panel => {
643
+ const container = viewDescriptorService.getViewContainerById(panel);
644
+ const containerModel = viewDescriptorService.getViewContainerModel(container);
645
+ let hasAddedView = false;
646
+ containerModel.visibleViewDescriptors.forEach(viewDescriptor => {
647
+ if (viewDescriptor.canMoveView) {
648
+ if (!hasAddedView) {
649
+ results.push({
650
+ type: 'separator',
651
+ label: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'secondarySideBarContainer', "Secondary Side Bar / {0}", containerModel.title)
652
+ });
653
+ hasAddedView = true;
654
+ }
655
+ results.push({
656
+ id: viewDescriptor.id,
657
+ label: viewDescriptor.name
658
+ });
659
+ }
660
+ });
661
+ });
662
+ return results;
663
+ }
664
+ async getView(quickInputService, viewDescriptorService, paneCompositePartService, viewId) {
665
+ const quickPick = quickInputService.createQuickPick();
666
+ quickPick.placeholder = localizeWithPath('vs/workbench/browser/actions/layoutActions', 'moveFocusedView.selectView', "Select a View to Move");
667
+ quickPick.items = this.getViewItems(viewDescriptorService, paneCompositePartService);
668
+ quickPick.selectedItems = quickPick.items.filter(item => item.id === viewId);
669
+ return ( new Promise((resolve, reject) => {
670
+ quickPick.onDidAccept(() => {
671
+ const viewId = quickPick.selectedItems[0];
672
+ if (viewId.id) {
673
+ resolve(viewId.id);
674
+ }
675
+ else {
676
+ reject();
677
+ }
678
+ quickPick.hide();
679
+ });
680
+ quickPick.onDidHide(() => reject());
681
+ quickPick.show();
682
+ }));
683
+ }
684
+ });
685
+ class MoveFocusedViewAction extends Action2 {
686
+ constructor() {
687
+ super({
688
+ id: 'workbench.action.moveFocusedView',
689
+ title: {
690
+ value: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'moveFocusedView', "Move Focused View"),
691
+ original: 'Move Focused View'
692
+ },
693
+ category: Categories.View,
694
+ precondition: ( FocusedViewContext.notEqualsTo('')),
695
+ f1: true
696
+ });
697
+ }
698
+ run(accessor, viewId) {
699
+ const viewDescriptorService = accessor.get(IViewDescriptorService);
700
+ const viewsService = accessor.get(IViewsService);
701
+ const quickInputService = accessor.get(IQuickInputService);
702
+ const contextKeyService = accessor.get(IContextKeyService);
703
+ const dialogService = accessor.get(IDialogService);
704
+ const paneCompositePartService = accessor.get(IPaneCompositePartService);
705
+ const focusedViewId = viewId || FocusedViewContext.getValue(contextKeyService);
706
+ if (focusedViewId === undefined || focusedViewId.trim() === '') {
707
+ dialogService.error(localizeWithPath('vs/workbench/browser/actions/layoutActions', 'moveFocusedView.error.noFocusedView', "There is no view currently focused."));
708
+ return;
709
+ }
710
+ const viewDescriptor = viewDescriptorService.getViewDescriptorById(focusedViewId);
711
+ if (!viewDescriptor || !viewDescriptor.canMoveView) {
712
+ dialogService.error(localizeWithPath('vs/workbench/browser/actions/layoutActions', 'moveFocusedView.error.nonMovableView', "The currently focused view is not movable."));
713
+ return;
714
+ }
715
+ const quickPick = quickInputService.createQuickPick();
716
+ quickPick.placeholder = localizeWithPath('vs/workbench/browser/actions/layoutActions', 'moveFocusedView.selectDestination', "Select a Destination for the View");
717
+ quickPick.title = localizeWithPath('vs/workbench/browser/actions/layoutActions', { key: 'moveFocusedView.title', comment: ['{0} indicates the title of the view the user has selected to move.'] }, "View: Move {0}", viewDescriptor.name);
718
+ const items = [];
719
+ const currentContainer = viewDescriptorService.getViewContainerByViewId(focusedViewId);
720
+ const currentLocation = viewDescriptorService.getViewLocationById(focusedViewId);
721
+ const isViewSolo = viewDescriptorService.getViewContainerModel(currentContainer).allViewDescriptors.length === 1;
722
+ if (!((isViewSolo && currentLocation === 1) )) {
723
+ items.push({
724
+ id: '_.panel.newcontainer',
725
+ label: localizeWithPath('vs/workbench/browser/actions/layoutActions', { key: 'moveFocusedView.newContainerInPanel', comment: ['Creates a new top-level tab in the panel.'] }, "New Panel Entry"),
726
+ });
727
+ }
728
+ if (!((isViewSolo && currentLocation === 0) )) {
729
+ items.push({
730
+ id: '_.sidebar.newcontainer',
731
+ label: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'moveFocusedView.newContainerInSidebar', "New Side Bar Entry")
732
+ });
733
+ }
734
+ if (!((isViewSolo && currentLocation === 2) )) {
735
+ items.push({
736
+ id: '_.auxiliarybar.newcontainer',
737
+ label: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'moveFocusedView.newContainerInSidePanel', "New Secondary Side Bar Entry")
738
+ });
739
+ }
740
+ items.push({
741
+ type: 'separator',
742
+ label: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'sidebar', "Side Bar")
743
+ });
744
+ const pinnedViewlets = paneCompositePartService.getVisiblePaneCompositeIds(0 );
745
+ items.push(...( pinnedViewlets
746
+ .filter(viewletId => {
747
+ if (viewletId === viewDescriptorService.getViewContainerByViewId(focusedViewId).id) {
748
+ return false;
749
+ }
750
+ return !viewDescriptorService.getViewContainerById(viewletId).rejectAddedViews;
751
+ })
752
+ .map(viewletId => {
753
+ return {
754
+ id: viewletId,
755
+ label: viewDescriptorService.getViewContainerModel(viewDescriptorService.getViewContainerById(viewletId)).title
756
+ };
757
+ })));
758
+ items.push({
759
+ type: 'separator',
760
+ label: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'panel', "Panel")
761
+ });
762
+ const pinnedPanels = paneCompositePartService.getPinnedPaneCompositeIds(1 );
763
+ items.push(...( pinnedPanels
764
+ .filter(panel => {
765
+ if (panel === viewDescriptorService.getViewContainerByViewId(focusedViewId).id) {
766
+ return false;
767
+ }
768
+ return !viewDescriptorService.getViewContainerById(panel).rejectAddedViews;
769
+ })
770
+ .map(panel => {
771
+ return {
772
+ id: panel,
773
+ label: viewDescriptorService.getViewContainerModel(viewDescriptorService.getViewContainerById(panel)).title
774
+ };
775
+ })));
776
+ items.push({
777
+ type: 'separator',
778
+ label: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'secondarySideBar', "Secondary Side Bar")
779
+ });
780
+ const pinnedAuxPanels = paneCompositePartService.getPinnedPaneCompositeIds(2 );
781
+ items.push(...( pinnedAuxPanels
782
+ .filter(panel => {
783
+ if (panel === viewDescriptorService.getViewContainerByViewId(focusedViewId).id) {
784
+ return false;
785
+ }
786
+ return !viewDescriptorService.getViewContainerById(panel).rejectAddedViews;
787
+ })
788
+ .map(panel => {
789
+ return {
790
+ id: panel,
791
+ label: viewDescriptorService.getViewContainerModel(viewDescriptorService.getViewContainerById(panel)).title
792
+ };
793
+ })));
794
+ quickPick.items = items;
795
+ quickPick.onDidAccept(() => {
796
+ const destination = quickPick.selectedItems[0];
797
+ if (destination.id === '_.panel.newcontainer') {
798
+ viewDescriptorService.moveViewToLocation(viewDescriptor, 1 );
799
+ viewsService.openView(focusedViewId, true);
800
+ }
801
+ else if (destination.id === '_.sidebar.newcontainer') {
802
+ viewDescriptorService.moveViewToLocation(viewDescriptor, 0 );
803
+ viewsService.openView(focusedViewId, true);
804
+ }
805
+ else if (destination.id === '_.auxiliarybar.newcontainer') {
806
+ viewDescriptorService.moveViewToLocation(viewDescriptor, 2 );
807
+ viewsService.openView(focusedViewId, true);
808
+ }
809
+ else if (destination.id) {
810
+ viewDescriptorService.moveViewsToContainer([viewDescriptor], viewDescriptorService.getViewContainerById(destination.id));
811
+ viewsService.openView(focusedViewId, true);
812
+ }
813
+ quickPick.hide();
814
+ });
815
+ quickPick.show();
816
+ }
817
+ }
818
+ registerAction2(MoveFocusedViewAction);
819
+ registerAction2(class extends Action2 {
820
+ constructor() {
821
+ super({
822
+ id: 'workbench.action.resetFocusedViewLocation',
823
+ title: {
824
+ value: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'resetFocusedViewLocation', "Reset Focused View Location"),
825
+ original: 'Reset Focused View Location'
826
+ },
827
+ category: Categories.View,
828
+ f1: true,
829
+ precondition: ( FocusedViewContext.notEqualsTo(''))
830
+ });
831
+ }
832
+ run(accessor) {
833
+ const viewDescriptorService = accessor.get(IViewDescriptorService);
834
+ const contextKeyService = accessor.get(IContextKeyService);
835
+ const dialogService = accessor.get(IDialogService);
836
+ const viewsService = accessor.get(IViewsService);
837
+ const focusedViewId = FocusedViewContext.getValue(contextKeyService);
838
+ let viewDescriptor = null;
839
+ if (focusedViewId !== undefined && focusedViewId.trim() !== '') {
840
+ viewDescriptor = viewDescriptorService.getViewDescriptorById(focusedViewId);
841
+ }
842
+ if (!viewDescriptor) {
843
+ dialogService.error(localizeWithPath('vs/workbench/browser/actions/layoutActions', 'resetFocusedView.error.noFocusedView', "There is no view currently focused."));
844
+ return;
845
+ }
846
+ const defaultContainer = viewDescriptorService.getDefaultContainerById(viewDescriptor.id);
847
+ if (!defaultContainer || defaultContainer === viewDescriptorService.getViewContainerByViewId(viewDescriptor.id)) {
848
+ return;
849
+ }
850
+ viewDescriptorService.moveViewsToContainer([viewDescriptor], defaultContainer);
851
+ viewsService.openView(viewDescriptor.id, true);
852
+ }
853
+ });
259
854
  class BaseResizeViewAction extends Action2 {
260
855
  static { this.RESIZE_INCREMENT = 60; }
261
856
  resizePart(widthChange, heightChange, layoutService, partToResize) {
@@ -286,6 +881,87 @@ class BaseResizeViewAction extends Action2 {
286
881
  }
287
882
  }
288
883
  }
884
+ class IncreaseViewSizeAction extends BaseResizeViewAction {
885
+ constructor() {
886
+ super({
887
+ id: 'workbench.action.increaseViewSize',
888
+ title: { value: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'increaseViewSize', "Increase Current View Size"), original: 'Increase Current View Size' },
889
+ f1: true
890
+ });
891
+ }
892
+ run(accessor) {
893
+ this.resizePart(BaseResizeViewAction.RESIZE_INCREMENT, BaseResizeViewAction.RESIZE_INCREMENT, accessor.get(IWorkbenchLayoutService));
894
+ }
895
+ }
896
+ class IncreaseViewWidthAction extends BaseResizeViewAction {
897
+ constructor() {
898
+ super({
899
+ id: 'workbench.action.increaseViewWidth',
900
+ title: { value: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'increaseEditorWidth', "Increase Editor Width"), original: 'Increase Editor Width' },
901
+ f1: true
902
+ });
903
+ }
904
+ run(accessor) {
905
+ this.resizePart(BaseResizeViewAction.RESIZE_INCREMENT, 0, accessor.get(IWorkbenchLayoutService), "workbench.parts.editor" );
906
+ }
907
+ }
908
+ class IncreaseViewHeightAction extends BaseResizeViewAction {
909
+ constructor() {
910
+ super({
911
+ id: 'workbench.action.increaseViewHeight',
912
+ title: { value: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'increaseEditorHeight', "Increase Editor Height"), original: 'Increase Editor Height' },
913
+ f1: true
914
+ });
915
+ }
916
+ run(accessor) {
917
+ this.resizePart(0, BaseResizeViewAction.RESIZE_INCREMENT, accessor.get(IWorkbenchLayoutService), "workbench.parts.editor" );
918
+ }
919
+ }
920
+ class DecreaseViewSizeAction extends BaseResizeViewAction {
921
+ constructor() {
922
+ super({
923
+ id: 'workbench.action.decreaseViewSize',
924
+ title: { value: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'decreaseViewSize', "Decrease Current View Size"), original: 'Decrease Current View Size' },
925
+ f1: true
926
+ });
927
+ }
928
+ run(accessor) {
929
+ this.resizePart(-BaseResizeViewAction.RESIZE_INCREMENT, -BaseResizeViewAction.RESIZE_INCREMENT, accessor.get(IWorkbenchLayoutService));
930
+ }
931
+ }
932
+ class DecreaseViewWidthAction extends BaseResizeViewAction {
933
+ constructor() {
934
+ super({
935
+ id: 'workbench.action.decreaseViewWidth',
936
+ title: { value: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'decreaseEditorWidth', "Decrease Editor Width"), original: 'Decrease Editor Width' },
937
+ f1: true
938
+ });
939
+ }
940
+ run(accessor) {
941
+ this.resizePart(-BaseResizeViewAction.RESIZE_INCREMENT, 0, accessor.get(IWorkbenchLayoutService), "workbench.parts.editor" );
942
+ }
943
+ }
944
+ class DecreaseViewHeightAction extends BaseResizeViewAction {
945
+ constructor() {
946
+ super({
947
+ id: 'workbench.action.decreaseViewHeight',
948
+ title: { value: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'decreaseEditorHeight', "Decrease Editor Height"), original: 'Decrease Editor Height' },
949
+ f1: true
950
+ });
951
+ }
952
+ run(accessor) {
953
+ this.resizePart(0, -BaseResizeViewAction.RESIZE_INCREMENT, accessor.get(IWorkbenchLayoutService), "workbench.parts.editor" );
954
+ }
955
+ }
956
+ registerAction2(IncreaseViewSizeAction);
957
+ registerAction2(IncreaseViewWidthAction);
958
+ registerAction2(IncreaseViewHeightAction);
959
+ registerAction2(DecreaseViewSizeAction);
960
+ registerAction2(DecreaseViewWidthAction);
961
+ registerAction2(DecreaseViewHeightAction);
962
+ function isContextualLayoutVisualIcon(icon) {
963
+ return icon.iconA !== undefined;
964
+ }
289
965
  const CreateToggleLayoutItem = (id, active, label, visualIcon) => {
290
966
  return {
291
967
  id,
@@ -294,8 +970,8 @@ const CreateToggleLayoutItem = (id, active, label, visualIcon) => {
294
970
  visualIcon,
295
971
  activeIcon: Codicon.eye,
296
972
  inactiveIcon: Codicon.eyeClosed,
297
- activeAriaLabel: ( localize('selectToHide', "Select to Hide")),
298
- inactiveAriaLabel: ( localize('selectToShow', "Select to Show")),
973
+ activeAriaLabel: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'selectToHide', "Select to Hide"),
974
+ inactiveAriaLabel: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'selectToShow', "Select to Show"),
299
975
  useButtons: true,
300
976
  };
301
977
  };
@@ -306,36 +982,36 @@ const CreateOptionLayoutItem = (id, active, label, visualIcon) => {
306
982
  label,
307
983
  visualIcon,
308
984
  activeIcon: Codicon.check,
309
- activeAriaLabel: ( localize('active', "Active")),
985
+ activeAriaLabel: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'active', "Active"),
310
986
  useButtons: false
311
987
  };
312
988
  };
313
989
  const MenuBarToggledContext = ( ContextKeyExpr.and(( IsMacNativeContext.toNegated()), ( ContextKeyExpr.notEquals('config.window.menuBarVisibility', 'hidden')), ( ContextKeyExpr.notEquals('config.window.menuBarVisibility', 'toggle')), ( ContextKeyExpr.notEquals('config.window.menuBarVisibility', 'compact'))));
314
990
  const ToggleVisibilityActions = [];
315
991
  if (!isMacintosh || !isNative) {
316
- ToggleVisibilityActions.push(CreateToggleLayoutItem('workbench.action.toggleMenuBar', MenuBarToggledContext, ( localize('menuBar', "Menu Bar")), menubarIcon));
992
+ ToggleVisibilityActions.push(CreateToggleLayoutItem('workbench.action.toggleMenuBar', MenuBarToggledContext, localizeWithPath('vs/workbench/browser/actions/layoutActions', 'menuBar', "Menu Bar"), menubarIcon));
317
993
  }
318
994
  ToggleVisibilityActions.push(...[
319
- CreateToggleLayoutItem(ToggleActivityBarVisibilityAction.ID, ( ContextKeyExpr.equals('config.workbench.activityBar.visible', true)), ( localize('activityBar', "Activity Bar")), { whenA: ( ContextKeyExpr.equals('config.workbench.sideBar.location', 'left')), iconA: activityBarLeftIcon, iconB: activityBarRightIcon }),
320
- CreateToggleLayoutItem(ToggleSidebarVisibilityAction.ID, SideBarVisibleContext, ( localize('sideBar', "Primary Side Bar")), { whenA: ( ContextKeyExpr.equals('config.workbench.sideBar.location', 'left')), iconA: panelLeftIcon, iconB: panelRightIcon }),
321
- CreateToggleLayoutItem(ToggleAuxiliaryBarAction.ID, AuxiliaryBarVisibleContext, ( localize('secondarySideBar', "Secondary Side Bar")), { whenA: ( ContextKeyExpr.equals('config.workbench.sideBar.location', 'left')), iconA: panelRightIcon, iconB: panelLeftIcon }),
322
- CreateToggleLayoutItem(TogglePanelAction.ID, PanelVisibleContext, ( localize('panel', "Panel")), panelIcon),
323
- CreateToggleLayoutItem(ToggleStatusbarVisibilityAction.ID, ( ContextKeyExpr.equals('config.workbench.statusBar.visible', true)), ( localize('statusBar', "Status Bar")), statusBarIcon),
995
+ CreateToggleLayoutItem(ToggleActivityBarVisibilityAction.ID, ( ContextKeyExpr.equals('config.workbench.activityBar.visible', true)), localizeWithPath('vs/workbench/browser/actions/layoutActions', 'activityBar', "Activity Bar"), { whenA: ( ContextKeyExpr.equals('config.workbench.sideBar.location', 'left')), iconA: activityBarLeftIcon, iconB: activityBarRightIcon }),
996
+ CreateToggleLayoutItem(ToggleSidebarVisibilityAction.ID, SideBarVisibleContext, localizeWithPath('vs/workbench/browser/actions/layoutActions', 'sideBar', "Primary Side Bar"), { whenA: ( ContextKeyExpr.equals('config.workbench.sideBar.location', 'left')), iconA: panelLeftIcon, iconB: panelRightIcon }),
997
+ CreateToggleLayoutItem(ToggleAuxiliaryBarAction.ID, AuxiliaryBarVisibleContext, localizeWithPath('vs/workbench/browser/actions/layoutActions', 'secondarySideBar', "Secondary Side Bar"), { whenA: ( ContextKeyExpr.equals('config.workbench.sideBar.location', 'left')), iconA: panelRightIcon, iconB: panelLeftIcon }),
998
+ CreateToggleLayoutItem(TogglePanelAction.ID, PanelVisibleContext, localizeWithPath('vs/workbench/browser/actions/layoutActions', 'panel', "Panel"), panelIcon),
999
+ CreateToggleLayoutItem(ToggleStatusbarVisibilityAction.ID, ( ContextKeyExpr.equals('config.workbench.statusBar.visible', true)), localizeWithPath('vs/workbench/browser/actions/layoutActions', 'statusBar', "Status Bar"), statusBarIcon),
324
1000
  ]);
325
1001
  const MoveSideBarActions = [
326
- CreateOptionLayoutItem(MoveSidebarLeftAction.ID, ( ContextKeyExpr.equals('config.workbench.sideBar.location', 'left')), ( localize('leftSideBar', "Left")), panelLeftIcon),
327
- CreateOptionLayoutItem(MoveSidebarRightAction.ID, ( ContextKeyExpr.equals('config.workbench.sideBar.location', 'right')), ( localize('rightSideBar', "Right")), panelRightIcon),
1002
+ CreateOptionLayoutItem(MoveSidebarLeftAction.ID, ( ContextKeyExpr.equals('config.workbench.sideBar.location', 'left')), localizeWithPath('vs/workbench/browser/actions/layoutActions', 'leftSideBar', "Left"), panelLeftIcon),
1003
+ CreateOptionLayoutItem(MoveSidebarRightAction.ID, ( ContextKeyExpr.equals('config.workbench.sideBar.location', 'right')), localizeWithPath('vs/workbench/browser/actions/layoutActions', 'rightSideBar', "Right"), panelRightIcon),
328
1004
  ];
329
1005
  const AlignPanelActions = [
330
- CreateOptionLayoutItem('workbench.action.alignPanelLeft', ( PanelAlignmentContext.isEqualTo('left')), ( localize('leftPanel', "Left")), panelAlignmentLeftIcon),
331
- CreateOptionLayoutItem('workbench.action.alignPanelRight', ( PanelAlignmentContext.isEqualTo('right')), ( localize('rightPanel', "Right")), panelAlignmentRightIcon),
332
- CreateOptionLayoutItem('workbench.action.alignPanelCenter', ( PanelAlignmentContext.isEqualTo('center')), ( localize('centerPanel', "Center")), panelAlignmentCenterIcon),
333
- CreateOptionLayoutItem('workbench.action.alignPanelJustify', ( PanelAlignmentContext.isEqualTo('justify')), ( localize('justifyPanel', "Justify")), panelAlignmentJustifyIcon),
1006
+ CreateOptionLayoutItem('workbench.action.alignPanelLeft', ( PanelAlignmentContext.isEqualTo('left')), localizeWithPath('vs/workbench/browser/actions/layoutActions', 'leftPanel', "Left"), panelAlignmentLeftIcon),
1007
+ CreateOptionLayoutItem('workbench.action.alignPanelRight', ( PanelAlignmentContext.isEqualTo('right')), localizeWithPath('vs/workbench/browser/actions/layoutActions', 'rightPanel', "Right"), panelAlignmentRightIcon),
1008
+ CreateOptionLayoutItem('workbench.action.alignPanelCenter', ( PanelAlignmentContext.isEqualTo('center')), localizeWithPath('vs/workbench/browser/actions/layoutActions', 'centerPanel', "Center"), panelAlignmentCenterIcon),
1009
+ CreateOptionLayoutItem('workbench.action.alignPanelJustify', ( PanelAlignmentContext.isEqualTo('justify')), localizeWithPath('vs/workbench/browser/actions/layoutActions', 'justifyPanel', "Justify"), panelAlignmentJustifyIcon),
334
1010
  ];
335
1011
  const MiscLayoutOptions = [
336
- CreateOptionLayoutItem('workbench.action.toggleFullScreen', IsFullscreenContext, ( localize('fullscreen', "Full Screen")), fullscreenIcon),
337
- CreateOptionLayoutItem('workbench.action.toggleZenMode', InEditorZenModeContext, ( localize('zenMode', "Zen Mode")), zenModeIcon),
338
- CreateOptionLayoutItem('workbench.action.toggleCenteredLayout', IsCenteredLayoutContext, ( localize('centeredLayout', "Centered Layout")), centerLayoutIcon),
1012
+ CreateOptionLayoutItem('workbench.action.toggleFullScreen', IsFullscreenContext, localizeWithPath('vs/workbench/browser/actions/layoutActions', 'fullscreen', "Full Screen"), fullscreenIcon),
1013
+ CreateOptionLayoutItem('workbench.action.toggleZenMode', InEditorZenModeContext, localizeWithPath('vs/workbench/browser/actions/layoutActions', 'zenMode', "Zen Mode"), zenModeIcon),
1014
+ CreateOptionLayoutItem('workbench.action.toggleCenteredLayout', IsCenteredLayoutContext, localizeWithPath('vs/workbench/browser/actions/layoutActions', 'centeredLayout', "Centered Layout"), centerLayoutIcon),
339
1015
  ];
340
1016
  const LayoutContextKeySet = ( new Set());
341
1017
  for (const { active } of [...ToggleVisibilityActions, ...MoveSideBarActions, ...AlignPanelActions, ...MiscLayoutOptions]) {
@@ -343,4 +1019,158 @@ for (const { active } of [...ToggleVisibilityActions, ...MoveSideBarActions, ...
343
1019
  LayoutContextKeySet.add(key);
344
1020
  }
345
1021
  }
1022
+ registerAction2(class CustomizeLayoutAction extends Action2 {
1023
+ constructor() {
1024
+ super({
1025
+ id: 'workbench.action.customizeLayout',
1026
+ title: { original: 'Customize Layout...', value: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'customizeLayout', "Customize Layout...") },
1027
+ f1: true,
1028
+ icon: configureLayoutIcon,
1029
+ menu: [
1030
+ {
1031
+ id: MenuId.LayoutControlMenuSubmenu,
1032
+ group: 'z_end',
1033
+ },
1034
+ {
1035
+ id: MenuId.LayoutControlMenu,
1036
+ when: ( ContextKeyExpr.equals('config.workbench.layoutControl.type', 'both')),
1037
+ group: 'z_end'
1038
+ }
1039
+ ]
1040
+ });
1041
+ }
1042
+ getItems(contextKeyService) {
1043
+ const toQuickPickItem = (item) => {
1044
+ const toggled = item.active.evaluate(contextKeyService.getContext(null));
1045
+ let label = item.useButtons ?
1046
+ item.label :
1047
+ item.label + (toggled && item.activeIcon ? ` $(${item.activeIcon.id})` : (!toggled && item.inactiveIcon ? ` $(${item.inactiveIcon.id})` : ''));
1048
+ const ariaLabel = item.label + (toggled && item.activeAriaLabel ? ` (${item.activeAriaLabel})` : (!toggled && item.inactiveAriaLabel ? ` (${item.inactiveAriaLabel})` : ''));
1049
+ if (item.visualIcon) {
1050
+ let icon = item.visualIcon;
1051
+ if (isContextualLayoutVisualIcon(icon)) {
1052
+ const useIconA = icon.whenA.evaluate(contextKeyService.getContext(null));
1053
+ icon = useIconA ? icon.iconA : icon.iconB;
1054
+ }
1055
+ label = `$(${icon.id}) ${label}`;
1056
+ }
1057
+ const icon = toggled ? item.activeIcon : item.inactiveIcon;
1058
+ return {
1059
+ type: 'item',
1060
+ id: item.id,
1061
+ label,
1062
+ ariaLabel,
1063
+ buttons: !item.useButtons ? undefined : [
1064
+ {
1065
+ alwaysVisible: false,
1066
+ tooltip: ariaLabel,
1067
+ iconClass: icon ? ThemeIcon.asClassName(icon) : undefined
1068
+ }
1069
+ ]
1070
+ };
1071
+ };
1072
+ return [
1073
+ {
1074
+ type: 'separator',
1075
+ label: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'toggleVisibility', "Visibility")
1076
+ },
1077
+ ...( ToggleVisibilityActions.map(toQuickPickItem)),
1078
+ {
1079
+ type: 'separator',
1080
+ label: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'sideBarPosition', "Primary Side Bar Position")
1081
+ },
1082
+ ...( MoveSideBarActions.map(toQuickPickItem)),
1083
+ {
1084
+ type: 'separator',
1085
+ label: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'panelAlignment', "Panel Alignment")
1086
+ },
1087
+ ...( AlignPanelActions.map(toQuickPickItem)),
1088
+ {
1089
+ type: 'separator',
1090
+ label: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'layoutModes', "Modes"),
1091
+ },
1092
+ ...( MiscLayoutOptions.map(toQuickPickItem)),
1093
+ ];
1094
+ }
1095
+ run(accessor) {
1096
+ if (this._currentQuickPick) {
1097
+ this._currentQuickPick.hide();
1098
+ return;
1099
+ }
1100
+ const configurationService = accessor.get(IConfigurationService);
1101
+ const contextKeyService = accessor.get(IContextKeyService);
1102
+ const commandService = accessor.get(ICommandService);
1103
+ const quickInputService = accessor.get(IQuickInputService);
1104
+ const quickPick = quickInputService.createQuickPick();
1105
+ this._currentQuickPick = quickPick;
1106
+ quickPick.items = this.getItems(contextKeyService);
1107
+ quickPick.ignoreFocusOut = true;
1108
+ quickPick.hideInput = true;
1109
+ quickPick.title = localizeWithPath('vs/workbench/browser/actions/layoutActions', 'customizeLayoutQuickPickTitle', "Customize Layout");
1110
+ const closeButton = {
1111
+ alwaysVisible: true,
1112
+ iconClass: ThemeIcon.asClassName(Codicon.close),
1113
+ tooltip: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'close', "Close")
1114
+ };
1115
+ const resetButton = {
1116
+ alwaysVisible: true,
1117
+ iconClass: ThemeIcon.asClassName(Codicon.discard),
1118
+ tooltip: localizeWithPath('vs/workbench/browser/actions/layoutActions', 'restore defaults', "Restore Defaults")
1119
+ };
1120
+ quickPick.buttons = [
1121
+ resetButton,
1122
+ closeButton
1123
+ ];
1124
+ const disposables = ( new DisposableStore());
1125
+ let selectedItem = undefined;
1126
+ disposables.add(contextKeyService.onDidChangeContext(changeEvent => {
1127
+ if (changeEvent.affectsSome(LayoutContextKeySet)) {
1128
+ quickPick.items = this.getItems(contextKeyService);
1129
+ if (selectedItem) {
1130
+ quickPick.activeItems = quickPick.items.filter(item => item.id === selectedItem?.id);
1131
+ }
1132
+ setTimeout(() => quickInputService.focus(), 0);
1133
+ }
1134
+ }));
1135
+ quickPick.onDidAccept(event => {
1136
+ if (quickPick.selectedItems.length) {
1137
+ selectedItem = quickPick.selectedItems[0];
1138
+ commandService.executeCommand(selectedItem.id);
1139
+ }
1140
+ });
1141
+ quickPick.onDidTriggerItemButton(event => {
1142
+ if (event.item) {
1143
+ selectedItem = event.item;
1144
+ commandService.executeCommand(selectedItem.id);
1145
+ }
1146
+ });
1147
+ quickPick.onDidTriggerButton((button) => {
1148
+ if (button === closeButton) {
1149
+ quickPick.hide();
1150
+ }
1151
+ else if (button === resetButton) {
1152
+ const resetSetting = (id) => {
1153
+ const config = configurationService.inspect(id);
1154
+ configurationService.updateValue(id, config.defaultValue);
1155
+ };
1156
+ resetSetting('workbench.activityBar.visible');
1157
+ resetSetting('workbench.sideBar.location');
1158
+ resetSetting('workbench.statusBar.visible');
1159
+ resetSetting('workbench.panel.defaultLocation');
1160
+ if (!isMacintosh || !isNative) {
1161
+ resetSetting('window.menuBarVisibility');
1162
+ }
1163
+ commandService.executeCommand('workbench.action.alignPanelCenter');
1164
+ }
1165
+ });
1166
+ quickPick.onDidHide(() => {
1167
+ quickPick.dispose();
1168
+ });
1169
+ quickPick.onDispose(() => {
1170
+ this._currentQuickPick = undefined;
1171
+ disposables.dispose();
1172
+ });
1173
+ quickPick.show();
1174
+ }
1175
+ });
346
1176
  export { ToggleActivityBarVisibilityAction, ToggleSeparatePinnedTabsAction, ToggleSidebarPositionAction, ToggleStatusbarVisibilityAction, ToggleTabsVisibilityAction };