@opensumi/ide-editor 3.2.5-next-1724743242.0 → 3.2.5

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 (97) hide show
  1. package/lib/browser/doc-model/editor-document-model-service.d.ts +1 -2
  2. package/lib/browser/doc-model/editor-document-model-service.d.ts.map +1 -1
  3. package/lib/browser/doc-model/editor-document-model-service.js +0 -22
  4. package/lib/browser/doc-model/editor-document-model-service.js.map +1 -1
  5. package/lib/browser/doc-model/editor-document-model.d.ts +0 -1
  6. package/lib/browser/doc-model/editor-document-model.d.ts.map +1 -1
  7. package/lib/browser/doc-model/editor-document-model.js +0 -14
  8. package/lib/browser/doc-model/editor-document-model.js.map +1 -1
  9. package/lib/browser/doc-model/saveParticipants.d.ts.map +1 -1
  10. package/lib/browser/doc-model/saveParticipants.js +0 -1
  11. package/lib/browser/doc-model/saveParticipants.js.map +1 -1
  12. package/lib/browser/doc-model/types.d.ts +1 -3
  13. package/lib/browser/doc-model/types.d.ts.map +1 -1
  14. package/lib/browser/doc-model/types.js.map +1 -1
  15. package/lib/browser/editor.contribution.d.ts.map +1 -1
  16. package/lib/browser/editor.contribution.js +4 -7
  17. package/lib/browser/editor.contribution.js.map +1 -1
  18. package/lib/browser/editor.module.less +17 -9
  19. package/lib/browser/editor.view.d.ts.map +1 -1
  20. package/lib/browser/editor.view.js +12 -2
  21. package/lib/browser/editor.view.js.map +1 -1
  22. package/lib/browser/format/formatter-selector.d.ts.map +1 -1
  23. package/lib/browser/format/formatter-selector.js +8 -6
  24. package/lib/browser/format/formatter-selector.js.map +1 -1
  25. package/lib/browser/fs-resource/fs-resource.d.ts.map +1 -1
  26. package/lib/browser/fs-resource/fs-resource.js +7 -5
  27. package/lib/browser/fs-resource/fs-resource.js.map +1 -1
  28. package/lib/browser/grid/grid.service.d.ts +0 -1
  29. package/lib/browser/grid/grid.service.d.ts.map +1 -1
  30. package/lib/browser/grid/grid.service.js +4 -6
  31. package/lib/browser/grid/grid.service.js.map +1 -1
  32. package/lib/browser/hooks/useEditor.d.ts +2 -2
  33. package/lib/browser/hooks/useEditor.d.ts.map +1 -1
  34. package/lib/browser/hooks/useEditor.js +11 -10
  35. package/lib/browser/hooks/useEditor.js.map +1 -1
  36. package/lib/browser/merge-conflict/merge-conflict.model.d.ts.map +1 -1
  37. package/lib/browser/merge-conflict/merge-conflict.model.js +4 -3
  38. package/lib/browser/merge-conflict/merge-conflict.model.js.map +1 -1
  39. package/lib/browser/monaco-contrib/callHierarchy/callHierarchy.service.d.ts.map +1 -1
  40. package/lib/browser/monaco-contrib/callHierarchy/callHierarchy.service.js +3 -3
  41. package/lib/browser/monaco-contrib/callHierarchy/callHierarchy.service.js.map +1 -1
  42. package/lib/browser/monaco-contrib/typeHierarchy/typeHierarchy.service.d.ts.map +1 -1
  43. package/lib/browser/monaco-contrib/typeHierarchy/typeHierarchy.service.js +3 -3
  44. package/lib/browser/monaco-contrib/typeHierarchy/typeHierarchy.service.js.map +1 -1
  45. package/lib/browser/navigation.module.less +2 -3
  46. package/lib/browser/navigation.view.js +1 -1
  47. package/lib/browser/navigation.view.js.map +1 -1
  48. package/lib/browser/tab.view.d.ts.map +1 -1
  49. package/lib/browser/tab.view.js +6 -21
  50. package/lib/browser/tab.view.js.map +1 -1
  51. package/lib/browser/untitled-resource.d.ts.map +1 -1
  52. package/lib/browser/untitled-resource.js +7 -5
  53. package/lib/browser/untitled-resource.js.map +1 -1
  54. package/lib/browser/workbench-editor.service.d.ts.map +1 -1
  55. package/lib/browser/workbench-editor.service.js +22 -15
  56. package/lib/browser/workbench-editor.service.js.map +1 -1
  57. package/lib/common/editor.d.ts +0 -47
  58. package/lib/common/editor.d.ts.map +1 -1
  59. package/lib/common/editor.js.map +1 -1
  60. package/lib/common/index.d.ts +0 -1
  61. package/lib/common/index.d.ts.map +1 -1
  62. package/lib/common/index.js +0 -1
  63. package/lib/common/index.js.map +1 -1
  64. package/package.json +14 -14
  65. package/src/browser/doc-model/editor-document-model-service.ts +1 -25
  66. package/src/browser/doc-model/editor-document-model.ts +0 -18
  67. package/src/browser/doc-model/saveParticipants.ts +0 -1
  68. package/src/browser/doc-model/types.ts +1 -3
  69. package/src/browser/editor.contribution.ts +3 -8
  70. package/src/browser/editor.module.less +17 -9
  71. package/src/browser/editor.view.tsx +21 -4
  72. package/src/browser/format/formatter-selector.ts +8 -6
  73. package/src/browser/fs-resource/fs-resource.ts +7 -5
  74. package/src/browser/grid/grid.service.ts +7 -13
  75. package/src/browser/hooks/useEditor.ts +12 -13
  76. package/src/browser/merge-conflict/merge-conflict.model.ts +5 -4
  77. package/src/browser/monaco-contrib/callHierarchy/callHierarchy.service.ts +2 -4
  78. package/src/browser/monaco-contrib/typeHierarchy/typeHierarchy.service.ts +2 -5
  79. package/src/browser/navigation.module.less +2 -3
  80. package/src/browser/navigation.view.tsx +1 -1
  81. package/src/browser/tab.view.tsx +8 -40
  82. package/src/browser/untitled-resource.ts +7 -5
  83. package/src/browser/workbench-editor.service.ts +25 -20
  84. package/src/common/editor.ts +1 -59
  85. package/src/common/index.ts +0 -1
  86. package/lib/browser/editor-scrollbar/index.d.ts +0 -69
  87. package/lib/browser/editor-scrollbar/index.d.ts.map +0 -1
  88. package/lib/browser/editor-scrollbar/index.js +0 -289
  89. package/lib/browser/editor-scrollbar/index.js.map +0 -1
  90. package/lib/browser/editor-scrollbar/index.module.less +0 -106
  91. package/lib/common/components.d.ts +0 -3
  92. package/lib/common/components.d.ts.map +0 -1
  93. package/lib/common/components.js +0 -6
  94. package/lib/common/components.js.map +0 -1
  95. package/src/browser/editor-scrollbar/index.module.less +0 -106
  96. package/src/browser/editor-scrollbar/index.tsx +0 -399
  97. package/src/common/components.ts +0 -2
@@ -1 +1 @@
1
- {"version":3,"file":"editor.js","sourceRoot":"","sources":["../../src/common/editor.ts"],"names":[],"mappings":";;;;AAAA,qCAA0C;AAG1C,+DAamC;AAanC,mDAA6D;AAApD,mHAAA,qBAAqB,OAAA;AA8J9B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D,CAAC,EALgB,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAK9B;AASD,uBAAuB;AACvB,SAAgB,sBAAsB;IACpC,OAAO;QACL,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,QAAQ;QACpB,UAAU,EAAE,CAAC;QACb,QAAQ,EAAE,IAAI;QACd,kBAAkB,EAAE,CAAC;QACrB,WAAW,EAAE,KAAK;QAClB,WAAW,EAAE,KAAK;QAClB,OAAO,EAAE,KAAK;QACd,mBAAmB,EAAE,KAAK;QAC1B,yBAAyB,EAAE,IAAI;QAC/B,kBAAkB,EAAE,KAAK;QACzB,SAAS,EAAE;YACT,UAAU,EAAE,QAAQ;SACrB;QACD,oBAAoB,EAAE,CAAC;QACvB,mBAAmB,EAAE,KAAK;QAC1B,oBAAoB,EAAE,KAAK;QAC3B,mBAAmB,EAAE,MAAM;QAC3B,oBAAoB,EAAE,IAAI;QAC1B,uBAAuB,EAAE,OAAO;QAChC,OAAO,EAAE;YACP,OAAO,EAAE,KAAK;SACf;QACD,MAAM,EAAE;YACN,0BAA0B,EAAE,KAAK;YACjC,WAAW,EAAE,KAAK;YAClB,YAAY,EAAE,KAAK;SACpB;KACF,CAAC;AACJ,CAAC;AA/BD,wDA+BC"}
@@ -4,5 +4,4 @@ export * from './resource';
4
4
  export * from './language';
5
5
  export * from './utils';
6
6
  export * from './language-status';
7
- export * from './components';
8
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC"}
@@ -7,5 +7,4 @@ tslib_1.__exportStar(require("./resource"), exports);
7
7
  tslib_1.__exportStar(require("./language"), exports);
8
8
  tslib_1.__exportStar(require("./utils"), exports);
9
9
  tslib_1.__exportStar(require("./language-status"), exports);
10
- tslib_1.__exportStar(require("./components"), exports);
11
10
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":";;;AAAA,sDAA4B;AAC5B,mDAAyB;AACzB,qDAA2B;AAC3B,qDAA2B;AAC3B,kDAAwB;AACxB,4DAAkC;AAClC,uDAA6B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":";;;AAAA,sDAA4B;AAC5B,mDAAyB;AACzB,qDAA2B;AAC3B,qDAA2B;AAC3B,kDAAwB;AACxB,4DAAkC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opensumi/ide-editor",
3
- "version": "3.2.5-next-1724743242.0",
3
+ "version": "3.2.5",
4
4
  "files": [
5
5
  "lib",
6
6
  "src"
@@ -17,21 +17,21 @@
17
17
  "url": "git@github.com:opensumi/core.git"
18
18
  },
19
19
  "dependencies": {
20
- "@opensumi/ide-core-common": "3.2.5-next-1724743242.0",
21
- "@opensumi/ide-core-node": "3.2.5-next-1724743242.0",
22
- "@opensumi/ide-file-service": "3.2.5-next-1724743242.0",
23
- "@opensumi/ide-monaco": "3.2.5-next-1724743242.0",
24
- "@opensumi/ide-utils": "3.2.5-next-1724743242.0",
20
+ "@opensumi/ide-core-common": "3.2.5",
21
+ "@opensumi/ide-core-node": "3.2.5",
22
+ "@opensumi/ide-file-service": "3.2.5",
23
+ "@opensumi/ide-monaco": "3.2.5",
24
+ "@opensumi/ide-utils": "3.2.5",
25
25
  "vscode-oniguruma": "1.5.1"
26
26
  },
27
27
  "devDependencies": {
28
- "@opensumi/ide-components": "3.2.5-next-1724743242.0",
29
- "@opensumi/ide-core-browser": "3.2.5-next-1724743242.0",
30
- "@opensumi/ide-dev-tool": "3.2.5-next-1724743242.0",
31
- "@opensumi/ide-overlay": "3.2.5-next-1724743242.0",
32
- "@opensumi/ide-quick-open": "3.2.5-next-1724743242.0",
33
- "@opensumi/ide-theme": "3.2.5-next-1724743242.0",
34
- "@opensumi/ide-workspace": "3.2.5-next-1724743242.0"
28
+ "@opensumi/ide-components": "3.2.5",
29
+ "@opensumi/ide-core-browser": "3.2.5",
30
+ "@opensumi/ide-dev-tool": "3.2.5",
31
+ "@opensumi/ide-overlay": "3.2.5",
32
+ "@opensumi/ide-quick-open": "3.2.5",
33
+ "@opensumi/ide-theme": "3.2.5",
34
+ "@opensumi/ide-workspace": "3.2.5"
35
35
  },
36
- "gitHead": "81022dbcbf07564d2b732b00355f04d6ebb007bf"
36
+ "gitHead": "879ad36cb2e8e5bc9d928cf7d8bb003de7f0b7b3"
37
37
  }
@@ -23,7 +23,7 @@ import { IHashCalculateService } from '@opensumi/ide-core-common/lib/hash-calcul
23
23
  import { IFileServiceClient } from '@opensumi/ide-file-service';
24
24
  import { EOL } from '@opensumi/ide-monaco/lib/browser/monaco-api/types';
25
25
 
26
- import { IEditorDocumentDescription, IEditorDocumentModel } from '../../common/editor';
26
+ import { IEditorDocumentModel } from '../../common/editor';
27
27
 
28
28
  import { EditorDocumentModel } from './editor-document-model';
29
29
  import {
@@ -230,30 +230,6 @@ export class EditorDocumentModelServiceImpl extends WithEventBus implements IEdi
230
230
  return this._modelReferenceManager.getReferenceIfHasInstance(uri.toString(), reason);
231
231
  }
232
232
 
233
- getModelDescription(uri: URI, reason?: string): IEditorDocumentDescription | null {
234
- const ref = this.getModelReference(uri, reason);
235
- if (!ref) {
236
- return null;
237
- }
238
-
239
- const instance = ref.instance;
240
- const resullt = {
241
- alwaysDirty: instance.alwaysDirty,
242
- closeAutoSave: instance.closeAutoSave,
243
- disposeEvenDirty: instance.disposeEvenDirty,
244
- eol: instance.eol,
245
- encoding: instance.encoding,
246
- dirty: instance.dirty,
247
- languageId: instance.languageId,
248
- readonly: instance.readonly,
249
- uri: instance.uri,
250
- id: instance.id,
251
- savable: instance.savable,
252
- };
253
- ref.dispose();
254
- return resullt;
255
- }
256
-
257
233
  getAllModels(): IEditorDocumentModel[] {
258
234
  return Array.from(this.editorDocModels.values());
259
235
  }
@@ -360,25 +360,7 @@ export class EditorDocumentModel extends Disposable implements IEditorDocumentMo
360
360
  return this.monacoModel;
361
361
  }
362
362
 
363
- async syncDocumentModelToExtThread() {
364
- await this.eventBus.fireAndAwait(
365
- new EditorDocumentModelOptionChangedEvent({
366
- uri: this.uri,
367
- languageId: this.languageId,
368
- encoding: this.encoding,
369
- eol: this.eol,
370
- dirty: this.dirty,
371
- }),
372
- );
373
- }
374
-
375
363
  async save(force = false, reason: SaveReason = SaveReason.Manual): Promise<boolean> {
376
- if (!this.dirty) {
377
- // 如果文档内容没有变化,则只同步新状态到插件进程
378
- await this.syncDocumentModelToExtThread();
379
- return false;
380
- }
381
-
382
364
  const provider = await this.contentRegistry.getProvider(this.uri);
383
365
  const isReadonly = await provider?.isReadonly(this.uri);
384
366
 
@@ -283,7 +283,6 @@ export class TrimFinalNewLinesParticipant extends WithEventBus {
283
283
 
284
284
  const model = modelRef.instance.getMonacoModel();
285
285
  this.doTrimFinalNewLines(model, e.payload.reason !== SaveReason.Manual);
286
- modelRef.dispose();
287
286
  }
288
287
  }
289
288
 
@@ -12,7 +12,7 @@ import * as monaco from '@opensumi/ide-monaco';
12
12
  import { EOL, EndOfLineSequence } from '@opensumi/ide-monaco/lib/browser/monaco-api/types';
13
13
 
14
14
  import { IEditorDocumentModelContentChange, SaveReason } from '../../common';
15
- import { IEditorDocumentDescription, IEditorDocumentModel, IEditorDocumentModelRef } from '../../common/editor';
15
+ import { IEditorDocumentModel, IEditorDocumentModelRef } from '../../common/editor';
16
16
 
17
17
  export interface IDocModelUpdateOptions extends monaco.editor.ITextModelUpdateOptions {
18
18
  detectIndentation?: boolean;
@@ -130,7 +130,6 @@ export interface IEditorDocumentModelService {
130
130
  * 当文档从来没有被打开过时,返回null
131
131
  */
132
132
  getModelReference(uri: URI, reason?: string): IEditorDocumentModelRef | null;
133
- getModelDescription(uri: URI, reason?: string): IEditorDocumentDescription | null;
134
133
 
135
134
  /**
136
135
  * 获得全部model
@@ -194,7 +193,6 @@ export interface IEditorDocumentModelOptionChangedEventPayload {
194
193
  encoding?: string;
195
194
  languageId?: string;
196
195
  eol?: EOL;
197
- dirty?: boolean;
198
196
  }
199
197
 
200
198
  export class EditorDocumentModelCreationEvent extends BasicEvent<IEditorDocumentModelCreationEventPayload> {}
@@ -808,12 +808,7 @@ export class EditorContribution
808
808
  return;
809
809
  }
810
810
 
811
- const ref = this.editorDocumentModelService.getModelDescription(uri);
812
- if (!ref) {
813
- return;
814
- }
815
-
816
- return ref.encoding;
811
+ return this.editorDocumentModelService.getModelReference(uri)?.instance.encoding;
817
812
  },
818
813
  });
819
814
 
@@ -837,8 +832,8 @@ export class EditorContribution
837
832
 
838
833
  const provider = await this.contentRegistry.getProvider(uri);
839
834
  const guessedEncoding = await provider?.guessEncoding?.(uri);
840
- const ref = this.editorDocumentModelService.getModelDescription(uri);
841
- const currentEncoding = documentModel?.encoding ?? ref?.encoding;
835
+ const ref = this.editorDocumentModelService.getModelReference(uri);
836
+ const currentEncoding = documentModel?.encoding ?? ref?.instance.encoding;
842
837
 
843
838
  let matchIndex: number | undefined;
844
839
  const encodingItems: QuickPickItem<string>[] = Object.keys(SUPPORTED_ENCODINGS)
@@ -48,7 +48,6 @@
48
48
  position: absolute;
49
49
  width: 100%;
50
50
  height: 100%;
51
- pointer-events: none;
52
51
  }
53
52
  .kt_editor_tabs {
54
53
  display: flex;
@@ -74,7 +73,7 @@
74
73
  left: 0;
75
74
  position: absolute;
76
75
  display: block;
77
- z-index: var(--stacking-level-background, 0);
76
+ z-index: 0;
78
77
  }
79
78
  &::after {
80
79
  content: '';
@@ -85,7 +84,7 @@
85
84
  left: 0;
86
85
  position: absolute;
87
86
  display: block;
88
- z-index: var(--stacking-level-background, 0);
87
+ z-index: 0;
89
88
  }
90
89
  .editor_action_wrapper {
91
90
  margin-left: 8px;
@@ -133,6 +132,12 @@
133
132
  }
134
133
  }
135
134
 
135
+ .kt_editor_tabs_scroll_wrapper {
136
+ flex-grow: 1;
137
+ width: 100%;
138
+ position: relative;
139
+ }
140
+
136
141
  .kt_editor_tabs_scroll {
137
142
  overflow-y: hidden;
138
143
  :global(.loading_indicator) {
@@ -170,7 +175,7 @@
170
175
  left: 0;
171
176
  position: absolute;
172
177
  display: block;
173
- z-index: var(--stacking-level-background, 0);
178
+ z-index: 0;
174
179
  }
175
180
  }
176
181
  }
@@ -179,7 +184,7 @@
179
184
  }
180
185
  .kt_editor_tabs_content {
181
186
  overflow-y: hidden;
182
- display: flex;
187
+ display: inline-flex;
183
188
  position: relative;
184
189
  height: 100%;
185
190
  &.kt_on_drag_over {
@@ -192,6 +197,8 @@
192
197
  display: flex;
193
198
  position: relative;
194
199
  align-items: center;
200
+ flex-shrink: 1;
201
+ flex-grow: 1;
195
202
  padding: 0 12px;
196
203
  border-right: 1px solid var(--tab-border);
197
204
  height: 100%;
@@ -202,6 +209,7 @@
202
209
  color: var(--tab-inactiveForeground);
203
210
  background: var(--tab-inactiveBackground);
204
211
  border-top: 1px solid transparent;
212
+ box-sizing: border-box;
205
213
  z-index: 1;
206
214
  word-break: keep-all;
207
215
  white-space: nowrap;
@@ -296,7 +304,7 @@
296
304
  position: relative;
297
305
  background: var(--tab-activeBackground);
298
306
  color: var(--tab-activeForeground);
299
- z-index: var(--stacking-level-editor-tabbar-current, 11);
307
+ z-index: 11;
300
308
  &::before {
301
309
  position: absolute;
302
310
  content: '';
@@ -304,7 +312,7 @@
304
312
  width: 100%;
305
313
  top: -1px;
306
314
  left: 0;
307
- z-index: var(--stacking-level-overlay, 800);
315
+ z-index: 999;
308
316
  background-color: var(--tab-activeBorderTop);
309
317
  }
310
318
  .dirty {
@@ -340,7 +348,7 @@
340
348
  }
341
349
 
342
350
  .editorGroupHeader {
343
- z-index: var(--stacking-level-workbench, 1);
351
+ z-index: 0;
344
352
  position: relative;
345
353
  }
346
354
 
@@ -481,7 +489,7 @@
481
489
  .overlay-shadow();
482
490
  border-radius: 2px;
483
491
  padding: 5px 10px;
484
- z-index: var(--stacking-level-overlay-top, 1000);
492
+ z-index: 10001;
485
493
  white-space: nowrap;
486
494
  .editor_action_tip_close {
487
495
  cursor: pointer;
@@ -17,10 +17,8 @@ import {
17
17
  PreferenceService,
18
18
  URI,
19
19
  View,
20
- renderView,
21
20
  useDesignStyles,
22
21
  useDisposable,
23
- usePreference,
24
22
  } from '@opensumi/ide-core-browser';
25
23
  import {
26
24
  IResizeHandleDelegate,
@@ -243,6 +241,7 @@ const EditorEmptyComponent: React.FC<{
243
241
  export const EditorGroupView = observer(({ group }: { group: EditorGroup }) => {
244
242
  const groupWrapperRef = React.useRef<HTMLElement | null>();
245
243
 
244
+ const preferenceService = useInjectable(PreferenceService) as PreferenceService;
246
245
  const [isEmpty, setIsEmpty] = React.useState(group.resources.length === 0);
247
246
  const styles_kt_editor_group = useDesignStyles(styles.kt_editor_group, 'kt_editor_group');
248
247
 
@@ -264,7 +263,20 @@ export const EditorGroupView = observer(({ group }: { group: EditorGroup }) => {
264
263
  };
265
264
  }, []);
266
265
 
267
- const showActionWhenGroupEmpty = usePreference('editor.showActionWhenGroupEmpty', false);
266
+ const [showActionWhenGroupEmpty, setShowActionWhenGroupEmpty] = React.useState(
267
+ () => !!preferenceService.get<boolean>('editor.showActionWhenGroupEmpty'),
268
+ );
269
+
270
+ useDisposable(
271
+ () => [
272
+ preferenceService.onPreferenceChanged((change) => {
273
+ if (change.preferenceName === 'editor.showActionWhenGroupEmpty') {
274
+ setShowActionWhenGroupEmpty(!!change.newValue);
275
+ }
276
+ }),
277
+ ],
278
+ [],
279
+ );
268
280
 
269
281
  const componentRegistry = useInjectable<ComponentRegistry>(ComponentRegistry);
270
282
 
@@ -302,7 +314,12 @@ export const EditorGroupView = observer(({ group }: { group: EditorGroup }) => {
302
314
  backgroundImage: !EmptyEditorViewConfig && editorBackgroundImage ? `url(${editorBackgroundImage})` : 'none',
303
315
  }}
304
316
  >
305
- {renderView(EmptyEditorViewConfig)}
317
+ {EmptyEditorViewConfig && ReactIs.isValidElementType(EmptyEditorViewConfig.component) ? (
318
+ <ErrorBoundary>
319
+ {EmptyEditorViewConfig.component &&
320
+ React.createElement(EmptyEditorViewConfig.component, EmptyEditorViewConfig.initialProps)}
321
+ </ErrorBoundary>
322
+ ) : null}
306
323
  </div>
307
324
  )}
308
325
  </div>
@@ -47,11 +47,12 @@ export class FormattingSelector implements IFormattingSelector {
47
47
  mode: FormattingMode,
48
48
  _kind: FormattingKind,
49
49
  ): Promise<T | undefined> {
50
- const docDesc = this.modelService.getModelDescription(URI.from(document.uri.toJSON()));
51
- if (!docDesc) {
50
+ const docRef = this.modelService.getModelReference(URI.from(document.uri.toJSON()));
51
+ if (!docRef) {
52
52
  return;
53
53
  }
54
- const languageId = docDesc.languageId;
54
+ const languageId = docRef.instance.languageId;
55
+ docRef.dispose();
55
56
  const preferred = this.getPreferedFormatter(languageId);
56
57
 
57
58
  const elements: { [key: string]: T } = {};
@@ -119,11 +120,12 @@ export class FormattingSelector implements IFormattingSelector {
119
120
  formatters: T[],
120
121
  document: ITextModel,
121
122
  ): Promise<T | undefined> {
122
- const docDesc = this.modelService.getModelDescription(URI.from(document.uri.toJSON()));
123
- if (!docDesc) {
123
+ const docRef = this.modelService.getModelReference(URI.from(document.uri.toJSON()));
124
+ if (!docRef) {
124
125
  return;
125
126
  }
126
- const languageId = docDesc.languageId;
127
+ const languageId = docRef.instance.languageId;
128
+ docRef.dispose();
127
129
 
128
130
  const elements: { [key: string]: T } = {};
129
131
  formatters.forEach((provider: T) => {
@@ -181,8 +181,8 @@ export class FileSystemResourceProvider extends WithEventBus implements IResourc
181
181
  this.cachedFileStat.delete(resource.uri.toString());
182
182
  }
183
183
  async shouldCloseResourceWithoutConfirm(resource: IResource) {
184
- const documentModelRef = this.documentModelService.getModelDescription(resource.uri, 'close-resource-check');
185
- if (documentModelRef && documentModelRef.dirty) {
184
+ const documentModelRef = this.documentModelService.getModelReference(resource.uri, 'close-resource-check');
185
+ if (documentModelRef && documentModelRef.instance.dirty) {
186
186
  return true;
187
187
  }
188
188
  return false;
@@ -204,7 +204,6 @@ export class FileSystemResourceProvider extends WithEventBus implements IResourc
204
204
  documentModelRef.dispose();
205
205
  return false;
206
206
  } else {
207
- documentModelRef.dispose();
208
207
  return true;
209
208
  }
210
209
  }
@@ -223,8 +222,11 @@ export class FileSystemResourceProvider extends WithEventBus implements IResourc
223
222
  }
224
223
  }
225
224
  }
226
- const documentModelRef = this.documentModelService.getModelDescription(resource.uri, 'close-resource-check');
227
- if (!documentModelRef || !documentModelRef.dirty) {
225
+ const documentModelRef = this.documentModelService.getModelReference(resource.uri, 'close-resource-check');
226
+ if (!documentModelRef || !documentModelRef.instance.dirty) {
227
+ if (documentModelRef) {
228
+ documentModelRef.dispose();
229
+ }
228
230
  return true;
229
231
  }
230
232
 
@@ -1,5 +1,5 @@
1
1
  import { Emitter, IDisposable, IEventBus, MaybeNull } from '@opensumi/ide-core-browser';
2
- import { DisposableStore, makeRandomHexString } from '@opensumi/ide-core-common';
2
+ import { makeRandomHexString } from '@opensumi/ide-core-common';
3
3
 
4
4
  import { Direction, IEditorGroup, IEditorGroupState } from '../../common';
5
5
  import { GridResizeEvent } from '../types';
@@ -7,19 +7,17 @@ import { GridResizeEvent } from '../types';
7
7
  export const editorGridUid = new Set();
8
8
 
9
9
  export class EditorGrid implements IDisposable {
10
- private _disposables = new DisposableStore();
11
-
12
10
  public editorGroup: IGridEditorGroup | null = null;
13
11
 
14
12
  public children: EditorGrid[] = [];
15
13
 
16
14
  public splitDirection: SplitDirection | undefined;
17
15
 
18
- protected readonly _onDidGridStateChange = this._disposables.add(new Emitter<void>());
16
+ protected readonly _onDidGridStateChange = new Emitter<void>();
19
17
 
20
18
  public readonly onDidGridStateChange = this._onDidGridStateChange.event;
21
19
 
22
- protected readonly _onDidGridAndDesendantStateChange = this._disposables.add(new Emitter<void>());
20
+ protected readonly _onDidGridAndDesendantStateChange = new Emitter<void>();
23
21
 
24
22
  public readonly onDidGridAndDesendantStateChange = this._onDidGridAndDesendantStateChange.event;
25
23
 
@@ -32,12 +30,10 @@ export class EditorGrid implements IDisposable {
32
30
  }
33
31
  this.uid = uid;
34
32
  editorGridUid.add(uid);
35
- this._disposables.add(
36
- this.onDidGridStateChange(() => {
37
- this._onDidGridAndDesendantStateChange.fire();
38
- this.parent?._onDidGridAndDesendantStateChange.fire();
39
- }),
40
- );
33
+ this.onDidGridStateChange(() => {
34
+ this._onDidGridAndDesendantStateChange.fire();
35
+ this.parent?._onDidGridAndDesendantStateChange.fire();
36
+ });
41
37
  }
42
38
 
43
39
  setEditorGroup(editorGroup: IGridEditorGroup) {
@@ -110,8 +106,6 @@ export class EditorGrid implements IDisposable {
110
106
  } else {
111
107
  // 应该不会落入这里
112
108
  }
113
-
114
- this._disposables.dispose();
115
109
  }
116
110
 
117
111
  public replaceBy(target: EditorGrid) {
@@ -1,35 +1,34 @@
1
1
  import { useEffect, useState } from 'react';
2
2
 
3
- import { DisposableStore, URI, useInjectable } from '@opensumi/ide-core-browser';
3
+ import { URI, useInjectable } from '@opensumi/ide-core-browser';
4
4
 
5
5
  import { IEditorDocumentModelService } from '../doc-model/types';
6
- import { IEditorDocumentModel } from '../types';
6
+ import { IEditorDocumentModelRef } from '../types';
7
7
 
8
- export function useEditorDocumentModel(uri: URI) {
8
+ export function useEditorDocumentModelRef(uri: URI) {
9
9
  const documentService: IEditorDocumentModelService = useInjectable(IEditorDocumentModelService);
10
- const [instance, setInstance] = useState<IEditorDocumentModel | null>(null);
10
+ const [ref, setRef] = useState<IEditorDocumentModelRef | null>(null);
11
11
 
12
12
  useEffect(() => {
13
- const toDispose = new DisposableStore();
14
13
  const run = () => {
15
14
  const ref = documentService.getModelReference(uri);
16
15
  if (ref) {
17
- setInstance(ref.instance);
18
- ref.dispose();
16
+ setRef(ref);
19
17
  }
20
18
  };
21
19
 
22
- toDispose.add(
23
- documentService.onDocumentModelCreated(uri.toString(), () => {
24
- run();
25
- }),
26
- );
20
+ const toDispose = documentService.onDocumentModelCreated(uri.toString(), () => {
21
+ run();
22
+ });
27
23
 
28
24
  run();
29
25
  return () => {
30
26
  toDispose.dispose();
27
+ if (ref) {
28
+ ref.dispose();
29
+ }
31
30
  };
32
31
  }, [uri]);
33
32
 
34
- return instance;
33
+ return ref;
35
34
  }
@@ -4,12 +4,12 @@ import { useEffect, useMemo, useState } from 'react';
4
4
  import { formatLocalize, useInjectable } from '@opensumi/ide-core-browser';
5
5
  import { DisposableStore, URI } from '@opensumi/ide-utils';
6
6
 
7
- import { useEditorDocumentModel } from '../hooks/useEditor';
7
+ import { useEditorDocumentModelRef } from '../hooks/useEditor';
8
8
 
9
9
  import { MergeConflictService } from './merge-conflict.service';
10
10
 
11
11
  export function useMergeConflictModel(uri: URI) {
12
- const editorModel = useEditorDocumentModel(uri);
12
+ const editorModel = useEditorDocumentModelRef(uri);
13
13
 
14
14
  /**
15
15
  * 如果是原来就有冲突的文件,当冲突没了之后,仍然显示冲突
@@ -28,8 +28,9 @@ export function useMergeConflictModel(uri: URI) {
28
28
  const disposables = new DisposableStore();
29
29
 
30
30
  if (editorModel) {
31
+ const { instance } = editorModel;
31
32
  const run = () => {
32
- const n = mergeConflictService.scanDocument(editorModel.getMonacoModel());
33
+ const n = mergeConflictService.scanDocument(instance.getMonacoModel());
33
34
  setConflictsCount(n);
34
35
  if (n > 0) {
35
36
  setIsInitialVisiable(true);
@@ -39,7 +40,7 @@ export function useMergeConflictModel(uri: URI) {
39
40
  const debounceRun = debounce(run, 150);
40
41
 
41
42
  disposables.add(
42
- editorModel.getMonacoModel().onDidChangeContent(() => {
43
+ instance.getMonacoModel().onDidChangeContent(() => {
43
44
  debounceRun();
44
45
  }),
45
46
  );
@@ -112,10 +112,8 @@ export class CallHierarchyService implements ICallHierarchyService {
112
112
  }
113
113
 
114
114
  async prepareCallHierarchyProvider(resource: Uri, position: Position) {
115
- let textModelReference = this.modelService.getModelReference(URI.parse(resource.toString()));
116
- let textModel: ITextModel | undefined = textModelReference?.instance.getMonacoModel();
117
- textModelReference?.dispose();
118
-
115
+ let textModel = this.modelService.getModelReference(URI.parse(resource.toString()))?.instance.getMonacoModel();
116
+ let textModelReference: IDisposable | undefined;
119
117
  if (!textModel) {
120
118
  const result = await this.modelService.createModelReference(URI.parse(resource.toString()));
121
119
  textModel = result.instance.getMonacoModel();
@@ -104,11 +104,8 @@ export class TypeHierarchyService implements ITypeHierarchyService {
104
104
  }
105
105
 
106
106
  async prepareTypeHierarchyProvider(resource: Uri, position: Position) {
107
- let textModelReference = this.modelService.getModelReference(URI.parse(resource.toString()));
108
-
109
- let textModel: ITextModel | undefined = textModelReference?.instance.getMonacoModel();
110
- textModelReference?.dispose();
111
-
107
+ let textModel = this.modelService.getModelReference(URI.parse(resource.toString()))?.instance.getMonacoModel();
108
+ let textModelReference: IDisposable | undefined;
112
109
  if (!textModel) {
113
110
  const result = await this.modelService.createModelReference(URI.parse(resource.toString()));
114
111
  textModel = result.instance.getMonacoModel();
@@ -15,13 +15,12 @@
15
15
  }
16
16
 
17
17
  .navigation_icon {
18
- font-size: 12px !important;
18
+ font-size: 12px;
19
19
  color: var(--breadcrumb-foreground);
20
20
  }
21
-
22
21
  .navigation-part {
23
22
  color: var(--breadcrumb-foreground);
24
- font-size: 12px !important;
23
+ font-size: 12px;
25
24
  padding: 0 4px;
26
25
  position: relative;
27
26
  line-height: 22px;
@@ -56,7 +56,7 @@ export const NavigationBar = ({ editorGroup }: { editorGroup: EditorGroup }) =>
56
56
  }
57
57
  return parts.length === 0 ? null : (
58
58
  <div
59
- className={cls('kt-navigation-container', styles_navigation_container)}
59
+ className={styles_navigation_container}
60
60
  onContextMenu={(event) => {
61
61
  event.preventDefault();
62
62
  }}