@codingame/monaco-vscode-view-common-service-override 11.1.2 → 12.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/index.d.ts +3 -1
  2. package/index.js +110 -1
  3. package/package.json +64 -10
  4. package/service-override/tools/editorAssets.d.ts +1 -0
  5. package/service-override/tools/editorAssets.js +5 -0
  6. package/vscode/src/vs/platform/actions/browser/actionViewItemService.d.ts +21 -0
  7. package/vscode/src/vs/platform/actions/browser/actionViewItemService.js +2 -0
  8. package/vscode/src/vs/platform/webview/common/mimeTypes.d.ts +2 -0
  9. package/vscode/src/vs/platform/webview/common/mimeTypes.js +1 -0
  10. package/vscode/src/vs/platform/webview/common/webviewPortMapping.d.ts +18 -0
  11. package/vscode/src/vs/platform/webview/common/webviewPortMapping.js +1 -0
  12. package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.d.ts +7 -0
  13. package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +116 -115
  14. package/vscode/src/vs/workbench/browser/actions/listCommands.d.ts +1 -0
  15. package/vscode/src/vs/workbench/browser/actions/listCommands.js +120 -125
  16. package/vscode/src/vs/workbench/browser/actions/navigationActions.d.ts +1 -0
  17. package/vscode/src/vs/workbench/browser/actions/navigationActions.js +81 -74
  18. package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.d.ts +1 -0
  19. package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +216 -250
  20. package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.d.ts +21 -0
  21. package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +26 -25
  22. package/vscode/src/vs/workbench/browser/parts/paneCompositePartService.d.ts +32 -0
  23. package/vscode/src/vs/workbench/browser/parts/paneCompositePartService.js +10 -8
  24. package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.d.ts +1 -0
  25. package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +58 -64
  26. package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.d.ts +50 -0
  27. package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +48 -38
  28. package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.d.ts +54 -0
  29. package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.js +19 -40
  30. package/vscode/src/vs/workbench/contrib/callHierarchy/browser/media/callHierarchy.css.js +1 -1
  31. package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditor.contribution.d.ts +1 -0
  32. package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditor.contribution.js +7 -5
  33. package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.d.ts +58 -0
  34. package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.js +6 -4
  35. package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditors.d.ts +45 -0
  36. package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditors.js +6 -4
  37. package/vscode/src/vs/workbench/contrib/customEditor/browser/media/customEditor.css.js +1 -1
  38. package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.d.ts +18 -0
  39. package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.js +16 -16
  40. package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.d.ts +65 -0
  41. package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.js +15 -10
  42. package/vscode/src/vs/workbench/contrib/customEditor/common/customEditorModelManager.d.ts +12 -0
  43. package/vscode/src/vs/workbench/contrib/customEditor/common/customEditorModelManager.js +1 -0
  44. package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.d.ts +15 -0
  45. package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.js +27 -25
  46. package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpener.contribution.d.ts +1 -0
  47. package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpener.contribution.js +4 -2
  48. package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.d.ts +1 -0
  49. package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.js +6 -386
  50. package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.d.ts +15 -0
  51. package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.js +385 -0
  52. package/vscode/src/vs/workbench/contrib/languageStatus/browser/media/languageStatus.css.js +1 -1
  53. package/vscode/src/vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution.d.ts +13 -0
  54. package/vscode/src/vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution.js +20 -20
  55. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/commands.d.ts +105 -0
  56. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/commands.js +50 -62
  57. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/devCommands.d.ts +18 -0
  58. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/devCommands.js +16 -15
  59. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution.d.ts +1 -0
  60. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution.js +15 -13
  61. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorSerializer.d.ts +27 -0
  62. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorSerializer.js +2 -1
  63. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/colors.d.ts +13 -0
  64. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/colors.js +14 -13
  65. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editorGutter.d.ts +31 -0
  66. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editorGutter.js +2 -1
  67. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.d.ts +9 -0
  68. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.js +15 -14
  69. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/codeEditorView.d.ts +45 -0
  70. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/codeEditorView.js +3 -2
  71. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.d.ts +43 -0
  72. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.js +37 -39
  73. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.d.ts +11 -0
  74. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.js +22 -21
  75. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/lineAlignment.d.ts +7 -0
  76. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/lineAlignment.js +3 -2
  77. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/media/mergeEditor.css.js +1 -1
  78. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.d.ts +117 -0
  79. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.js +57 -53
  80. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/scrollSynchronizer.d.ts +22 -0
  81. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/scrollSynchronizer.js +27 -25
  82. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.d.ts +41 -0
  83. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.js +15 -13
  84. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewZones.d.ts +29 -0
  85. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewZones.js +4 -3
  86. package/vscode/src/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker.d.ts +11 -0
  87. package/vscode/src/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker.js +28 -28
  88. package/vscode/src/vs/workbench/contrib/sash/browser/sash.contribution.d.ts +1 -0
  89. package/vscode/src/vs/workbench/contrib/sash/browser/sash.contribution.js +7 -5
  90. package/vscode/src/vs/workbench/contrib/sash/browser/sash.d.ts +15 -0
  91. package/vscode/src/vs/workbench/contrib/sash/browser/sash.js +2 -1
  92. package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/media/typeHierarchy.css.js +1 -1
  93. package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.d.ts +1 -0
  94. package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.js +54 -56
  95. package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.d.ts +50 -0
  96. package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +48 -38
  97. package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.d.ts +52 -0
  98. package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.js +19 -30
  99. package/vscode/src/vs/workbench/contrib/webview/browser/overlayWebview.d.ts +101 -0
  100. package/vscode/src/vs/workbench/contrib/webview/browser/overlayWebview.js +3 -2
  101. package/vscode/src/vs/workbench/contrib/webview/browser/resourceLoading.d.ts +38 -0
  102. package/vscode/src/vs/workbench/contrib/webview/browser/resourceLoading.js +7 -6
  103. package/vscode/src/vs/workbench/contrib/webview/browser/themeing.d.ts +23 -0
  104. package/vscode/src/vs/workbench/contrib/webview/browser/themeing.js +7 -6
  105. package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.d.ts +139 -0
  106. package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +58 -56
  107. package/vscode/src/vs/workbench/contrib/webview/browser/webviewFindWidget.d.ts +33 -0
  108. package/vscode/src/vs/workbench/contrib/webview/browser/webviewFindWidget.js +4 -3
  109. package/vscode/src/vs/workbench/contrib/webview/browser/webviewService.d.ts +21 -0
  110. package/vscode/src/vs/workbench/contrib/webview/browser/webviewService.js +2 -1
  111. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.d.ts +33 -0
  112. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.js +28 -28
  113. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditorInputSerializer.d.ts +50 -0
  114. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditorInputSerializer.js +3 -2
  115. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.d.ts +1 -0
  116. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.js +15 -13
  117. package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewPane.d.ts +64 -0
  118. package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewPane.js +10 -8
  119. package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewService.d.ts +30 -0
  120. package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewService.js +1 -0
  121. package/vscode/src/vs/workbench/services/editor/browser/editorPaneService.d.ts +6 -0
  122. package/vscode/src/vs/workbench/services/editor/browser/editorPaneService.js +3 -1
  123. package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.d.ts +60 -0
  124. package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.js +64 -63
  125. package/vscode/src/vs/workbench/services/history/browser/historyService.d.ts +184 -0
  126. package/vscode/src/vs/workbench/services/history/browser/historyService.js +154 -148
  127. package/vscode/src/vs/workbench/services/progress/browser/media/progressService.css.js +1 -1
  128. package/vscode/src/vs/workbench/services/progress/browser/progressService.d.ts +36 -0
  129. package/vscode/src/vs/workbench/services/progress/browser/progressService.js +59 -54
  130. package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorHandler.d.ts +34 -0
  131. package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorHandler.js +4 -3
  132. package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorService.d.ts +71 -0
  133. package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorService.js +4 -2
  134. package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.d.ts +122 -0
  135. package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +86 -90
  136. package/vscode/src/vs/workbench/services/views/common/viewContainerModel.d.ts +80 -0
  137. package/vscode/src/vs/workbench/services/views/common/viewContainerModel.js +58 -64
  138. package/override/vs/workbench/browser/parts/editor/textEditor.js +0 -5
  139. package/override/vs/workbench/browser/parts/editor/textEditor.weak.js +0 -11
  140. package/tools/editorAssets.js +0 -4
  141. package/tools/url.js +0 -10
  142. package/viewCommon.js +0 -109
@@ -1,10 +1,13 @@
1
- import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
1
+
2
+ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
2
3
  import './media/callHierarchy.css.js';
3
4
  import { PeekViewWidget, peekViewBorder, peekViewTitleBackground, peekViewTitleForeground, peekViewTitleInfoForeground, peekViewResultsBackground, peekViewEditorMatchHighlight, IPeekViewService } from 'vscode/vscode/vs/editor/contrib/peekView/browser/peekView';
4
5
  import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
6
+ import { CallHierarchyDirection } from '@codingame/monaco-vscode-7f39b6f1-3542-5430-8760-0f404d7a7cee-common/vscode/vs/workbench/contrib/callHierarchy/common/callHierarchy';
5
7
  import { WorkbenchAsyncDataTree } from 'vscode/vscode/vs/platform/list/browser/listService';
6
8
  import { Sorter, AccessibilityProvider, IdentityProvider, VirtualDelegate, CallRenderer, DataSource } from './callHierarchyTree.js';
7
9
  import { localize } from 'vscode/vscode/vs/nls';
10
+ import { ScrollType } from 'vscode/vscode/vs/editor/common/editorCommon';
8
11
  import { Range } from 'vscode/vscode/vs/editor/common/core/range';
9
12
  import { SplitView, Sizing } from 'vscode/vscode/vs/base/browser/ui/splitview/splitview';
10
13
  import { Dimension, isKeyboardEvent } from 'vscode/vscode/vs/base/browser/dom';
@@ -13,24 +16,32 @@ import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/commo
13
16
  import { EmbeddedCodeEditorWidget } from 'vscode/vscode/vs/editor/browser/widget/codeEditor/embeddedCodeEditorWidget';
14
17
  import { ITextModelService } from 'vscode/vscode/vs/editor/common/services/resolverService';
15
18
  import { DisposableStore, toDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
16
- import { OverviewRulerLane } from 'vscode/vscode/vs/editor/common/model';
19
+ import { TrackedRangeStickiness, OverviewRulerLane } from 'vscode/vscode/vs/editor/common/model';
17
20
  import { themeColorFromId } from 'vscode/vscode/vs/platform/theme/common/themeService';
18
21
  import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService.service';
22
+ import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
19
23
  import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
20
24
  import { Color } from 'vscode/vscode/vs/base/common/color';
21
25
  import { TreeMouseEventTarget } from 'vscode/vscode/vs/base/browser/ui/tree/tree';
22
26
  import { MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
23
27
  import { IMenuService } from 'vscode/vscode/vs/platform/actions/common/actions.service';
24
28
  import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
25
- import { createAndFillInActionBarActions } from 'vscode/vscode/vs/platform/actions/browser/menuEntryActionViewItem';
29
+ import { getFlatActionBarActions } from 'vscode/vscode/vs/platform/actions/browser/menuEntryActionViewItem';
30
+ import { Orientation } from 'vscode/vscode/vs/base/browser/ui/sash/sash';
26
31
 
27
32
  var CallHierarchyTreePeekWidget_1;
33
+ var State;
34
+ (function (State) {
35
+ State["Loading"] = "loading";
36
+ State["Message"] = "message";
37
+ State["Data"] = "data";
38
+ })(State || (State = {}));
28
39
  class LayoutInfo {
29
40
  static store(info, storageService) {
30
- storageService.store('callHierarchyPeekLayout', JSON.stringify(info), 0 , 1 );
41
+ storageService.store('callHierarchyPeekLayout', JSON.stringify(info), StorageScope.PROFILE, StorageTarget.MACHINE);
31
42
  }
32
43
  static retrieve(storageService) {
33
- const value = storageService.get('callHierarchyPeekLayout', 0 , '{}');
44
+ const value = storageService.get('callHierarchyPeekLayout', StorageScope.PROFILE, '{}');
34
45
  const defaultInfo = { ratio: 0.7, height: 17 };
35
46
  try {
36
47
  return { ...defaultInfo, ...JSON.parse(value) };
@@ -48,7 +59,7 @@ class CallHierarchyTree extends WorkbenchAsyncDataTree {
48
59
  }
49
60
  let CallHierarchyTreePeekWidget = class CallHierarchyTreePeekWidget extends PeekViewWidget {
50
61
  static { CallHierarchyTreePeekWidget_1 = this; }
51
- static { this.TitleMenu = ( (new MenuId('callhierarchy/title'))); }
62
+ static { this.TitleMenu = ( new MenuId('callhierarchy/title')); }
52
63
  constructor(editor, _where, _direction, themeService, _peekViewService, _editorService, _textModelService, _storageService, _menuService, _contextKeyService, _instantiationService) {
53
64
  super(editor, { showFrame: true, showArrow: true, isResizeable: true, isAccessible: true }, _instantiationService);
54
65
  this._where = _where;
@@ -60,8 +71,8 @@ let CallHierarchyTreePeekWidget = class CallHierarchyTreePeekWidget extends Peek
60
71
  this._menuService = _menuService;
61
72
  this._contextKeyService = _contextKeyService;
62
73
  this._instantiationService = _instantiationService;
63
- this._treeViewStates = ( (new Map()));
64
- this._previewDisposable = ( (new DisposableStore()));
74
+ this._treeViewStates = ( new Map());
75
+ this._previewDisposable = ( new DisposableStore());
65
76
  this.create();
66
77
  this._peekViewService.addExclusiveWidget(editor, this);
67
78
  this._applyTheme(themeService.getColorTheme());
@@ -92,8 +103,7 @@ let CallHierarchyTreePeekWidget = class CallHierarchyTreePeekWidget extends Peek
92
103
  super._fillHead(container, true);
93
104
  const menu = this._menuService.createMenu(CallHierarchyTreePeekWidget_1.TitleMenu, this._contextKeyService);
94
105
  const updateToolbar = () => {
95
- const actions = [];
96
- createAndFillInActionBarActions(menu, undefined, actions);
106
+ const actions = getFlatActionBarActions(menu.getActions());
97
107
  this._actionbarWidget.clear();
98
108
  this._actionbarWidget.push(actions, { label: false, icon: true });
99
109
  };
@@ -103,7 +113,7 @@ let CallHierarchyTreePeekWidget = class CallHierarchyTreePeekWidget extends Peek
103
113
  }
104
114
  _fillBody(parent) {
105
115
  this._layoutInfo = LayoutInfo.retrieve(this._storageService);
106
- this._dim = ( (new Dimension(0, 0)));
116
+ this._dim = ( new Dimension(0, 0));
107
117
  this._parent = parent;
108
118
  parent.classList.add('call-hierarchy');
109
119
  const message = document.createElement('div');
@@ -114,7 +124,7 @@ let CallHierarchyTreePeekWidget = class CallHierarchyTreePeekWidget extends Peek
114
124
  const container = document.createElement('div');
115
125
  container.classList.add('results');
116
126
  parent.appendChild(container);
117
- this._splitView = ( (new SplitView(container, { orientation: 1 })));
127
+ this._splitView = ( new SplitView(container, { orientation: Orientation.HORIZONTAL }));
118
128
  const editorContainer = document.createElement('div');
119
129
  editorContainer.classList.add('editor');
120
130
  container.appendChild(editorContainer);
@@ -222,7 +232,7 @@ let CallHierarchyTreePeekWidget = class CallHierarchyTreePeekWidget extends Peek
222
232
  this._previewDisposable.clear();
223
233
  const options = {
224
234
  description: 'call-hierarchy-decoration',
225
- stickiness: 1 ,
235
+ stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,
226
236
  className: 'call-decoration',
227
237
  overviewRuler: {
228
238
  color: themeColorFromId(peekViewEditorMatchHighlight),
@@ -230,7 +240,7 @@ let CallHierarchyTreePeekWidget = class CallHierarchyTreePeekWidget extends Peek
230
240
  },
231
241
  };
232
242
  let previewUri;
233
- if (this._direction === "outgoingCalls" ) {
243
+ if (this._direction === CallHierarchyDirection.CallsFrom) {
234
244
  previewUri = element.parent ? element.parent.item.uri : element.model.root.uri;
235
245
  }
236
246
  else {
@@ -245,29 +255,29 @@ let CallHierarchyTreePeekWidget = class CallHierarchyTreePeekWidget extends Peek
245
255
  locations = [{ uri: element.item.uri, range: element.item.selectionRange }];
246
256
  }
247
257
  for (const loc of locations) {
248
- if (( (loc.uri.toString())) === ( (previewUri.toString()))) {
258
+ if (( loc.uri.toString()) === ( previewUri.toString())) {
249
259
  decorations.push({ range: loc.range, options });
250
260
  fullRange = !fullRange ? loc.range : Range.plusRange(loc.range, fullRange);
251
261
  }
252
262
  }
253
263
  if (fullRange) {
254
- this._editor.revealRangeInCenter(fullRange, 1 );
264
+ this._editor.revealRangeInCenter(fullRange, ScrollType.Immediate);
255
265
  const decorationsCollection = this._editor.createDecorationsCollection(decorations);
256
266
  this._previewDisposable.add(toDisposable(() => decorationsCollection.clear()));
257
267
  }
258
268
  this._previewDisposable.add(value);
259
- const title = this._direction === "outgoingCalls"
260
- ? ( localize(9708, "Calls from '{0}'", element.model.root.name))
261
- : ( localize(9709, "Callers of '{0}'", element.model.root.name));
269
+ const title = this._direction === CallHierarchyDirection.CallsFrom
270
+ ? ( localize(4123, "Calls from '{0}'", element.model.root.name))
271
+ : ( localize(4124, "Callers of '{0}'", element.model.root.name));
262
272
  this.setTitle(title);
263
273
  }
264
274
  showLoading() {
265
- this._parent.dataset['state'] = "loading" ;
266
- this.setTitle(( localize(9710, "Loading...")));
275
+ this._parent.dataset['state'] = State.Loading;
276
+ this.setTitle(( localize(4125, "Loading...")));
267
277
  this._show();
268
278
  }
269
279
  showMessage(message) {
270
- this._parent.dataset['state'] = "message" ;
280
+ this._parent.dataset['state'] = State.Message;
271
281
  this.setTitle('');
272
282
  this.setMetaTitle('');
273
283
  this._message.innerText = message;
@@ -281,12 +291,12 @@ let CallHierarchyTreePeekWidget = class CallHierarchyTreePeekWidget extends Peek
281
291
  const root = this._tree.getNode(model).children[0];
282
292
  await this._tree.expand(root.element);
283
293
  if (root.children.length === 0) {
284
- this.showMessage(this._direction === "outgoingCalls"
285
- ? ( localize(9711, "No calls from '{0}'", model.root.name))
286
- : ( localize(9712, "No callers of '{0}'", model.root.name)));
294
+ this.showMessage(this._direction === CallHierarchyDirection.CallsFrom
295
+ ? ( localize(4126, "No calls from '{0}'", model.root.name))
296
+ : ( localize(4127, "No callers of '{0}'", model.root.name)));
287
297
  }
288
298
  else {
289
- this._parent.dataset['state'] = "data" ;
299
+ this._parent.dataset['state'] = State.Data;
290
300
  if (!viewState || this._tree.getFocus().length === 0) {
291
301
  this._tree.setFocus([root.children[0].element]);
292
302
  }
@@ -310,7 +320,7 @@ let CallHierarchyTreePeekWidget = class CallHierarchyTreePeekWidget extends Peek
310
320
  }
311
321
  _show() {
312
322
  if (!this._isShowing) {
313
- this.editor.revealLineInCenterIfOutsideViewport(this._where.lineNumber, 0 );
323
+ this.editor.revealLineInCenterIfOutsideViewport(this._where.lineNumber, ScrollType.Smooth);
314
324
  super.show(Range.fromPositions(this._where), this._layoutInfo.height);
315
325
  }
316
326
  }
@@ -322,22 +332,22 @@ let CallHierarchyTreePeekWidget = class CallHierarchyTreePeekWidget extends Peek
322
332
  _doLayoutBody(height, width) {
323
333
  if (this._dim.height !== height || this._dim.width !== width) {
324
334
  super._doLayoutBody(height, width);
325
- this._dim = ( (new Dimension(width, height)));
335
+ this._dim = ( new Dimension(width, height));
326
336
  this._layoutInfo.height = this._viewZone ? this._viewZone.heightInLines : this._layoutInfo.height;
327
337
  this._splitView.layout(width);
328
338
  this._splitView.resizeView(0, width * this._layoutInfo.ratio);
329
339
  }
330
340
  }
331
341
  };
332
- CallHierarchyTreePeekWidget = CallHierarchyTreePeekWidget_1 = ( (__decorate([
333
- ( (__param(3, IThemeService))),
334
- ( (__param(4, IPeekViewService))),
335
- ( (__param(5, IEditorService))),
336
- ( (__param(6, ITextModelService))),
337
- ( (__param(7, IStorageService))),
338
- ( (__param(8, IMenuService))),
339
- ( (__param(9, IContextKeyService))),
340
- ( (__param(10, IInstantiationService)))
341
- ], CallHierarchyTreePeekWidget)));
342
+ CallHierarchyTreePeekWidget = CallHierarchyTreePeekWidget_1 = ( __decorate([
343
+ ( __param(3, IThemeService)),
344
+ ( __param(4, IPeekViewService)),
345
+ ( __param(5, IEditorService)),
346
+ ( __param(6, ITextModelService)),
347
+ ( __param(7, IStorageService)),
348
+ ( __param(8, IMenuService)),
349
+ ( __param(9, IContextKeyService)),
350
+ ( __param(10, IInstantiationService))
351
+ ], CallHierarchyTreePeekWidget));
342
352
 
343
353
  export { CallHierarchyTreePeekWidget };
@@ -0,0 +1,54 @@
1
+ import { IAsyncDataSource, ITreeRenderer, ITreeNode, ITreeSorter } from "vscode/vscode/vs/base/browser/ui/tree/tree";
2
+ import { CallHierarchyItem, CallHierarchyDirection, CallHierarchyModel } from "@codingame/monaco-vscode-7f39b6f1-3542-5430-8760-0f404d7a7cee-common/vscode/vs/workbench/contrib/callHierarchy/common/callHierarchy";
3
+ import { IIdentityProvider, IListVirtualDelegate } from "vscode/vscode/vs/base/browser/ui/list/list";
4
+ import { FuzzyScore } from "vscode/vscode/vs/base/common/filters";
5
+ import { IconLabel } from "vscode/vscode/vs/base/browser/ui/iconLabel/iconLabel";
6
+ import { Location } from "vscode/vscode/vs/editor/common/languages";
7
+ import { IListAccessibilityProvider } from "vscode/vscode/vs/base/browser/ui/list/listWidget";
8
+ export declare class Call {
9
+ readonly item: CallHierarchyItem;
10
+ readonly locations: Location[] | undefined;
11
+ readonly model: CallHierarchyModel;
12
+ readonly parent: Call | undefined;
13
+ constructor(item: CallHierarchyItem, locations: Location[] | undefined, model: CallHierarchyModel, parent: Call | undefined);
14
+ static compare(a: Call, b: Call): number;
15
+ }
16
+ export declare class DataSource implements IAsyncDataSource<CallHierarchyModel, Call> {
17
+ getDirection: () => CallHierarchyDirection;
18
+ constructor(getDirection: () => CallHierarchyDirection);
19
+ hasChildren(): boolean;
20
+ getChildren(element: CallHierarchyModel | Call): Promise<Call[]>;
21
+ }
22
+ export declare class Sorter implements ITreeSorter<Call> {
23
+ compare(element: Call, otherElement: Call): number;
24
+ }
25
+ export declare class IdentityProvider implements IIdentityProvider<Call> {
26
+ getDirection: () => CallHierarchyDirection;
27
+ constructor(getDirection: () => CallHierarchyDirection);
28
+ getId(element: Call): {
29
+ toString(): string;
30
+ };
31
+ }
32
+ declare class CallRenderingTemplate {
33
+ readonly icon: HTMLDivElement;
34
+ readonly label: IconLabel;
35
+ constructor(icon: HTMLDivElement, label: IconLabel);
36
+ }
37
+ export declare class CallRenderer implements ITreeRenderer<Call, FuzzyScore, CallRenderingTemplate> {
38
+ static readonly id = "CallRenderer";
39
+ templateId: string;
40
+ renderTemplate(container: HTMLElement): CallRenderingTemplate;
41
+ renderElement(node: ITreeNode<Call, FuzzyScore>, _index: number, template: CallRenderingTemplate): void;
42
+ disposeTemplate(template: CallRenderingTemplate): void;
43
+ }
44
+ export declare class VirtualDelegate implements IListVirtualDelegate<Call> {
45
+ getHeight(_element: Call): number;
46
+ getTemplateId(_element: Call): string;
47
+ }
48
+ export declare class AccessibilityProvider implements IListAccessibilityProvider<Call> {
49
+ getDirection: () => CallHierarchyDirection;
50
+ constructor(getDirection: () => CallHierarchyDirection);
51
+ getWidgetAriaLabel(): string;
52
+ getAriaLabel(element: Call): string | null;
53
+ }
54
+ export {};
@@ -1,8 +1,9 @@
1
- import { CallHierarchyModel } from 'vscode/vscode/vs/workbench/contrib/callHierarchy/common/callHierarchy';
1
+
2
+ import { CallHierarchyModel, CallHierarchyDirection } from '@codingame/monaco-vscode-7f39b6f1-3542-5430-8760-0f404d7a7cee-common/vscode/vs/workbench/contrib/callHierarchy/common/callHierarchy';
2
3
  import { CancellationToken } from 'vscode/vscode/vs/base/common/cancellation';
3
4
  import { createMatches } from 'vscode/vscode/vs/base/common/filters';
4
5
  import { IconLabel } from 'vscode/vscode/vs/base/browser/ui/iconLabel/iconLabel';
5
- import { SymbolKinds } from 'vscode/vscode/vs/editor/common/languages';
6
+ import { SymbolTag, SymbolKinds } from 'vscode/vscode/vs/editor/common/languages';
6
7
  import { compare } from 'vscode/vscode/vs/base/common/strings';
7
8
  import { Range } from 'vscode/vscode/vs/editor/common/core/range';
8
9
  import { localize } from 'vscode/vscode/vs/nls';
@@ -16,7 +17,7 @@ class Call {
16
17
  this.parent = parent;
17
18
  }
18
19
  static compare(a, b) {
19
- let res = compare(( (a.item.uri.toString())), ( (b.item.uri.toString())));
20
+ let res = compare(( a.item.uri.toString()), ( b.item.uri.toString()));
20
21
  if (res === 0) {
21
22
  res = Range.compareRangesUsingStarts(a.item.range, b.item.range);
22
23
  }
@@ -32,38 +33,18 @@ class DataSource {
32
33
  }
33
34
  async getChildren(element) {
34
35
  if (element instanceof CallHierarchyModel) {
35
- return (
36
- (element.roots.map(root => ( (new Call(root, undefined, element, undefined)))))
37
- );
36
+ return ( element.roots.map(root => ( new Call(root, undefined, element, undefined))));
38
37
  }
39
38
  const { model, item } = element;
40
- if (this.getDirection() === "outgoingCalls" ) {
41
- return (
42
- ((await model.resolveOutgoingCalls(item, CancellationToken.None)).map(call => {
43
- return (
44
- (new Call(
45
- call.to,
46
- (call.fromRanges.map(range => ({ range, uri: item.uri }))),
47
- model,
48
- element
49
- ))
50
- );
51
- }))
52
- );
39
+ if (this.getDirection() === CallHierarchyDirection.CallsFrom) {
40
+ return ( (await model.resolveOutgoingCalls(item, CancellationToken.None)).map(call => {
41
+ return ( new Call(call.to, ( call.fromRanges.map(range => ({ range, uri: item.uri }))), model, element));
42
+ }));
53
43
  }
54
44
  else {
55
- return (
56
- ((await model.resolveIncomingCalls(item, CancellationToken.None)).map(call => {
57
- return (
58
- (new Call(
59
- call.from,
60
- (call.fromRanges.map(range => ({ range, uri: call.from.uri }))),
61
- model,
62
- element
63
- ))
64
- );
65
- }))
66
- );
45
+ return ( (await model.resolveIncomingCalls(item, CancellationToken.None)).map(call => {
46
+ return ( new Call(call.from, ( call.fromRanges.map(range => ({ range, uri: call.from.uri }))), model, element));
47
+ }));
67
48
  }
68
49
  }
69
50
  }
@@ -99,14 +80,12 @@ class CallRenderer {
99
80
  container.classList.add('callhierarchy-element');
100
81
  const icon = document.createElement('div');
101
82
  container.appendChild(icon);
102
- const label = ( (new IconLabel(container, { supportHighlights: true })));
103
- return (
104
- (new CallRenderingTemplate(icon, label))
105
- );
83
+ const label = ( new IconLabel(container, { supportHighlights: true }));
84
+ return ( new CallRenderingTemplate(icon, label));
106
85
  }
107
86
  renderElement(node, _index, template) {
108
87
  const { element, filterData } = node;
109
- const deprecated = element.item.tags?.includes(1 );
88
+ const deprecated = element.item.tags?.includes(SymbolTag.Deprecated);
110
89
  template.icon.className = '';
111
90
  template.icon.classList.add('inline', ...ThemeIcon.asClassNameArray(SymbolKinds.toIcon(element.item.kind)));
112
91
  template.label.setLabel(element.item.name, element.item.detail, { labelEscapeNewLines: true, matches: createMatches(filterData), strikethrough: deprecated });
@@ -128,14 +107,14 @@ class AccessibilityProvider {
128
107
  this.getDirection = getDirection;
129
108
  }
130
109
  getWidgetAriaLabel() {
131
- return ( localize(11471, "Call Hierarchy"));
110
+ return localize(4128, "Call Hierarchy");
132
111
  }
133
112
  getAriaLabel(element) {
134
- if (this.getDirection() === "outgoingCalls" ) {
135
- return ( localize(11472, "calls from {0}", element.item.name));
113
+ if (this.getDirection() === CallHierarchyDirection.CallsFrom) {
114
+ return localize(4129, "calls from {0}", element.item.name);
136
115
  }
137
116
  else {
138
- return ( localize(11473, "callers of {0}", element.item.name));
117
+ return localize(4130, "callers of {0}", element.item.name);
139
118
  }
140
119
  }
141
120
  }
@@ -1,4 +1,4 @@
1
- import n from 'vscode/external/rollup-plugin-styles/dist/runtime/inject-css.js';
1
+ import n from 'vscode/external/rollup-plugin-styles/dist/runtime/inject-css';
2
2
 
3
3
  var css = ".monaco-workbench .call-hierarchy .message,.monaco-workbench .call-hierarchy .results{display:none}.monaco-workbench .call-hierarchy[data-state=data] .results{display:inherit;height:100%}.monaco-workbench .call-hierarchy[data-state=message] .message{align-items:center;display:flex;height:100%;justify-content:center}.monaco-workbench .call-hierarchy .editor,.monaco-workbench .call-hierarchy .tree{height:100%}.monaco-editor .call-hierarchy .tree{background-color:var(--vscode-peekViewResult-background);color:var(--vscode-peekViewResult-fileForeground)}.monaco-workbench .call-hierarchy .tree .callhierarchy-element{align-items:center;display:flex;flex:1;flex-flow:row nowrap}.monaco-workbench .call-hierarchy .tree .callhierarchy-element .monaco-icon-label{padding-left:4px}.monaco-editor .call-hierarchy .tree .monaco-list:focus .monaco-list-rows>.monaco-list-row.selected:not(.highlighted){background-color:var(--vscode-peekViewResult-selectionBackground);color:var(--vscode-peekViewResult-selectionForeground)!important}.monaco-editor .call-hierarchy .call-decoration{background-color:var(--vscode-peekViewEditor-matchHighlightBackground);border:2px solid var(--vscode-peekViewEditor-matchHighlightBorder);box-sizing:border-box}.monaco-editor .call-hierarchy .editor .monaco-editor .inputarea.ime-input,.monaco-editor .call-hierarchy .editor .monaco-editor .monaco-editor-background{background-color:var(--vscode-peekViewEditor-background)}.monaco-editor .call-hierarchy .editor .monaco-editor .margin{background-color:var(--vscode-peekViewEditorGutter-background)}";
4
4
  n(css,{});
@@ -1,12 +1,14 @@
1
+
1
2
  import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
3
+ import 'vscode/vscode/vs/platform/instantiation/common/extensions';
2
4
  import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
3
- import { EditorPaneDescriptor } from 'vscode/vscode/vs/workbench/browser/editor';
4
- import { registerWorkbenchContribution2 } from 'vscode/vscode/vs/workbench/common/contributions';
5
+ import { EditorPaneDescriptor } from '@codingame/monaco-vscode-9e888134-1a6f-58d9-b0e6-0fc047448366-common/vscode/vs/workbench/browser/editor';
6
+ import { registerWorkbenchContribution2, WorkbenchPhase } from 'vscode/vscode/vs/workbench/common/contributions';
5
7
  import { EditorExtensions } from 'vscode/vscode/vs/workbench/common/editor';
6
8
  import { CustomEditorInputSerializer, ComplexCustomWorkingCopyEditorHandler } from './customEditorInputFactory.js';
7
9
  import 'vscode/vscode/vs/platform/instantiation/common/instantiation';
8
- import { WebviewEditor } from 'vscode/vscode/vs/workbench/contrib/webviewPanel/browser/webviewEditor';
9
- import { CustomEditorInput } from 'vscode/vscode/vs/workbench/contrib/customEditor/browser/customEditorInput';
10
+ import { WebviewEditor } from '@codingame/monaco-vscode-7f39b6f1-3542-5430-8760-0f404d7a7cee-common/vscode/vs/workbench/contrib/webviewPanel/browser/webviewEditor';
11
+ import { CustomEditorInput } from '@codingame/monaco-vscode-7f39b6f1-3542-5430-8760-0f404d7a7cee-common/vscode/vs/workbench/contrib/customEditor/browser/customEditorInput';
10
12
  import './customEditors.js';
11
13
 
12
14
  ( Registry.as(EditorExtensions.EditorPane))
@@ -15,4 +17,4 @@ import './customEditors.js';
15
17
  ]);
16
18
  ( Registry.as(EditorExtensions.EditorFactory))
17
19
  .registerEditorSerializer(CustomEditorInputSerializer.ID, CustomEditorInputSerializer);
18
- registerWorkbenchContribution2(ComplexCustomWorkingCopyEditorHandler.ID, ComplexCustomWorkingCopyEditorHandler, 1 );
20
+ registerWorkbenchContribution2(ComplexCustomWorkingCopyEditorHandler.ID, ComplexCustomWorkingCopyEditorHandler, WorkbenchPhase.BlockStartup);
@@ -0,0 +1,58 @@
1
+ import { Disposable } from "vscode/vscode/vs/base/common/lifecycle";
2
+ import { URI, UriComponents } from "vscode/vscode/vs/base/common/uri";
3
+ import { IInstantiationService } from "vscode/vscode/vs/platform/instantiation/common/instantiation";
4
+ import { IWorkbenchContribution } from "vscode/vscode/vs/workbench/common/contributions";
5
+ import { EditorInput } from "vscode/vscode/vs/workbench/common/editor/editorInput";
6
+ import { CustomEditorInput } from "@codingame/monaco-vscode-7f39b6f1-3542-5430-8760-0f404d7a7cee-common/vscode/vs/workbench/contrib/customEditor/browser/customEditorInput";
7
+ import { ICustomEditorService } from "vscode/vscode/vs/workbench/contrib/customEditor/common/customEditor.service";
8
+ import { IWebviewService } from "vscode/vscode/vs/workbench/contrib/webview/browser/webview.service";
9
+ import { DeserializedWebview, SerializedWebview, SerializedWebviewOptions, WebviewEditorInputSerializer } from "../../webviewPanel/browser/webviewEditorInputSerializer.js";
10
+ import { IWebviewWorkbenchService } from "vscode/vscode/vs/workbench/contrib/webviewPanel/browser/webviewWorkbenchService.service";
11
+ import { IWorkingCopyBackupMeta, IWorkingCopyIdentifier } from "@codingame/monaco-vscode-a4683c2b-a0d2-5112-96ba-eedc605346d2-common/vscode/vs/workbench/services/workingCopy/common/workingCopy";
12
+ import { IWorkingCopyBackupService } from "vscode/vscode/vs/workbench/services/workingCopy/common/workingCopyBackup.service";
13
+ import { IWorkingCopyEditorHandler } from "@codingame/monaco-vscode-working-copy-service-override/vscode/vs/workbench/services/workingCopy/common/workingCopyEditorService";
14
+ import { IWorkingCopyEditorService } from "vscode/vscode/vs/workbench/services/workingCopy/common/workingCopyEditorService.service";
15
+ export interface CustomDocumentBackupData extends IWorkingCopyBackupMeta {
16
+ readonly viewType: string;
17
+ readonly editorResource: UriComponents;
18
+ backupId: string;
19
+ readonly extension: undefined | {
20
+ readonly location: UriComponents;
21
+ readonly id: string;
22
+ };
23
+ readonly webview: {
24
+ readonly origin: string | undefined;
25
+ readonly options: SerializedWebviewOptions;
26
+ readonly state: any;
27
+ };
28
+ }
29
+ interface SerializedCustomEditor extends SerializedWebview {
30
+ readonly editorResource: UriComponents;
31
+ readonly dirty: boolean;
32
+ readonly backupId?: string;
33
+ }
34
+ interface DeserializedCustomEditor extends DeserializedWebview {
35
+ readonly editorResource: URI;
36
+ readonly dirty: boolean;
37
+ readonly backupId?: string;
38
+ }
39
+ export declare class CustomEditorInputSerializer extends WebviewEditorInputSerializer {
40
+ private readonly _instantiationService;
41
+ private readonly _webviewService;
42
+ static readonly ID = "workbench.editors.webviewEditor";
43
+ constructor(webviewWorkbenchService: IWebviewWorkbenchService, _instantiationService: IInstantiationService, _webviewService: IWebviewService);
44
+ serialize(input: CustomEditorInput): string | undefined;
45
+ protected fromJson(data: SerializedCustomEditor): DeserializedCustomEditor;
46
+ deserialize(_instantiationService: IInstantiationService, serializedEditorInput: string): CustomEditorInput;
47
+ }
48
+ export declare class ComplexCustomWorkingCopyEditorHandler extends Disposable implements IWorkbenchContribution, IWorkingCopyEditorHandler {
49
+ private readonly _instantiationService;
50
+ private readonly _workingCopyBackupService;
51
+ private readonly _webviewService;
52
+ static readonly ID = "workbench.contrib.complexCustomWorkingCopyEditorHandler";
53
+ constructor(_instantiationService: IInstantiationService, _workingCopyEditorService: IWorkingCopyEditorService, _workingCopyBackupService: IWorkingCopyBackupService, _webviewService: IWebviewService, _customEditorService: ICustomEditorService);
54
+ handles(workingCopy: IWorkingCopyIdentifier): boolean;
55
+ isOpen(workingCopy: IWorkingCopyIdentifier, editor: EditorInput): boolean;
56
+ createEditor(workingCopy: IWorkingCopyIdentifier): Promise<EditorInput>;
57
+ }
58
+ export {};
@@ -1,12 +1,14 @@
1
- import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
1
+
2
+ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
2
3
  import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
3
4
  import { Schemas } from 'vscode/vscode/vs/base/common/network';
4
5
  import { isEqual } from 'vscode/vscode/vs/base/common/resources';
5
6
  import { URI } from 'vscode/vscode/vs/base/common/uri';
6
7
  import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
7
- import { CustomEditorInput } from 'vscode/vscode/vs/workbench/contrib/customEditor/browser/customEditorInput';
8
+ import { CustomEditorInput } from '@codingame/monaco-vscode-7f39b6f1-3542-5430-8760-0f404d7a7cee-common/vscode/vs/workbench/contrib/customEditor/browser/customEditorInput';
8
9
  import { ICustomEditorService } from 'vscode/vscode/vs/workbench/contrib/customEditor/common/customEditor.service';
9
- import { NotebookEditorInput } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookEditorInput';
10
+ import { NotebookEditorInput } from '@codingame/monaco-vscode-271a23cd-c7d7-5761-ae35-a923a42987b8-common/vscode/vs/workbench/contrib/notebook/common/notebookEditorInput';
11
+ import { WebviewContentPurpose } from '@codingame/monaco-vscode-22790577-4553-50b6-978d-0acc75c394cc-common/vscode/vs/workbench/contrib/webview/browser/webview';
10
12
  import { IWebviewService } from 'vscode/vscode/vs/workbench/contrib/webview/browser/webview.service';
11
13
  import { WebviewEditorInputSerializer, reviveWebviewExtensionDescription, restoreWebviewOptions, restoreWebviewContentOptions } from '../../webviewPanel/browser/webviewEditorInputSerializer.js';
12
14
  import { IWebviewWorkbenchService } from 'vscode/vscode/vs/workbench/contrib/webviewPanel/browser/webviewWorkbenchService.service';
@@ -63,7 +65,7 @@ function reviveWebview(webviewService, data) {
63
65
  origin: data.origin,
64
66
  title: undefined,
65
67
  options: {
66
- purpose: "customEditor" ,
68
+ purpose: WebviewContentPurpose.CustomEditor,
67
69
  enableFindWidget: data.webviewOptions.enableFindWidget,
68
70
  retainContextWhenHidden: data.webviewOptions.retainContextWhenHidden,
69
71
  },
@@ -0,0 +1,45 @@
1
+ import { Event } from "vscode/vscode/vs/base/common/event";
2
+ import { Disposable, IDisposable } from "vscode/vscode/vs/base/common/lifecycle";
3
+ import { URI } from "vscode/vscode/vs/base/common/uri";
4
+ import { IFileService } from "vscode/vscode/vs/platform/files/common/files.service";
5
+ import { IInstantiationService } from "vscode/vscode/vs/platform/instantiation/common/instantiation";
6
+ import { IStorageService } from "vscode/vscode/vs/platform/storage/common/storage.service";
7
+ import { IUriIdentityService } from "vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service";
8
+ import { CustomEditorCapabilities, CustomEditorInfo, CustomEditorInfoCollection } from "../common/customEditor.js";
9
+ import { ICustomEditorService } from "vscode/vscode/vs/workbench/contrib/customEditor/common/customEditor.service";
10
+ import { CustomEditorModelManager } from "../common/customEditorModelManager.js";
11
+ import { IEditorGroupsService } from "vscode/vscode/vs/workbench/services/editor/common/editorGroupsService.service";
12
+ import { IEditorType } from "vscode/vscode/vs/workbench/services/editor/common/editorResolverService";
13
+ import { IEditorResolverService } from "vscode/vscode/vs/workbench/services/editor/common/editorResolverService.service";
14
+ import { IEditorService } from "vscode/vscode/vs/workbench/services/editor/common/editorService.service";
15
+ export declare class CustomEditorService extends Disposable implements ICustomEditorService {
16
+ private readonly editorService;
17
+ private readonly editorGroupService;
18
+ private readonly instantiationService;
19
+ private readonly uriIdentityService;
20
+ private readonly editorResolverService;
21
+ _serviceBrand: any;
22
+ private readonly _contributedEditors;
23
+ private _untitledCounter;
24
+ private readonly _editorResolverDisposables;
25
+ private readonly _editorCapabilities;
26
+ private readonly _models;
27
+ private readonly _onDidChangeEditorTypes;
28
+ readonly onDidChangeEditorTypes: Event<void>;
29
+ private readonly _fileEditorFactory;
30
+ constructor(fileService: IFileService, storageService: IStorageService, editorService: IEditorService, editorGroupService: IEditorGroupsService, instantiationService: IInstantiationService, uriIdentityService: IUriIdentityService, editorResolverService: IEditorResolverService);
31
+ getEditorTypes(): IEditorType[];
32
+ private withActiveCustomEditor;
33
+ private registerContributionPoints;
34
+ private createDiffEditorInput;
35
+ get models(): CustomEditorModelManager;
36
+ getCustomEditor(viewType: string): CustomEditorInfo | undefined;
37
+ getContributedCustomEditors(resource: URI): CustomEditorInfoCollection;
38
+ getUserConfiguredCustomEditors(resource: URI): CustomEditorInfoCollection;
39
+ getAllCustomEditors(resource: URI): CustomEditorInfoCollection;
40
+ registerCustomEditorCapabilities(viewType: string, options: CustomEditorCapabilities): IDisposable;
41
+ getCustomEditorCapabilities(viewType: string): CustomEditorCapabilities | undefined;
42
+ private getActiveCustomEditorId;
43
+ private getCustomEditorIsEditable;
44
+ private handleMovedFileInOpenedFileEditors;
45
+ }
@@ -1,4 +1,5 @@
1
- import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
1
+
2
+ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
2
3
  import './media/customEditor.css.js';
3
4
  import { coalesce } from 'vscode/vscode/vs/base/common/arrays';
4
5
  import { Emitter } from 'vscode/vscode/vs/base/common/event';
@@ -8,13 +9,14 @@ import { extname, isEqual } from 'vscode/vscode/vs/base/common/resources';
8
9
  import { assertIsDefined } from 'vscode/vscode/vs/base/common/types';
9
10
  import { URI } from 'vscode/vscode/vs/base/common/uri';
10
11
  import { UndoCommand, RedoCommand } from 'vscode/vscode/vs/editor/browser/editorExtensions';
12
+ import { FileOperation } from 'vscode/vscode/vs/platform/files/common/files';
11
13
  import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
12
14
  import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
13
15
  import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
14
16
  import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
15
17
  import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
16
18
  import { EditorExtensions, DEFAULT_EDITOR_ASSOCIATION } from 'vscode/vscode/vs/workbench/common/editor';
17
- import { DiffEditorInput } from 'vscode/vscode/vs/workbench/common/editor/diffEditorInput';
19
+ import { DiffEditorInput } from '@codingame/monaco-vscode-5108c2c9-4ada-52d8-8c4b-fe03b3160e71-common/vscode/vs/workbench/common/editor/diffEditorInput';
18
20
  import { CONTEXT_ACTIVE_CUSTOM_EDITOR_ID, CONTEXT_FOCUSED_CUSTOM_EDITOR_IS_EDITABLE, CustomEditorInfoCollection } from '../common/customEditor.js';
19
21
  import { CustomEditorModelManager } from '../common/customEditorModelManager.js';
20
22
  import { IEditorGroupsService } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
@@ -22,7 +24,7 @@ import { RegisteredEditorPriority } from 'vscode/vscode/vs/workbench/services/ed
22
24
  import { IEditorResolverService } from 'vscode/vscode/vs/workbench/services/editor/common/editorResolverService.service';
23
25
  import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
24
26
  import { ContributedCustomEditors } from '../common/contributedCustomEditors.js';
25
- import { CustomEditorInput } from 'vscode/vscode/vs/workbench/contrib/customEditor/browser/customEditorInput';
27
+ import { CustomEditorInput } from '@codingame/monaco-vscode-7f39b6f1-3542-5430-8760-0f404d7a7cee-common/vscode/vs/workbench/contrib/customEditor/browser/customEditorInput';
26
28
 
27
29
  let CustomEditorService = class CustomEditorService extends Disposable {
28
30
  constructor(fileService, storageService, editorService, editorGroupService, instantiationService, uriIdentityService, editorResolverService) {
@@ -58,7 +60,7 @@ let CustomEditorService = class CustomEditorService extends Disposable {
58
60
  this._register(this.editorGroupService.registerContextKeyProvider(activeCustomEditorContextKeyProvider));
59
61
  this._register(this.editorGroupService.registerContextKeyProvider(customEditorIsEditableContextKeyProvider));
60
62
  this._register(fileService.onDidRunOperation(e => {
61
- if (e.isOperation(2 )) {
63
+ if (e.isOperation(FileOperation.MOVE)) {
62
64
  this.handleMovedFileInOpenedFileEditors(e.resource, this.uriIdentityService.asCanonicalUri(e.target.resource));
63
65
  }
64
66
  }));
@@ -1,4 +1,4 @@
1
- import n from 'vscode/external/rollup-plugin-styles/dist/runtime/inject-css.js';
1
+ import n from 'vscode/external/rollup-plugin-styles/dist/runtime/inject-css';
2
2
 
3
3
  var css = ".webview.modified{box-shadow:-6px 0 5px -5px var(--vscode-scrollbar-shadow)}";
4
4
  n(css,{});
@@ -0,0 +1,18 @@
1
+ import { Disposable } from "vscode/vscode/vs/base/common/lifecycle";
2
+ import { URI } from "vscode/vscode/vs/base/common/uri";
3
+ import { IStorageService } from "vscode/vscode/vs/platform/storage/common/storage.service";
4
+ import { CustomEditorInfo } from "./customEditor.js";
5
+ export declare class ContributedCustomEditors extends Disposable {
6
+ private static readonly CUSTOM_EDITORS_STORAGE_ID;
7
+ private static readonly CUSTOM_EDITORS_ENTRY_ID;
8
+ private readonly _editors;
9
+ private readonly _memento;
10
+ constructor(storageService: IStorageService);
11
+ private readonly _onChange;
12
+ readonly onChange: import("vscode/vscode/vs/base/common/event").Event<void>;
13
+ private update;
14
+ [Symbol.iterator](): Iterator<CustomEditorInfo>;
15
+ get(viewType: string): CustomEditorInfo | undefined;
16
+ getContributedEditors(resource: URI): readonly CustomEditorInfo[];
17
+ private add;
18
+ }