@codingame/monaco-vscode-api 1.83.5 → 1.83.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (212) hide show
  1. package/lifecycle.js +3 -1
  2. package/missing-services.js +32 -28
  3. package/monaco-editor-treemending.patch +786 -760
  4. package/monaco.js +1 -0
  5. package/package.json +1 -1
  6. package/service-override/extensions.js +5 -5
  7. package/service-override/files.js +37 -13
  8. package/service-override/keybindings.js +10 -4
  9. package/service-override/layout.js +1 -3
  10. package/services.d.ts +13 -2
  11. package/services.js +35 -5
  12. package/vscode/src/vs/base/browser/broadcast.js +52 -0
  13. package/vscode/src/vs/base/browser/ui/menu/menubar.js +1 -1
  14. package/vscode/src/vs/base/browser/ui/splitview/paneview.js +6 -1
  15. package/vscode/src/vs/base/common/date.js +244 -54
  16. package/vscode/src/vs/base/common/jsonErrorMessages.js +45 -9
  17. package/vscode/src/vs/editor/common/services/textResourceConfiguration.d.ts +65 -0
  18. package/vscode/src/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +33 -5
  19. package/vscode/src/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +165 -32
  20. package/vscode/src/vs/platform/dialogs/common/dialogs.js +30 -9
  21. package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +0 -3
  22. package/vscode/src/vs/platform/extensionManagement/common/extensionNls.js +6 -1
  23. package/vscode/src/vs/platform/files/browser/indexedDBFileSystemProvider.js +404 -0
  24. package/vscode/src/vs/platform/files/common/fileService.js +13 -2
  25. package/vscode/src/vs/platform/files/common/files.js +25 -5
  26. package/vscode/src/vs/platform/keyboardLayout/common/keyboardConfig.js +15 -3
  27. package/vscode/src/vs/platform/quickinput/browser/commandsQuickAccess.js +38 -7
  28. package/vscode/src/vs/platform/quickinput/browser/helpQuickAccess.js +7 -1
  29. package/vscode/src/vs/platform/request/common/request.js +1 -1
  30. package/vscode/src/vs/platform/theme/common/tokenClassificationRegistry.js +210 -42
  31. package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +73 -13
  32. package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +5 -1
  33. package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +11 -2
  34. package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +5 -3
  35. package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +70 -35
  36. package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +108 -20
  37. package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +17 -4
  38. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +5 -3
  39. package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +5 -5
  40. package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +5 -3
  41. package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +7 -1
  42. package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +14 -2
  43. package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +12 -14
  44. package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +6 -1
  45. package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +32 -5
  46. package/vscode/src/vs/workbench/api/browser/statusBarExtensionPoint.js +0 -60
  47. package/vscode/src/vs/workbench/api/common/extHostChat.js +11 -2
  48. package/vscode/src/vs/workbench/api/common/extHostDiagnostics.js +6 -1
  49. package/vscode/src/vs/workbench/api/common/extHostLanguageFeatures.js +12 -2
  50. package/vscode/src/vs/workbench/api/common/extHostLogService.js +9 -1
  51. package/vscode/src/vs/workbench/api/common/extHostProgress.js +6 -1
  52. package/vscode/src/vs/workbench/api/common/extHostStatusBar.js +11 -2
  53. package/vscode/src/vs/workbench/api/common/extHostTelemetry.js +6 -1
  54. package/vscode/src/vs/workbench/api/common/extHostTerminalService.js +6 -1
  55. package/vscode/src/vs/workbench/api/common/extHostTunnelService.js +10 -2
  56. package/vscode/src/vs/workbench/api/common/extHostWorkspace.js +7 -1
  57. package/vscode/src/vs/workbench/api/common/jsonValidationExtensionPoint.js +49 -9
  58. package/vscode/src/vs/workbench/browser/actions/layoutActions.js +397 -274
  59. package/vscode/src/vs/workbench/browser/actions/quickAccessActions.js +30 -6
  60. package/vscode/src/vs/workbench/browser/actions/windowActions.js +85 -31
  61. package/vscode/src/vs/workbench/browser/actions/workspaceActions.js +56 -102
  62. package/vscode/src/vs/workbench/browser/actions/workspaceCommands.js +5 -1
  63. package/vscode/src/vs/workbench/browser/editor.js +2 -2
  64. package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarActions.js +55 -11
  65. package/vscode/src/vs/workbench/browser/parts/compositeBarActions.js +63 -11
  66. package/vscode/src/vs/workbench/browser/parts/editor/binaryDiffEditor.js +7 -1
  67. package/vscode/src/vs/workbench/browser/parts/editor/binaryEditor.js +15 -3
  68. package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbs.js +205 -41
  69. package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +617 -139
  70. package/vscode/src/vs/workbench/browser/parts/editor/editorActions.js +578 -114
  71. package/vscode/src/vs/workbench/browser/parts/editor/editorCommands.js +96 -20
  72. package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +30 -6
  73. package/vscode/src/vs/workbench/browser/parts/editor/editorPlaceholder.js +46 -9
  74. package/vscode/src/vs/workbench/browser/parts/editor/editorQuickAccess.js +30 -5
  75. package/vscode/src/vs/workbench/browser/parts/editor/editorStatus.js +309 -59
  76. package/vscode/src/vs/workbench/browser/parts/editor/sideBySideEditor.js +5 -1
  77. package/vscode/src/vs/workbench/browser/parts/editor/textCodeEditor.js +5 -1
  78. package/vscode/src/vs/workbench/browser/parts/editor/textDiffEditor.js +16 -3
  79. package/vscode/src/vs/workbench/browser/parts/editor/textEditor.js +1 -1
  80. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsCommands.js +35 -7
  81. package/vscode/src/vs/workbench/browser/parts/panel/panelActions.js +185 -33
  82. package/vscode/src/vs/workbench/browser/parts/titlebar/menubarControl.js +90 -57
  83. package/vscode/src/vs/workbench/browser/parts/views/viewFilter.js +5 -1
  84. package/vscode/src/vs/workbench/browser/parts/views/viewPane.js +16 -3
  85. package/vscode/src/vs/workbench/browser/parts/views/viewPaneContainer.js +26 -6
  86. package/vscode/src/vs/workbench/browser/parts/views/viewsService.js +35 -6
  87. package/vscode/src/vs/workbench/browser/quickaccess.js +6 -6
  88. package/vscode/src/vs/workbench/browser/workbench.contribution.js +918 -185
  89. package/vscode/src/vs/workbench/common/configuration.js +25 -11
  90. package/vscode/src/vs/workbench/common/contextkeys.js +244 -228
  91. package/vscode/src/vs/workbench/common/editor/diffEditorInput.js +7 -1
  92. package/vscode/src/vs/workbench/common/editor/resourceEditorInput.d.ts +44 -0
  93. package/vscode/src/vs/workbench/common/editor/sideBySideEditorInput.js +7 -1
  94. package/vscode/src/vs/workbench/common/editor/textEditorModel.js +6 -1
  95. package/vscode/src/vs/workbench/common/editor/textResourceEditorInput.d.ts +23 -0
  96. package/vscode/src/vs/workbench/common/editor.d.ts +26 -1
  97. package/vscode/src/vs/workbench/common/editor.js +26 -5
  98. package/vscode/src/vs/workbench/common/theme.js +676 -136
  99. package/vscode/src/vs/workbench/common/views.js +8 -3
  100. package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.js +71 -14
  101. package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityContributions.js +21 -2
  102. package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleView.js +133 -21
  103. package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleViewActions.js +36 -8
  104. package/vscode/src/vs/workbench/contrib/bulkEdit/browser/bulkEditService.js +96 -17
  105. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.js +0 -2
  106. package/vscode/src/vs/workbench/contrib/chat/common/chatAgents.js +22 -4
  107. package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.js +22 -4
  108. package/vscode/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.js +41 -8
  109. package/vscode/src/vs/workbench/contrib/codeActions/common/codeActionsExtensionPoint.js +25 -5
  110. package/vscode/src/vs/workbench/contrib/codeActions/common/documentationExtensionPoint.js +30 -6
  111. package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.js +34 -6
  112. package/vscode/src/vs/workbench/contrib/codeEditor/browser/editorFeatures.js +44 -0
  113. package/vscode/src/vs/workbench/contrib/codeEditor/browser/inspectEditorTokens/inspectEditorTokens.js +10 -2
  114. package/vscode/src/vs/workbench/contrib/codeEditor/browser/languageConfigurationExtensionPoint.js +320 -63
  115. package/vscode/src/vs/workbench/contrib/codeEditor/browser/largeFileOptimizations.js +12 -4
  116. package/vscode/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoLineQuickAccess.js +15 -3
  117. package/vscode/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess.js +30 -6
  118. package/vscode/src/vs/workbench/contrib/codeEditor/browser/saveParticipants.js +25 -4
  119. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMinimap.js +10 -2
  120. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier.js +20 -4
  121. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderControlCharacter.js +10 -2
  122. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderWhitespace.js +10 -2
  123. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.js +25 -9
  124. package/vscode/src/vs/workbench/contrib/comments/browser/commentColors.js +30 -6
  125. package/vscode/src/vs/workbench/contrib/comments/browser/commentGlyphWidget.js +25 -5
  126. package/vscode/src/vs/workbench/contrib/comments/browser/commentNode.js +16 -3
  127. package/vscode/src/vs/workbench/contrib/comments/browser/commentReply.js +8 -4
  128. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadBody.js +23 -3
  129. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadHeader.js +15 -9
  130. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadWidget.js +18 -3
  131. package/vscode/src/vs/workbench/contrib/comments/browser/comments.contribution.js +142 -26
  132. package/vscode/src/vs/workbench/contrib/comments/browser/commentsController.js +33 -5
  133. package/vscode/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.js +45 -7
  134. package/vscode/src/vs/workbench/contrib/comments/browser/commentsView.js +63 -10
  135. package/vscode/src/vs/workbench/contrib/comments/browser/commentsViewActions.js +45 -9
  136. package/vscode/src/vs/workbench/contrib/comments/browser/reactionsAction.js +16 -8
  137. package/vscode/src/vs/workbench/contrib/comments/common/commentContextKeys.js +41 -21
  138. package/vscode/src/vs/workbench/contrib/comments/common/commentModel.js +5 -1
  139. package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.js +5 -1
  140. package/vscode/src/vs/workbench/contrib/debug/browser/debugColors.js +60 -12
  141. package/vscode/src/vs/workbench/contrib/debug/browser/debugIcons.js +275 -55
  142. package/vscode/src/vs/workbench/contrib/debug/common/abstractDebugAdapter.js +7 -1
  143. package/vscode/src/vs/workbench/contrib/debug/common/debug.js +255 -94
  144. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsIcons.js +120 -24
  145. package/vscode/src/vs/workbench/contrib/externalUriOpener/common/configuration.js +22 -4
  146. package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpenerService.js +21 -4
  147. package/vscode/src/vs/workbench/contrib/files/browser/explorerViewlet.js +39 -51
  148. package/vscode/src/vs/workbench/contrib/files/browser/fileActions.js +394 -75
  149. package/vscode/src/vs/workbench/contrib/files/browser/fileConstants.js +17 -6
  150. package/vscode/src/vs/workbench/contrib/files/browser/fileImportExport.js +190 -32
  151. package/vscode/src/vs/workbench/contrib/files/browser/views/emptyView.js +5 -1
  152. package/vscode/src/vs/workbench/contrib/files/browser/views/explorerDecorationsProvider.js +21 -4
  153. package/vscode/src/vs/workbench/contrib/files/browser/views/explorerView.js +26 -5
  154. package/vscode/src/vs/workbench/contrib/files/browser/views/explorerViewer.js +81 -14
  155. package/vscode/src/vs/workbench/contrib/files/browser/views/openEditorsView.js +26 -5
  156. package/vscode/src/vs/workbench/contrib/files/common/files.js +70 -26
  157. package/vscode/src/vs/workbench/contrib/folding/browser/folding.contribution.js +11 -3
  158. package/vscode/src/vs/workbench/contrib/format/browser/formatModified.js +5 -1
  159. package/vscode/src/vs/workbench/contrib/inlayHints/browser/inlayHintsAccessibilty.js +20 -4
  160. package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +75 -111
  161. package/vscode/src/vs/workbench/contrib/keybindings/browser/keybindings.contribution.js +5 -1
  162. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.js +6 -1
  163. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +151 -29
  164. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel.js +10 -2
  165. package/vscode/src/vs/workbench/contrib/mergeEditor/common/mergeEditor.js +0 -42
  166. package/vscode/src/vs/workbench/contrib/output/browser/output.contribution.js +115 -23
  167. package/vscode/src/vs/workbench/contrib/output/browser/outputView.js +17 -3
  168. package/vscode/src/vs/workbench/contrib/quickaccess/browser/commandsQuickAccess.js +49 -9
  169. package/vscode/src/vs/workbench/contrib/quickaccess/browser/quickAccess.contribution.js +66 -13
  170. package/vscode/src/vs/workbench/contrib/quickaccess/browser/viewQuickAccess.js +52 -10
  171. package/vscode/src/vs/workbench/contrib/scm/browser/dirtyDiffSwitcher.js +10 -2
  172. package/vscode/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.js +110 -26
  173. package/vscode/src/vs/workbench/contrib/snippets/browser/snippetCompletionProvider.js +21 -3
  174. package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsFile.js +15 -3
  175. package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsService.js +56 -9
  176. package/vscode/src/vs/workbench/contrib/tasks/common/taskDefinitionRegistry.js +25 -5
  177. package/vscode/src/vs/workbench/contrib/tasks/common/taskService.js +16 -26
  178. package/vscode/src/vs/workbench/contrib/tasks/common/tasks.js +7 -8
  179. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalEditorInput.js +20 -4
  180. package/vscode/src/vs/workbench/contrib/terminal/common/terminal.js +35 -7
  181. package/vscode/src/vs/workbench/contrib/terminal/common/terminalColorRegistry.js +106 -21
  182. package/vscode/src/vs/workbench/contrib/terminal/common/terminalContextKey.js +81 -21
  183. package/vscode/src/vs/workbench/contrib/testing/common/testResult.js +6 -1
  184. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditor.js +6 -2
  185. package/vscode/src/vs/workbench/services/actions/common/menusExtensionPoint.js +592 -112
  186. package/vscode/src/vs/workbench/services/assignment/common/assignmentService.js +5 -1
  187. package/vscode/src/vs/workbench/services/authentication/browser/authenticationService.js +6 -32
  188. package/vscode/src/vs/workbench/services/configuration/common/jsonEditingService.js +5 -1
  189. package/vscode/src/vs/workbench/services/decorations/browser/decorationsService.js +5 -1
  190. package/vscode/src/vs/workbench/services/editor/common/editorResolverService.js +5 -1
  191. package/vscode/src/vs/workbench/services/extensions/browser/extensionUrlHandler.js +15 -3
  192. package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +58 -10
  193. package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +5 -1
  194. package/vscode/src/vs/workbench/services/extensions/common/extensionsRegistry.js +392 -80
  195. package/vscode/src/vs/workbench/services/filesConfiguration/common/filesConfigurationService.js +28 -5
  196. package/vscode/src/vs/workbench/services/host/browser/browserHostService.js +10 -2
  197. package/vscode/src/vs/workbench/services/keybinding/browser/keybindingService.js +129 -24
  198. package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayoutService.js +10 -2
  199. package/vscode/src/vs/workbench/services/keybinding/common/keybindingEditing.js +20 -10
  200. package/vscode/src/vs/workbench/services/language/common/languageService.js +122 -22
  201. package/vscode/src/vs/workbench/services/remote/common/tunnelModel.js +28 -9
  202. package/vscode/src/vs/workbench/services/search/common/queryBuilder.js +6 -1
  203. package/vscode/src/vs/workbench/services/textfile/browser/textFileService.js +48 -9
  204. package/vscode/src/vs/workbench/services/textfile/common/textFileEditorModel.js +5 -1
  205. package/vscode/src/vs/workbench/services/textfile/common/textFileEditorModelManager.js +7 -1
  206. package/vscode/src/vs/workbench/services/textfile/common/textFileSaveParticipant.js +6 -1
  207. package/vscode/src/vs/workbench/services/themes/common/colorExtensionPoint.js +81 -16
  208. package/vscode/src/vs/workbench/services/themes/common/iconExtensionPoint.js +1 -50
  209. package/vscode/src/vs/workbench/services/themes/common/tokenClassificationExtensionPoint.js +126 -25
  210. package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfile.js +6 -5
  211. package/vscode/src/vs/workbench/services/userDataSync/common/userDataSync.js +6 -14
  212. package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopySaveParticipant.js +6 -1
@@ -41,7 +41,13 @@ let DiffEditorInput = class DiffEditorInput extends SideBySideEditorInput {
41
41
  else {
42
42
  const originalName = this.original.getName();
43
43
  const modifiedName = this.modified.getName();
44
- name = localizeWithPath('vs/workbench/common/editor/diffEditorInput', 'sideBySideLabels', "{0} ↔ {1}", originalName, modifiedName);
44
+ name = ( localizeWithPath(
45
+ 'vs/workbench/common/editor/diffEditorInput',
46
+ 'sideBySideLabels',
47
+ "{0} ↔ {1}",
48
+ originalName,
49
+ modifiedName
50
+ ));
45
51
  forceDescription = originalName === modifiedName;
46
52
  }
47
53
  let shortDescription;
@@ -0,0 +1,44 @@
1
+ import { EditorInputWithPreferredResource, EditorInputCapabilities, Verbosity } from '../editor.js';
2
+ import { EditorInput } from './editorInput.js';
3
+ import { URI } from '../../../base/common/uri.js';
4
+ import { IFileService } from '../../../platform/files/common/files.js';
5
+ import { ILabelService } from '../../../platform/label/common/label.js';
6
+ import { IFilesConfigurationService } from '../../services/filesConfiguration/common/filesConfigurationService.js';
7
+ import { IMarkdownString } from '../../../base/common/htmlContent.js';
8
+
9
+ /**
10
+ * The base class for all editor inputs that open resources.
11
+ */
12
+ declare abstract class AbstractResourceEditorInput extends EditorInput implements EditorInputWithPreferredResource {
13
+ readonly resource: URI;
14
+ protected readonly labelService: ILabelService;
15
+ protected readonly fileService: IFileService;
16
+ protected readonly filesConfigurationService: IFilesConfigurationService;
17
+ get capabilities(): EditorInputCapabilities;
18
+ private _preferredResource;
19
+ get preferredResource(): URI;
20
+ constructor(resource: URI, preferredResource: URI | undefined, labelService: ILabelService, fileService: IFileService, filesConfigurationService: IFilesConfigurationService);
21
+ private registerListeners;
22
+ private onLabelEvent;
23
+ private updateLabel;
24
+ setPreferredResource(preferredResource: URI): void;
25
+ private _name;
26
+ getName(): string;
27
+ getDescription(verbosity?: Verbosity): string | undefined;
28
+ private _shortDescription;
29
+ private get shortDescription();
30
+ private _mediumDescription;
31
+ private get mediumDescription();
32
+ private _longDescription;
33
+ private get longDescription();
34
+ private _shortTitle;
35
+ private get shortTitle();
36
+ private _mediumTitle;
37
+ private get mediumTitle();
38
+ private _longTitle;
39
+ private get longTitle();
40
+ getTitle(verbosity?: Verbosity): string;
41
+ isReadonly(): boolean | IMarkdownString;
42
+ }
43
+
44
+ export { AbstractResourceEditorInput };
@@ -59,7 +59,13 @@ let SideBySideEditorInput = class SideBySideEditorInput extends EditorInput {
59
59
  if (this.hasIdenticalSides) {
60
60
  return this.primary.getName();
61
61
  }
62
- return localizeWithPath('vs/workbench/common/editor/sideBySideEditorInput', 'sideBySideLabels', "{0} - {1}", this.secondary.getName(), this.primary.getName());
62
+ return ( localizeWithPath(
63
+ 'vs/workbench/common/editor/sideBySideEditorInput',
64
+ 'sideBySideLabels',
65
+ "{0} - {1}",
66
+ this.secondary.getName(),
67
+ this.primary.getName()
68
+ ));
63
69
  }
64
70
  getPreferredName() {
65
71
  return this.preferredName;
@@ -87,7 +87,12 @@ let BaseTextEditorModel = class BaseTextEditorModel extends EditorModel {
87
87
  if (lang && lang !== prevLang && !this.isDisposed()) {
88
88
  this.setLanguageIdInternal(lang, LanguageDetectionLanguageEventSource);
89
89
  const languageName = this.languageService.getLanguageName(lang);
90
- this.accessibilityService.alert(localizeWithPath('vs/workbench/common/editor/textEditorModel', 'languageAutoDetected', "Language {0} was automatically detected and set as the language mode.", languageName ?? lang));
90
+ this.accessibilityService.alert(( localizeWithPath(
91
+ 'vs/workbench/common/editor/textEditorModel',
92
+ 'languageAutoDetected',
93
+ "Language {0} was automatically detected and set as the language mode.",
94
+ languageName ?? lang
95
+ )));
91
96
  }
92
97
  }
93
98
  createTextEditorModel(value, resource, preferredLanguageId) {
@@ -0,0 +1,23 @@
1
+ import { GroupIdentifier, IUntypedEditorInput, IRevertOptions } from '../editor.js';
2
+ import { URI } from '../../../base/common/uri.js';
3
+ import { AbstractResourceEditorInput } from './resourceEditorInput.js';
4
+ import { ITextFileService, ITextFileSaveOptions } from '../../services/textfile/common/textfiles.js';
5
+ import { IEditorService } from '../../services/editor/common/editorService.js';
6
+ import { IFileService } from '../../../platform/files/common/files.js';
7
+ import { ILabelService } from '../../../platform/label/common/label.js';
8
+ import { IFilesConfigurationService } from '../../services/filesConfiguration/common/filesConfigurationService.js';
9
+
10
+ /**
11
+ * The base class for all editor inputs that open in text editors.
12
+ */
13
+ declare abstract class AbstractTextResourceEditorInput extends AbstractResourceEditorInput {
14
+ protected readonly editorService: IEditorService;
15
+ protected readonly textFileService: ITextFileService;
16
+ constructor(resource: URI, preferredResource: URI | undefined, editorService: IEditorService, textFileService: ITextFileService, labelService: ILabelService, fileService: IFileService, filesConfigurationService: IFilesConfigurationService);
17
+ save(group: GroupIdentifier, options?: ITextFileSaveOptions): Promise<IUntypedEditorInput | undefined>;
18
+ saveAs(group: GroupIdentifier, options?: ITextFileSaveOptions): Promise<IUntypedEditorInput | undefined>;
19
+ private doSave;
20
+ revert(group: GroupIdentifier, options?: IRevertOptions): Promise<void>;
21
+ }
22
+
23
+ export { AbstractTextResourceEditorInput };
@@ -9,6 +9,7 @@ import { IContextKeyService } from '../../platform/contextkey/common/contextkey.
9
9
  import { IEncodingSupport, ILanguageSupport } from '../services/textfile/common/textfiles.js';
10
10
  import { IEditorGroup } from '../services/editor/common/editorGroupsService.js';
11
11
  import { IComposite, ICompositeControl } from './composite.js';
12
+ import { IExtUri } from '../../base/common/resources.js';
12
13
 
13
14
  interface IEditorDescriptor<T extends IEditorPane> {
14
15
  /**
@@ -519,6 +520,20 @@ interface EditorInputWithOptions {
519
520
  interface EditorInputWithOptionsAndGroup extends EditorInputWithOptions {
520
521
  group: IEditorGroup;
521
522
  }
523
+ /**
524
+ * Context passed into `EditorPane#setInput` to give additional
525
+ * context information around why the editor was opened.
526
+ */
527
+ interface IEditorOpenContext {
528
+ /**
529
+ * An indicator if the editor input is new for the group the editor is in.
530
+ * An editor is new for a group if it was not part of the group before and
531
+ * otherwise was already opened in the group and just became the active editor.
532
+ *
533
+ * This hint can e.g. be used to decide whether to restore view state or not.
534
+ */
535
+ newInGroup?: boolean;
536
+ }
522
537
  interface IEditorIdentifier {
523
538
  groupId: GroupIdentifier;
524
539
  editor: EditorInput;
@@ -675,6 +690,16 @@ declare const enum CloseDirection {
675
690
  LEFT = 0,
676
691
  RIGHT = 1
677
692
  }
693
+ interface IEditorMemento<T> {
694
+ saveEditorState(group: IEditorGroup, resource: URI, state: T): void;
695
+ saveEditorState(group: IEditorGroup, editor: EditorInput, state: T): void;
696
+ loadEditorState(group: IEditorGroup, resource: URI): T | undefined;
697
+ loadEditorState(group: IEditorGroup, editor: EditorInput): T | undefined;
698
+ clearEditorState(resource: URI, group?: IEditorGroup): void;
699
+ clearEditorState(editor: EditorInput, group?: IEditorGroup): void;
700
+ clearEditorStateOnDispose(resource: URI, editor: EditorInput): void;
701
+ moveEditorState(source: URI, target: URI, comparer: IExtUri): void;
702
+ }
678
703
  declare const enum EditorsOrder {
679
704
  /**
680
705
  * Editors sorted by most recent activity (most recent active first)
@@ -686,4 +711,4 @@ declare const enum EditorsOrder {
686
711
  SEQUENTIAL = 1
687
712
  }
688
713
 
689
- export { AbstractEditorInput, CloseDirection, EditorCloseContext, EditorInputCapabilities, type EditorInputWithOptions, type EditorInputWithOptionsAndGroup, type EditorInputWithPreferredResource, EditorPaneSelectionChangeReason, EditorPaneSelectionCompareResult, EditorsOrder, type GroupIdentifier, GroupModelChangeKind, type IActiveEditorChangeEvent, type IEditorCloseEvent, type IEditorControl, type IEditorDescriptor, type IEditorIdentifier, type IEditorPane, type IEditorPaneSelection, type IEditorPaneSelectionChangeEvent, type IEditorPartOptions, type IEditorPartOptionsChangeEvent, type IEditorWillMoveEvent, type IEditorWillOpenEvent, type IFileEditorInput, type IFindEditorOptions, type IMatchEditorOptions, type IMoveResult, type IResourceDiffEditorInput, type IResourceMergeEditorInput, type IResourceMergeEditorInputSide, type IResourceSideBySideEditorInput, type IRevertOptions, type ISaveOptions, type ITextDiffEditorPane, type IUntitledTextResourceEditorInput, type IUntypedEditorInput, type IUntypedFileEditorInput, type IVisibleEditorPane, type PreventPinnedEditorClose, SaveReason, type SaveSource, SideBySideEditor, Verbosity };
714
+ export { AbstractEditorInput, CloseDirection, EditorCloseContext, EditorInputCapabilities, type EditorInputWithOptions, type EditorInputWithOptionsAndGroup, type EditorInputWithPreferredResource, EditorPaneSelectionChangeReason, EditorPaneSelectionCompareResult, EditorsOrder, type GroupIdentifier, GroupModelChangeKind, type IActiveEditorChangeEvent, type IEditorCloseEvent, type IEditorControl, type IEditorDescriptor, type IEditorIdentifier, type IEditorMemento, type IEditorOpenContext, type IEditorPane, type IEditorPaneSelection, type IEditorPaneSelectionChangeEvent, type IEditorPartOptions, type IEditorPartOptionsChangeEvent, type IEditorWillMoveEvent, type IEditorWillOpenEvent, type IFileEditorInput, type IFindEditorOptions, type IMatchEditorOptions, type IMoveResult, type IResourceDiffEditorInput, type IResourceMergeEditorInput, type IResourceMergeEditorInputSide, type IResourceSideBySideEditorInput, type IRevertOptions, type ISaveOptions, type ITextDiffEditorPane, type IUntitledTextResourceEditorInput, type IUntypedEditorInput, type IUntypedFileEditorInput, type IVisibleEditorPane, type PreventPinnedEditorClose, SaveReason, type SaveSource, SideBySideEditor, Verbosity };
@@ -15,8 +15,12 @@ const EditorExtensions = {
15
15
  };
16
16
  const DEFAULT_EDITOR_ASSOCIATION = {
17
17
  id: 'default',
18
- displayName: localizeWithPath('vs/workbench/common/editor', 'promptOpenWith.defaultEditor.displayName', "Text Editor"),
19
- providerDisplayName: localizeWithPath('vs/workbench/common/editor', 'builtinProviderDisplayName', "Built-in")
18
+ displayName: ( localizeWithPath(
19
+ 'vs/workbench/common/editor',
20
+ 'promptOpenWith.defaultEditor.displayName',
21
+ "Text Editor"
22
+ )),
23
+ providerDisplayName: ( localizeWithPath('vs/workbench/common/editor', 'builtinProviderDisplayName', "Built-in"))
20
24
  };
21
25
  const SIDE_BY_SIDE_EDITOR_ID = 'workbench.editor.sidebysideEditor';
22
26
  const TEXT_DIFF_EDITOR_ID = 'workbench.editors.textDiffEditor';
@@ -91,6 +95,19 @@ class SaveSourceFactory {
91
95
  }
92
96
  }
93
97
  const SaveSourceRegistry = ( new SaveSourceFactory());
98
+ var EditorInputCapabilities;
99
+ ( (function(EditorInputCapabilities) {
100
+ EditorInputCapabilities[EditorInputCapabilities["None"] = 0] = "None";
101
+ EditorInputCapabilities[EditorInputCapabilities["Readonly"] = 2] = "Readonly";
102
+ EditorInputCapabilities[EditorInputCapabilities["Untitled"] = 4] = "Untitled";
103
+ EditorInputCapabilities[EditorInputCapabilities["Singleton"] = 8] = "Singleton";
104
+ EditorInputCapabilities[EditorInputCapabilities["RequiresTrust"] = 16] = "RequiresTrust";
105
+ EditorInputCapabilities[EditorInputCapabilities["CanSplitInGroup"] = 32] = "CanSplitInGroup";
106
+ EditorInputCapabilities[EditorInputCapabilities["ForceDescription"] = 64] = "ForceDescription";
107
+ EditorInputCapabilities[EditorInputCapabilities["CanDropIntoEditor"] = 128] = "CanDropIntoEditor";
108
+ EditorInputCapabilities[EditorInputCapabilities["MultipleEditors"] = 256] = "MultipleEditors";
109
+ EditorInputCapabilities[EditorInputCapabilities["Scratchpad"] = 512] = "Scratchpad";
110
+ })(EditorInputCapabilities || (EditorInputCapabilities = {})));
94
111
  class AbstractEditorInput extends Disposable {
95
112
  }
96
113
  function isEditorInput(editor) {
@@ -111,7 +128,7 @@ function isDiffEditorInput(editor) {
111
128
  function createTooLargeFileError(group, input, options, message, preferencesService) {
112
129
  return createEditorOpenError(message, [
113
130
  toAction({
114
- id: 'workbench.action.openLargeFile', label: localizeWithPath('vs/workbench/common/editor', 'openLargeFile', "Open Anyway"), run: () => {
131
+ id: 'workbench.action.openLargeFile', label: ( localizeWithPath('vs/workbench/common/editor', 'openLargeFile', "Open Anyway")), run: () => {
115
132
  const fileEditorOptions = {
116
133
  ...options,
117
134
  limits: {
@@ -122,7 +139,11 @@ function createTooLargeFileError(group, input, options, message, preferencesServ
122
139
  }
123
140
  }),
124
141
  toAction({
125
- id: 'workbench.action.configureEditorLargeFileConfirmation', label: localizeWithPath('vs/workbench/common/editor', 'configureEditorLargeFileConfirmation', "Configure Limit"), run: () => {
142
+ id: 'workbench.action.configureEditorLargeFileConfirmation', label: ( localizeWithPath(
143
+ 'vs/workbench/common/editor',
144
+ 'configureEditorLargeFileConfirmation',
145
+ "Configure Limit"
146
+ )), run: () => {
126
147
  return preferencesService.openUserSettings({ query: 'workbench.editorLargeFileConfirmation' });
127
148
  }
128
149
  }),
@@ -383,4 +404,4 @@ function createEditorOpenError(messageOrError, actions, options) {
383
404
  error.allowDialog = options?.allowDialog;
384
405
  return error;
385
406
  }
386
- export { AbstractEditorInput, BINARY_DIFF_EDITOR_ID, CloseDirection, DEFAULT_EDITOR_ASSOCIATION, EditorCloseContext, EditorCloseMethod, EditorExtensions, EditorResourceAccessor, EditorsOrder, SIDE_BY_SIDE_EDITOR_ID, SaveSourceRegistry, SideBySideEditor, TEXT_DIFF_EDITOR_ID, createEditorOpenError, createTooLargeFileError, findViewStateForEditor, isDiffEditorInput, isEditorIdentifier, isEditorInput, isEditorInputWithOptions, isEditorInputWithOptionsAndGroup, isEditorOpenError, isEditorPaneWithSelection, isResourceDiffEditorInput, isResourceEditorInput, isResourceMergeEditorInput, isResourceSideBySideEditorInput, isSideBySideEditorInput, isTextEditorViewState, isUntitledResourceEditorInput, pathsToEditors, preventEditorClose };
407
+ export { AbstractEditorInput, BINARY_DIFF_EDITOR_ID, CloseDirection, DEFAULT_EDITOR_ASSOCIATION, EditorCloseContext, EditorCloseMethod, EditorExtensions, EditorInputCapabilities, EditorResourceAccessor, EditorsOrder, SIDE_BY_SIDE_EDITOR_ID, SaveSourceRegistry, SideBySideEditor, TEXT_DIFF_EDITOR_ID, createEditorOpenError, createTooLargeFileError, findViewStateForEditor, isDiffEditorInput, isEditorIdentifier, isEditorInput, isEditorInputWithOptions, isEditorInputWithOptionsAndGroup, isEditorOpenError, isEditorPaneWithSelection, isResourceDiffEditorInput, isResourceEditorInput, isResourceMergeEditorInput, isResourceSideBySideEditorInput, isSideBySideEditorInput, isTextEditorViewState, isUntitledResourceEditorInput, pathsToEditors, preventEditorClose };