@codingame/monaco-vscode-api 15.0.0 → 15.0.2

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 (198) hide show
  1. package/missing-services.js +53 -4
  2. package/package.json +8 -8
  3. package/services.js +5 -5
  4. package/vscode/src/vs/editor/browser/observableCodeEditor.js +1 -1
  5. package/vscode/src/vs/editor/browser/services/hoverService/hoverService.js +2 -4
  6. package/vscode/src/vs/editor/browser/widget/diffEditor/diffProviderFactoryService.js +125 -0
  7. package/vscode/src/vs/editor/common/languages/languageConfigurationRegistry.js +2 -3
  8. package/vscode/src/vs/editor/common/services/languageFeatureDebounce.js +2 -3
  9. package/vscode/src/vs/editor/common/services/languageFeaturesService.js +2 -3
  10. package/vscode/src/vs/editor/common/services/semanticTokensStylingService.js +2 -3
  11. package/vscode/src/vs/editor/contrib/codelens/browser/codeLensCache.d.ts +15 -0
  12. package/vscode/src/vs/editor/contrib/codelens/browser/codeLensCache.js +93 -0
  13. package/vscode/src/vs/editor/contrib/documentSymbols/browser/outlineModel.js +2 -3
  14. package/vscode/src/vs/editor/contrib/editorState/browser/keybindingCancellation.d.ts +7 -0
  15. package/vscode/src/vs/editor/contrib/editorState/browser/keybindingCancellation.js +4 -4
  16. package/vscode/src/vs/editor/contrib/gotoError/browser/markerNavigationService.d.ts +45 -0
  17. package/vscode/src/vs/editor/contrib/gotoError/browser/markerNavigationService.js +215 -0
  18. package/vscode/src/vs/editor/contrib/gotoError/browser/markerNavigationService.service.d.ts +1 -1
  19. package/vscode/src/vs/editor/contrib/gotoSymbol/browser/symbolNavigation.d.ts +26 -0
  20. package/vscode/src/vs/editor/contrib/gotoSymbol/browser/symbolNavigation.js +178 -0
  21. package/vscode/src/vs/editor/contrib/gpu/browser/gpuActions.js +4 -4
  22. package/vscode/src/vs/editor/contrib/hover/browser/contentHoverRendered.js +3 -3
  23. package/vscode/src/vs/editor/contrib/hover/browser/hoverAccessibleViews.js +2 -2
  24. package/vscode/src/vs/editor/contrib/hover/browser/hoverActionIds.js +2 -2
  25. package/vscode/src/vs/editor/contrib/hover/browser/hoverActions.js +24 -24
  26. package/vscode/src/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +9 -9
  27. package/vscode/src/vs/editor/contrib/hover/browser/markerHoverParticipant.js +5 -5
  28. package/vscode/src/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
  29. package/vscode/src/vs/editor/contrib/indentation/browser/indentation.js +20 -20
  30. package/vscode/src/vs/editor/contrib/inlayHints/browser/inlayHintsController.js +1 -2
  31. package/vscode/src/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +8 -8
  32. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +20 -20
  33. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +11 -11
  34. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +1 -1
  35. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +2 -2
  36. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js +5 -5
  37. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +5 -5
  38. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/indicatorView.js +3 -3
  39. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js +1 -1
  40. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +18 -18
  41. package/vscode/src/vs/editor/contrib/insertFinalNewLine/browser/insertFinalNewLine.js +1 -1
  42. package/vscode/src/vs/editor/contrib/lineSelection/browser/lineSelection.js +1 -1
  43. package/vscode/src/vs/editor/contrib/linesOperations/browser/linesOperations.js +30 -30
  44. package/vscode/src/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +2 -2
  45. package/vscode/src/vs/editor/contrib/links/browser/links.js +10 -10
  46. package/vscode/src/vs/editor/contrib/message/browser/messageController.js +1 -1
  47. package/vscode/src/vs/editor/contrib/multicursor/browser/multicursor.js +22 -22
  48. package/vscode/src/vs/editor/contrib/parameterHints/browser/parameterHints.js +1 -1
  49. package/vscode/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +4 -4
  50. package/vscode/src/vs/editor/contrib/peekView/browser/peekView.d.ts +6 -0
  51. package/vscode/src/vs/editor/contrib/peekView/browser/peekView.js +21 -22
  52. package/vscode/src/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +1 -1
  53. package/vscode/src/vs/editor/contrib/readOnlyMessage/browser/contribution.js +2 -2
  54. package/vscode/src/vs/editor/contrib/rename/browser/rename.js +11 -11
  55. package/vscode/src/vs/editor/contrib/rename/browser/renameWidget.js +6 -6
  56. package/vscode/src/vs/editor/contrib/smartSelect/browser/smartSelect.js +4 -4
  57. package/vscode/src/vs/editor/contrib/snippet/browser/snippetController2.js +4 -4
  58. package/vscode/src/vs/editor/contrib/snippet/browser/snippetVariables.js +4 -4
  59. package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +11 -11
  60. package/vscode/src/vs/editor/contrib/suggest/browser/suggest.js +8 -8
  61. package/vscode/src/vs/editor/contrib/suggest/browser/suggestController.js +10 -10
  62. package/vscode/src/vs/editor/contrib/suggest/browser/suggestMemory.d.ts +67 -0
  63. package/vscode/src/vs/editor/contrib/suggest/browser/suggestMemory.js +232 -0
  64. package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidget.js +16 -16
  65. package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +2 -2
  66. package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +2 -2
  67. package/vscode/src/vs/editor/contrib/suggest/browser/wordContextKey.js +1 -1
  68. package/vscode/src/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +33 -33
  69. package/vscode/src/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +4 -4
  70. package/vscode/src/vs/editor/contrib/tokenization/browser/tokenization.js +1 -1
  71. package/vscode/src/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +24 -24
  72. package/vscode/src/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +5 -5
  73. package/vscode/src/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +9 -9
  74. package/vscode/src/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +3 -3
  75. package/vscode/src/vs/editor/contrib/wordOperations/browser/wordOperations.js +1 -1
  76. package/vscode/src/vs/editor/standalone/browser/standaloneServices.js +12 -8
  77. package/vscode/src/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +54 -54
  78. package/vscode/src/vs/platform/action/common/actionCommonCategories.js +6 -6
  79. package/vscode/src/vs/platform/actionWidget/browser/actionList.js +255 -13
  80. package/vscode/src/vs/platform/actionWidget/browser/actionWidget.d.ts +26 -0
  81. package/vscode/src/vs/platform/actionWidget/browser/actionWidget.js +230 -0
  82. package/vscode/src/vs/platform/actions/browser/menuEntryActionViewItem.js +5 -5
  83. package/vscode/src/vs/platform/actions/browser/toolbar.js +2 -2
  84. package/vscode/src/vs/platform/actions/common/menuResetAction.js +1 -1
  85. package/vscode/src/vs/platform/actions/common/menuService.js +2 -2
  86. package/vscode/src/vs/platform/configuration/common/configurationRegistry.js +10 -10
  87. package/vscode/src/vs/platform/contextkey/browser/contextKeyService.js +1 -1
  88. package/vscode/src/vs/platform/contextkey/common/contextkey.js +11 -11
  89. package/vscode/src/vs/platform/contextkey/common/contextkeys.js +9 -9
  90. package/vscode/src/vs/platform/contextkey/common/scanner.js +5 -5
  91. package/vscode/src/vs/platform/dnd/browser/dnd.js +1 -1
  92. package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +2 -2
  93. package/vscode/src/vs/platform/extensionManagement/common/extensionNls.js +1 -1
  94. package/vscode/src/vs/platform/extensionManagement/common/extensionsScannerService.js +7 -7
  95. package/vscode/src/vs/platform/extensions/common/extensionValidator.js +20 -20
  96. package/vscode/src/vs/platform/files/browser/htmlFileSystemProvider.js +2 -2
  97. package/vscode/src/vs/platform/files/common/files.js +6 -6
  98. package/vscode/src/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
  99. package/vscode/src/vs/platform/keybinding/common/abstractKeybindingService.js +4 -4
  100. package/vscode/src/vs/platform/list/browser/listService.js +27 -27
  101. package/vscode/src/vs/platform/log/common/log.js +6 -6
  102. package/vscode/src/vs/platform/markers/common/markers.js +6 -6
  103. package/vscode/src/vs/platform/quickinput/browser/quickInput.js +10 -10
  104. package/vscode/src/vs/platform/quickinput/browser/quickInputActions.js +3 -3
  105. package/vscode/src/vs/platform/quickinput/browser/quickInputController.js +6 -6
  106. package/vscode/src/vs/platform/quickinput/browser/quickInputTree.js +1 -1
  107. package/vscode/src/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
  108. package/vscode/src/vs/platform/request/common/request.js +18 -18
  109. package/vscode/src/vs/platform/telemetry/common/telemetryUtils.js +1 -1
  110. package/vscode/src/vs/platform/theme/common/colorUtils.js +2 -2
  111. package/vscode/src/vs/platform/theme/common/colors/baseColors.js +17 -17
  112. package/vscode/src/vs/platform/theme/common/colors/chartsColors.js +8 -8
  113. package/vscode/src/vs/platform/theme/common/colors/editorColors.js +94 -94
  114. package/vscode/src/vs/platform/theme/common/colors/inputColors.js +45 -45
  115. package/vscode/src/vs/platform/theme/common/colors/listColors.js +36 -36
  116. package/vscode/src/vs/platform/theme/common/colors/menuColors.js +7 -7
  117. package/vscode/src/vs/platform/theme/common/colors/minimapColors.js +11 -11
  118. package/vscode/src/vs/platform/theme/common/colors/miscColors.js +15 -15
  119. package/vscode/src/vs/platform/theme/common/colors/quickpickColors.js +9 -9
  120. package/vscode/src/vs/platform/theme/common/colors/searchColors.js +3 -3
  121. package/vscode/src/vs/platform/theme/common/iconRegistry.js +6 -6
  122. package/vscode/src/vs/platform/undoRedo/common/undoRedoService.js +22 -23
  123. package/vscode/src/vs/platform/userDataProfile/common/userDataProfile.js +1 -1
  124. package/vscode/src/vs/platform/userDataSync/common/userDataSync.js +5 -5
  125. package/vscode/src/vs/platform/workspace/common/workspace.js +1 -1
  126. package/vscode/src/vs/workbench/api/common/extHostDiagnostics.js +1 -1
  127. package/vscode/src/vs/workbench/api/common/extHostExtensionService.js +2 -2
  128. package/vscode/src/vs/workbench/api/common/extHostLanguageFeatures.js +2 -2
  129. package/vscode/src/vs/workbench/api/common/extHostLanguageModels.js +1 -1
  130. package/vscode/src/vs/workbench/api/common/extHostLogService.js +1 -1
  131. package/vscode/src/vs/workbench/api/common/extHostNotebook.js +2 -2
  132. package/vscode/src/vs/workbench/api/common/extHostStatusBar.js +2 -2
  133. package/vscode/src/vs/workbench/api/common/extHostTelemetry.js +1 -1
  134. package/vscode/src/vs/workbench/api/common/extHostTerminalService.js +1 -1
  135. package/vscode/src/vs/workbench/api/common/extHostTreeViews.js +1 -1
  136. package/vscode/src/vs/workbench/api/common/extHostTunnelService.js +2 -2
  137. package/vscode/src/vs/workbench/api/common/extHostWorkspace.js +1 -1
  138. package/vscode/src/vs/workbench/api/common/jsonValidationExtensionPoint.js +12 -12
  139. package/vscode/src/vs/workbench/browser/actions/developerActions.js +31 -31
  140. package/vscode/src/vs/workbench/browser/actions/textInputActions.js +6 -6
  141. package/vscode/src/vs/workbench/common/configuration.js +10 -10
  142. package/vscode/src/vs/workbench/common/contextkeys.js +70 -70
  143. package/vscode/src/vs/workbench/common/editor/editorOptions.d.ts +3 -0
  144. package/vscode/src/vs/workbench/common/editor/editorOptions.js +52 -0
  145. package/vscode/src/vs/workbench/common/editor.js +4 -4
  146. package/vscode/src/vs/workbench/common/theme.js +160 -160
  147. package/vscode/src/vs/workbench/common/views.js +4 -4
  148. package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.js +141 -141
  149. package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleViewActions.js +12 -12
  150. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorContextKeys.js +5 -5
  151. package/vscode/src/vs/workbench/contrib/chat/common/chatContextKeys.js +32 -32
  152. package/vscode/src/vs/workbench/contrib/chat/common/chatEditingService.js +3 -3
  153. package/vscode/src/vs/workbench/contrib/chat/common/languageModels.js +6 -6
  154. package/vscode/src/vs/workbench/contrib/chat/common/tools/editFileTool.js +1 -1
  155. package/vscode/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.js +13 -13
  156. package/vscode/src/vs/workbench/contrib/codeEditor/browser/dictation/editorDictation.js +4 -4
  157. package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorAccessibilityHelp.js +5 -5
  158. package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.js +3 -3
  159. package/vscode/src/vs/workbench/contrib/codeEditor/browser/largeFileOptimizations.js +3 -3
  160. package/vscode/src/vs/workbench/contrib/codeEditor/browser/saveParticipants.js +4 -4
  161. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMinimap.js +2 -2
  162. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier.js +4 -4
  163. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderControlCharacter.js +2 -2
  164. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderWhitespace.js +2 -2
  165. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.js +5 -5
  166. package/vscode/src/vs/workbench/contrib/comments/browser/commentsAccessibility.js +12 -12
  167. package/vscode/src/vs/workbench/contrib/comments/common/commentContextKeys.js +11 -11
  168. package/vscode/src/vs/workbench/contrib/debug/common/abstractDebugAdapter.js +1 -1
  169. package/vscode/src/vs/workbench/contrib/debug/common/debug.js +64 -64
  170. package/vscode/src/vs/workbench/contrib/files/browser/fileConstants.js +6 -6
  171. package/vscode/src/vs/workbench/contrib/folding/browser/folding.contribution.js +3 -3
  172. package/vscode/src/vs/workbench/contrib/format/browser/formatActionsMultiple.js +20 -20
  173. package/vscode/src/vs/workbench/contrib/format/browser/formatActionsNone.js +4 -4
  174. package/vscode/src/vs/workbench/contrib/format/browser/formatModified.js +1 -1
  175. package/vscode/src/vs/workbench/contrib/inlayHints/browser/inlayHintsAccessibilty.js +4 -4
  176. package/vscode/src/vs/workbench/contrib/list/browser/listResizeColumnAction.js +2 -2
  177. package/vscode/src/vs/workbench/contrib/list/browser/tableColumnResizeQuickPick.js +5 -5
  178. package/vscode/src/vs/workbench/contrib/snippets/browser/snippetCompletionProvider.js +3 -3
  179. package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsFile.js +3 -3
  180. package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsService.js +9 -9
  181. package/vscode/src/vs/workbench/contrib/speech/common/speechService.js +29 -29
  182. package/vscode/src/vs/workbench/contrib/tasks/common/taskDefinitionRegistry.js +5 -5
  183. package/vscode/src/vs/workbench/contrib/tasks/common/tasks.js +4 -4
  184. package/vscode/src/vs/workbench/contrib/testing/common/constants.js +11 -11
  185. package/vscode/src/vs/workbench/contrib/testing/common/testTypes.js +3 -3
  186. package/vscode/src/vs/workbench/services/configurationResolver/common/variableResolver.js +16 -16
  187. package/vscode/src/vs/workbench/services/editor/browser/codeEditorService.d.ts +13 -0
  188. package/vscode/src/vs/workbench/services/editor/browser/codeEditorService.js +87 -0
  189. package/vscode/src/vs/workbench/services/editor/common/editorResolverService.js +1 -1
  190. package/vscode/src/vs/workbench/services/extensions/common/extensionsRegistry.js +83 -83
  191. package/vscode/src/vs/workbench/services/language/common/languageService.js +28 -28
  192. package/vscode/src/vs/workbench/services/log/common/logConstants.js +1 -1
  193. package/vscode/src/vs/workbench/services/remote/common/remoteExplorerService.js +8 -8
  194. package/vscode/src/vs/workbench/services/remote/common/tunnelModel.js +6 -6
  195. package/vscode/src/vs/workbench/services/search/common/queryBuilder.js +1 -1
  196. package/vscode/src/vs/workbench/services/themes/common/colorExtensionPoint.js +22 -22
  197. package/vscode/src/vs/workbench/services/themes/common/iconExtensionPoint.js +13 -13
  198. package/vscode/src/vs/workbench/services/userDataSync/common/userDataSync.js +12 -12
@@ -0,0 +1,215 @@
1
+
2
+ import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
3
+ import { equals, binarySearch2 } from '../../../../base/common/arrays.js';
4
+ import { Emitter } from '../../../../base/common/event.js';
5
+ import { DisposableStore, toDisposable } from '../../../../base/common/lifecycle.js';
6
+ import { LinkedList } from '../../../../base/common/linkedList.js';
7
+ import { compare } from '../../../../base/common/strings.js';
8
+ import { URI } from '../../../../base/common/uri.js';
9
+ import { Range } from '../../../common/core/range.js';
10
+ import '../../../../platform/instantiation/common/extensions.js';
11
+ import { MarkerSeverity } from '../../../../platform/markers/common/markers.js';
12
+ import { IMarkerService } from '../../../../platform/markers/common/markers.service.js';
13
+ import { IConfigurationService } from '../../../../platform/configuration/common/configuration.service.js';
14
+ import { isEqual } from '../../../../base/common/resources.js';
15
+ import '../../../../platform/instantiation/common/instantiation.js';
16
+
17
+ class MarkerCoordinate {
18
+ constructor(marker, index, total) {
19
+ this.marker = marker;
20
+ this.index = index;
21
+ this.total = total;
22
+ }
23
+ }
24
+ let MarkerList = class MarkerList {
25
+ constructor(resourceFilter, _markerService, _configService) {
26
+ this._markerService = _markerService;
27
+ this._configService = _configService;
28
+ this._onDidChange = ( new Emitter());
29
+ this.onDidChange = this._onDidChange.event;
30
+ this._dispoables = ( new DisposableStore());
31
+ this._markers = [];
32
+ this._nextIdx = -1;
33
+ if (URI.isUri(resourceFilter)) {
34
+ this._resourceFilter = uri => ( uri.toString()) === ( resourceFilter.toString());
35
+ }
36
+ else if (resourceFilter) {
37
+ this._resourceFilter = resourceFilter;
38
+ }
39
+ const compareOrder = this._configService.getValue('problems.sortOrder');
40
+ const compareMarker = (a, b) => {
41
+ let res = compare(( a.resource.toString()), ( b.resource.toString()));
42
+ if (res === 0) {
43
+ if (compareOrder === 'position') {
44
+ res = Range.compareRangesUsingStarts(a, b) || MarkerSeverity.compare(a.severity, b.severity);
45
+ }
46
+ else {
47
+ res = MarkerSeverity.compare(a.severity, b.severity) || Range.compareRangesUsingStarts(a, b);
48
+ }
49
+ }
50
+ return res;
51
+ };
52
+ const updateMarker = () => {
53
+ let newMarkers = this._markerService.read({
54
+ resource: URI.isUri(resourceFilter) ? resourceFilter : undefined,
55
+ severities: MarkerSeverity.Error | MarkerSeverity.Warning | MarkerSeverity.Info
56
+ });
57
+ if (typeof resourceFilter === 'function') {
58
+ newMarkers = newMarkers.filter(m => this._resourceFilter(m.resource));
59
+ }
60
+ newMarkers.sort(compareMarker);
61
+ if (equals(newMarkers, this._markers, (a, b) => ( a.resource.toString()) === ( b.resource.toString())
62
+ && a.startLineNumber === b.startLineNumber
63
+ && a.startColumn === b.startColumn
64
+ && a.endLineNumber === b.endLineNumber
65
+ && a.endColumn === b.endColumn
66
+ && a.severity === b.severity
67
+ && a.message === b.message)) {
68
+ return false;
69
+ }
70
+ this._markers = newMarkers;
71
+ return true;
72
+ };
73
+ updateMarker();
74
+ this._dispoables.add(_markerService.onMarkerChanged(uris => {
75
+ if (!this._resourceFilter || ( uris.some(uri => this._resourceFilter(uri)))) {
76
+ if (updateMarker()) {
77
+ this._nextIdx = -1;
78
+ this._onDidChange.fire();
79
+ }
80
+ }
81
+ }));
82
+ }
83
+ dispose() {
84
+ this._dispoables.dispose();
85
+ this._onDidChange.dispose();
86
+ }
87
+ matches(uri) {
88
+ if (!this._resourceFilter && !uri) {
89
+ return true;
90
+ }
91
+ if (!this._resourceFilter || !uri) {
92
+ return false;
93
+ }
94
+ return this._resourceFilter(uri);
95
+ }
96
+ get selected() {
97
+ const marker = this._markers[this._nextIdx];
98
+ return marker && ( new MarkerCoordinate(marker, this._nextIdx + 1, this._markers.length));
99
+ }
100
+ _initIdx(model, position, fwd) {
101
+ let idx = this._markers.findIndex(marker => isEqual(marker.resource, model.uri));
102
+ if (idx < 0) {
103
+ idx = binarySearch2(this._markers.length, idx => compare(( this._markers[idx].resource.toString()), ( model.uri.toString())));
104
+ if (idx < 0) {
105
+ idx = ~idx;
106
+ }
107
+ if (fwd) {
108
+ this._nextIdx = idx;
109
+ }
110
+ else {
111
+ this._nextIdx = (this._markers.length + idx - 1) % this._markers.length;
112
+ }
113
+ }
114
+ else {
115
+ let found = false;
116
+ let wentPast = false;
117
+ for (let i = idx; i < this._markers.length; i++) {
118
+ let range = Range.lift(this._markers[i]);
119
+ if (range.isEmpty()) {
120
+ const word = model.getWordAtPosition(range.getStartPosition());
121
+ if (word) {
122
+ range = ( new Range(
123
+ range.startLineNumber,
124
+ word.startColumn,
125
+ range.startLineNumber,
126
+ word.endColumn
127
+ ));
128
+ }
129
+ }
130
+ if (position && (range.containsPosition(position) || position.isBeforeOrEqual(range.getStartPosition()))) {
131
+ this._nextIdx = i;
132
+ found = true;
133
+ wentPast = !range.containsPosition(position);
134
+ break;
135
+ }
136
+ if (( this._markers[i].resource.toString()) !== ( model.uri.toString())) {
137
+ break;
138
+ }
139
+ }
140
+ if (!found) {
141
+ this._nextIdx = fwd ? 0 : this._markers.length - 1;
142
+ }
143
+ else if (wentPast && !fwd) {
144
+ this._nextIdx -= 1;
145
+ }
146
+ }
147
+ if (this._nextIdx < 0) {
148
+ this._nextIdx = this._markers.length - 1;
149
+ }
150
+ }
151
+ resetIndex() {
152
+ this._nextIdx = -1;
153
+ }
154
+ move(fwd, model, position) {
155
+ if (this._markers.length === 0) {
156
+ return false;
157
+ }
158
+ const oldIdx = this._nextIdx;
159
+ if (this._nextIdx === -1) {
160
+ this._initIdx(model, position, fwd);
161
+ }
162
+ else if (fwd) {
163
+ this._nextIdx = (this._nextIdx + 1) % this._markers.length;
164
+ }
165
+ else if (!fwd) {
166
+ this._nextIdx = (this._nextIdx - 1 + this._markers.length) % this._markers.length;
167
+ }
168
+ if (oldIdx !== this._nextIdx) {
169
+ return true;
170
+ }
171
+ return false;
172
+ }
173
+ find(uri, position) {
174
+ let idx = this._markers.findIndex(marker => ( marker.resource.toString()) === ( uri.toString()));
175
+ if (idx < 0) {
176
+ return undefined;
177
+ }
178
+ for (; idx < this._markers.length; idx++) {
179
+ if (Range.containsPosition(this._markers[idx], position)) {
180
+ return ( new MarkerCoordinate(this._markers[idx], idx + 1, this._markers.length));
181
+ }
182
+ }
183
+ return undefined;
184
+ }
185
+ };
186
+ MarkerList = ( __decorate([
187
+ ( __param(1, IMarkerService)),
188
+ ( __param(2, IConfigurationService))
189
+ ], MarkerList));
190
+ let MarkerNavigationService = class MarkerNavigationService {
191
+ constructor(_markerService, _configService) {
192
+ this._markerService = _markerService;
193
+ this._configService = _configService;
194
+ this._provider = ( new LinkedList());
195
+ }
196
+ registerProvider(provider) {
197
+ const remove = this._provider.unshift(provider);
198
+ return toDisposable(() => remove());
199
+ }
200
+ getMarkerList(resource) {
201
+ for (const provider of this._provider) {
202
+ const result = provider.getMarkerList(resource);
203
+ if (result) {
204
+ return result;
205
+ }
206
+ }
207
+ return ( new MarkerList(resource, this._markerService, this._configService));
208
+ }
209
+ };
210
+ MarkerNavigationService = ( __decorate([
211
+ ( __param(0, IMarkerService)),
212
+ ( __param(1, IConfigurationService))
213
+ ], MarkerNavigationService));
214
+
215
+ export { MarkerCoordinate, MarkerList, MarkerNavigationService };
@@ -1,6 +1,6 @@
1
1
  import { IDisposable } from "../../../../base/common/lifecycle.js";
2
2
  import { URI } from "../../../../base/common/uri.js";
3
- import { IMarkerListProvider, MarkerList } from "@codingame/monaco-vscode-notebook-service-override/vscode/vs/editor/contrib/gotoError/browser/markerNavigationService";
3
+ import { IMarkerListProvider, MarkerList } from "./markerNavigationService.js";
4
4
  export declare const IMarkerNavigationService: import("../../../../platform/instantiation/common/instantiation.js").ServiceIdentifier<IMarkerNavigationService>;
5
5
  export interface IMarkerNavigationService {
6
6
  readonly _serviceBrand: undefined;
@@ -0,0 +1,26 @@
1
+ import { ICodeEditor } from "../../../browser/editorBrowser.js";
2
+ import { ICodeEditorService } from "../../../browser/services/codeEditorService.service.js";
3
+ import { OneReference } from "./referencesModel.js";
4
+ import { RawContextKey } from "../../../../platform/contextkey/common/contextkey.js";
5
+ import { IContextKeyService } from "../../../../platform/contextkey/common/contextkey.service.js";
6
+ import { IKeybindingService } from "../../../../platform/keybinding/common/keybinding.service.js";
7
+ import { INotificationService } from "../../../../platform/notification/common/notification.service.js";
8
+ import { ISymbolNavigationService } from "./symbolNavigation.service.js";
9
+ export declare const ctxHasSymbols: RawContextKey<false>;
10
+ export declare class SymbolNavigationService implements ISymbolNavigationService {
11
+ private readonly _editorService;
12
+ private readonly _notificationService;
13
+ private readonly _keybindingService;
14
+ readonly _serviceBrand: undefined;
15
+ private readonly _ctxHasSymbols;
16
+ private _currentModel?;
17
+ private _currentIdx;
18
+ private _currentState?;
19
+ private _currentMessage?;
20
+ private _ignoreEditorChange;
21
+ constructor(contextKeyService: IContextKeyService, _editorService: ICodeEditorService, _notificationService: INotificationService, _keybindingService: IKeybindingService);
22
+ reset(): void;
23
+ put(anchor: OneReference): void;
24
+ revealNext(source: ICodeEditor): Promise<any>;
25
+ private _showMessage;
26
+ }
@@ -0,0 +1,178 @@
1
+
2
+ import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
3
+ import { Emitter } from '../../../../base/common/event.js';
4
+ import { KeyCode } from '../../../../base/common/keyCodes.js';
5
+ import { combinedDisposable, DisposableStore, dispose } from '../../../../base/common/lifecycle.js';
6
+ import { isEqual } from '../../../../base/common/resources.js';
7
+ import { registerEditorCommand, EditorCommand } from '../../../browser/editorExtensions.js';
8
+ import { ICodeEditorService } from '../../../browser/services/codeEditorService.service.js';
9
+ import { Range } from '../../../common/core/range.js';
10
+ import { localize } from '../../../../nls.js';
11
+ import { RawContextKey } from '../../../../platform/contextkey/common/contextkey.js';
12
+ import { IContextKeyService } from '../../../../platform/contextkey/common/contextkey.service.js';
13
+ import { TextEditorSelectionRevealType } from '../../../../platform/editor/common/editor.js';
14
+ import '../../../../platform/instantiation/common/extensions.js';
15
+ import { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.service.js';
16
+ import { KeybindingWeight, KeybindingsRegistry } from '../../../../platform/keybinding/common/keybindingsRegistry.js';
17
+ import { INotificationService } from '../../../../platform/notification/common/notification.service.js';
18
+ import { ISymbolNavigationService } from './symbolNavigation.service.js';
19
+
20
+ const ctxHasSymbols = ( new RawContextKey('hasSymbols', false, ( localize(
21
+ 1124,
22
+ "Whether there are symbol locations that can be navigated via keyboard-only."
23
+ ))));
24
+ let SymbolNavigationService = class SymbolNavigationService {
25
+ constructor(contextKeyService, _editorService, _notificationService, _keybindingService) {
26
+ this._editorService = _editorService;
27
+ this._notificationService = _notificationService;
28
+ this._keybindingService = _keybindingService;
29
+ this._currentModel = undefined;
30
+ this._currentIdx = -1;
31
+ this._ignoreEditorChange = false;
32
+ this._ctxHasSymbols = ctxHasSymbols.bindTo(contextKeyService);
33
+ }
34
+ reset() {
35
+ this._ctxHasSymbols.reset();
36
+ this._currentState?.dispose();
37
+ this._currentMessage?.dispose();
38
+ this._currentModel = undefined;
39
+ this._currentIdx = -1;
40
+ }
41
+ put(anchor) {
42
+ const refModel = anchor.parent.parent;
43
+ if (refModel.references.length <= 1) {
44
+ this.reset();
45
+ return;
46
+ }
47
+ this._currentModel = refModel;
48
+ this._currentIdx = refModel.references.indexOf(anchor);
49
+ this._ctxHasSymbols.set(true);
50
+ this._showMessage();
51
+ const editorState = ( new EditorState(this._editorService));
52
+ const listener = editorState.onDidChange(_ => {
53
+ if (this._ignoreEditorChange) {
54
+ return;
55
+ }
56
+ const editor = this._editorService.getActiveCodeEditor();
57
+ if (!editor) {
58
+ return;
59
+ }
60
+ const model = editor.getModel();
61
+ const position = editor.getPosition();
62
+ if (!model || !position) {
63
+ return;
64
+ }
65
+ let seenUri = false;
66
+ let seenPosition = false;
67
+ for (const reference of refModel.references) {
68
+ if (isEqual(reference.uri, model.uri)) {
69
+ seenUri = true;
70
+ seenPosition = seenPosition || Range.containsPosition(reference.range, position);
71
+ }
72
+ else if (seenUri) {
73
+ break;
74
+ }
75
+ }
76
+ if (!seenUri || !seenPosition) {
77
+ this.reset();
78
+ }
79
+ });
80
+ this._currentState = combinedDisposable(editorState, listener);
81
+ }
82
+ revealNext(source) {
83
+ if (!this._currentModel) {
84
+ return Promise.resolve();
85
+ }
86
+ this._currentIdx += 1;
87
+ this._currentIdx %= this._currentModel.references.length;
88
+ const reference = this._currentModel.references[this._currentIdx];
89
+ this._showMessage();
90
+ this._ignoreEditorChange = true;
91
+ return this._editorService.openCodeEditor({
92
+ resource: reference.uri,
93
+ options: {
94
+ selection: Range.collapseToStart(reference.range),
95
+ selectionRevealType: TextEditorSelectionRevealType.NearTopIfOutsideViewport
96
+ }
97
+ }, source).finally(() => {
98
+ this._ignoreEditorChange = false;
99
+ });
100
+ }
101
+ _showMessage() {
102
+ this._currentMessage?.dispose();
103
+ const kb = this._keybindingService.lookupKeybinding('editor.gotoNextSymbolFromResult');
104
+ const message = kb
105
+ ? ( localize(
106
+ 1125,
107
+ "Symbol {0} of {1}, {2} for next",
108
+ this._currentIdx + 1,
109
+ this._currentModel.references.length,
110
+ kb.getLabel()
111
+ ))
112
+ : ( localize(
113
+ 1126,
114
+ "Symbol {0} of {1}",
115
+ this._currentIdx + 1,
116
+ this._currentModel.references.length
117
+ ));
118
+ this._currentMessage = this._notificationService.status(message);
119
+ }
120
+ };
121
+ SymbolNavigationService = ( __decorate([
122
+ ( __param(0, IContextKeyService)),
123
+ ( __param(1, ICodeEditorService)),
124
+ ( __param(2, INotificationService)),
125
+ ( __param(3, IKeybindingService))
126
+ ], SymbolNavigationService));
127
+ registerEditorCommand(new (class extends EditorCommand {
128
+ constructor() {
129
+ super({
130
+ id: 'editor.gotoNextSymbolFromResult',
131
+ precondition: ctxHasSymbols,
132
+ kbOpts: {
133
+ weight: KeybindingWeight.EditorContrib,
134
+ primary: KeyCode.F12
135
+ }
136
+ });
137
+ }
138
+ runEditorCommand(accessor, editor) {
139
+ return accessor.get(ISymbolNavigationService).revealNext(editor);
140
+ }
141
+ }));
142
+ KeybindingsRegistry.registerCommandAndKeybindingRule({
143
+ id: 'editor.gotoNextSymbolFromResult.cancel',
144
+ weight: KeybindingWeight.EditorContrib,
145
+ when: ctxHasSymbols,
146
+ primary: KeyCode.Escape,
147
+ handler(accessor) {
148
+ accessor.get(ISymbolNavigationService).reset();
149
+ }
150
+ });
151
+ let EditorState = class EditorState {
152
+ constructor(editorService) {
153
+ this._listener = ( new Map());
154
+ this._disposables = ( new DisposableStore());
155
+ this._onDidChange = ( new Emitter());
156
+ this.onDidChange = this._onDidChange.event;
157
+ this._disposables.add(editorService.onCodeEditorRemove(this._onDidRemoveEditor, this));
158
+ this._disposables.add(editorService.onCodeEditorAdd(this._onDidAddEditor, this));
159
+ editorService.listCodeEditors().forEach(this._onDidAddEditor, this);
160
+ }
161
+ dispose() {
162
+ this._disposables.dispose();
163
+ this._onDidChange.dispose();
164
+ dispose(( this._listener.values()));
165
+ }
166
+ _onDidAddEditor(editor) {
167
+ this._listener.set(editor, combinedDisposable(editor.onDidChangeCursorPosition(_ => this._onDidChange.fire({ editor })), editor.onDidChangeModelContent(_ => this._onDidChange.fire({ editor }))));
168
+ }
169
+ _onDidRemoveEditor(editor) {
170
+ this._listener.get(editor)?.dispose();
171
+ this._listener.delete(editor);
172
+ }
173
+ };
174
+ EditorState = ( __decorate([
175
+ ( __param(0, ICodeEditorService))
176
+ ], EditorState));
177
+
178
+ export { SymbolNavigationService, ctxHasSymbols };
@@ -19,7 +19,7 @@ class DebugEditorGpuRendererAction extends EditorAction {
19
19
  constructor() {
20
20
  super({
21
21
  id: 'editor.action.debugEditorGpuRenderer',
22
- label: ( localize2(1124, "Developer: Debug Editor GPU Renderer")),
22
+ label: ( localize2(1127, "Developer: Debug Editor GPU Renderer")),
23
23
  precondition: ContextKeyExpr.true(),
24
24
  });
25
25
  }
@@ -28,15 +28,15 @@ class DebugEditorGpuRendererAction extends EditorAction {
28
28
  const quickInputService = accessor.get(IQuickInputService);
29
29
  const choice = await quickInputService.pick([
30
30
  {
31
- label: ( localize(1125, "Log Texture Atlas Stats")),
31
+ label: ( localize(1128, "Log Texture Atlas Stats")),
32
32
  id: 'logTextureAtlasStats',
33
33
  },
34
34
  {
35
- label: ( localize(1126, "Save Texture Atlas")),
35
+ label: ( localize(1129, "Save Texture Atlas")),
36
36
  id: 'saveTextureAtlas',
37
37
  },
38
38
  {
39
- label: ( localize(1127, "Draw Glyph")),
39
+ label: ( localize(1130, "Draw Glyph")),
40
40
  id: 'drawGlyph',
41
41
  },
42
42
  ], { canPickMany: false });
@@ -250,19 +250,19 @@ let RenderedContentHoverParts = class RenderedContentHoverParts extends Disposab
250
250
  return '';
251
251
  }
252
252
  if (renderedPart.type === 'statusBar') {
253
- const statusBarDescription = [( localize(1128, "This is a hover status bar."))];
253
+ const statusBarDescription = [( localize(1131, "This is a hover status bar."))];
254
254
  for (const action of renderedPart.actions) {
255
255
  const keybinding = action.actionKeybindingLabel;
256
256
  if (keybinding) {
257
257
  statusBarDescription.push(( localize(
258
- 1129,
258
+ 1132,
259
259
  "It has an action with label {0} and keybinding {1}.",
260
260
  action.actionLabel,
261
261
  keybinding
262
262
  )));
263
263
  }
264
264
  else {
265
- statusBarDescription.push(( localize(1130, "It has an action with label {0}.", action.actionLabel)));
265
+ statusBarDescription.push(( localize(1133, "It has an action with label {0}.", action.actionLabel)));
266
266
  }
267
267
  }
268
268
  return statusBarDescription.join('\n');
@@ -20,12 +20,12 @@ import { labelForHoverVerbosityAction } from './markdownHoverParticipant.js';
20
20
  var HoverAccessibilityHelpNLS;
21
21
  (function (HoverAccessibilityHelpNLS) {
22
22
  HoverAccessibilityHelpNLS.increaseVerbosity = ( localize(
23
- 1131,
23
+ 1134,
24
24
  '- The focused hover part verbosity level can be increased with the Increase Hover Verbosity command.',
25
25
  `<keybinding:${INCREASE_HOVER_VERBOSITY_ACTION_ID}>`
26
26
  ));
27
27
  HoverAccessibilityHelpNLS.decreaseVerbosity = ( localize(
28
- 1132,
28
+ 1135,
29
29
  '- The focused hover part verbosity level can be decreased with the Decrease Hover Verbosity command.',
30
30
  `<keybinding:${DECREASE_HOVER_VERBOSITY_ACTION_ID}>`
31
31
  ));
@@ -14,9 +14,9 @@ const GO_TO_TOP_HOVER_ACTION_ID = 'editor.action.goToTopHover';
14
14
  const GO_TO_BOTTOM_HOVER_ACTION_ID = 'editor.action.goToBottomHover';
15
15
  const INCREASE_HOVER_VERBOSITY_ACTION_ID = 'editor.action.increaseHoverVerbosityLevel';
16
16
  const INCREASE_HOVER_VERBOSITY_ACCESSIBLE_ACTION_ID = 'editor.action.increaseHoverVerbosityLevelFromAccessibleView';
17
- const INCREASE_HOVER_VERBOSITY_ACTION_LABEL = ( localize(1133, "Increase Hover Verbosity Level"));
17
+ const INCREASE_HOVER_VERBOSITY_ACTION_LABEL = ( localize(1136, "Increase Hover Verbosity Level"));
18
18
  const DECREASE_HOVER_VERBOSITY_ACTION_ID = 'editor.action.decreaseHoverVerbosityLevel';
19
19
  const DECREASE_HOVER_VERBOSITY_ACCESSIBLE_ACTION_ID = 'editor.action.decreaseHoverVerbosityLevelFromAccessibleView';
20
- const DECREASE_HOVER_VERBOSITY_ACTION_LABEL = ( localize(1134, "Decrease Hover Verbosity Level"));
20
+ const DECREASE_HOVER_VERBOSITY_ACTION_LABEL = ( localize(1137, "Decrease Hover Verbosity Level"));
21
21
 
22
22
  export { DECREASE_HOVER_VERBOSITY_ACCESSIBLE_ACTION_ID, DECREASE_HOVER_VERBOSITY_ACTION_ID, DECREASE_HOVER_VERBOSITY_ACTION_LABEL, GO_TO_BOTTOM_HOVER_ACTION_ID, GO_TO_TOP_HOVER_ACTION_ID, HIDE_HOVER_ACTION_ID, INCREASE_HOVER_VERBOSITY_ACCESSIBLE_ACTION_ID, INCREASE_HOVER_VERBOSITY_ACTION_ID, INCREASE_HOVER_VERBOSITY_ACTION_LABEL, PAGE_DOWN_HOVER_ACTION_ID, PAGE_UP_HOVER_ACTION_ID, SCROLL_DOWN_HOVER_ACTION_ID, SCROLL_LEFT_HOVER_ACTION_ID, SCROLL_RIGHT_HOVER_ACTION_ID, SCROLL_UP_HOVER_ACTION_ID, SHOW_DEFINITION_PREVIEW_HOVER_ACTION_ID, SHOW_OR_FOCUS_HOVER_ACTION_ID };