@opensumi/ide-editor 2.27.3-rc-1708399099.0 → 2.27.3-rc-1710489030.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.
- package/lib/browser/breadcrumb/default.d.ts.map +1 -1
- package/lib/browser/breadcrumb/document-symbol.d.ts +2 -2
- package/lib/browser/breadcrumb/document-symbol.d.ts.map +1 -1
- package/lib/browser/breadcrumb/index.d.ts +2 -2
- package/lib/browser/breadcrumb/index.d.ts.map +1 -1
- package/lib/browser/component.d.ts +2 -2
- package/lib/browser/component.d.ts.map +1 -1
- package/lib/browser/decoration-applier.d.ts +2 -2
- package/lib/browser/decoration-applier.d.ts.map +1 -1
- package/lib/browser/decoration-applier.js.map +1 -1
- package/lib/browser/diff/compare.d.ts +3 -3
- package/lib/browser/diff/compare.d.ts.map +1 -1
- package/lib/browser/diff/compare.js +2 -3
- package/lib/browser/diff/compare.js.map +1 -1
- package/lib/browser/diff/index.d.ts +1 -1
- package/lib/browser/diff/index.d.ts.map +1 -1
- package/lib/browser/diff/index.js.map +1 -1
- package/lib/browser/doc-cache/local-storage-cache.d.ts +1 -1
- package/lib/browser/doc-cache/local-storage-cache.d.ts.map +1 -1
- package/lib/browser/doc-model/editor-document-model-service.d.ts +3 -2
- package/lib/browser/doc-model/editor-document-model-service.d.ts.map +1 -1
- package/lib/browser/doc-model/editor-document-model-service.js.map +1 -1
- package/lib/browser/doc-model/editor-document-model.d.ts +3 -2
- package/lib/browser/doc-model/editor-document-model.d.ts.map +1 -1
- package/lib/browser/doc-model/editor-document-model.js.map +1 -1
- package/lib/browser/doc-model/editor-document-registry.d.ts +2 -2
- package/lib/browser/doc-model/editor-document-registry.d.ts.map +1 -1
- package/lib/browser/doc-model/editor-is-fn.d.ts +1 -1
- package/lib/browser/doc-model/editor-is-fn.d.ts.map +1 -1
- package/lib/browser/doc-model/override.d.ts +1 -1
- package/lib/browser/doc-model/override.d.ts.map +1 -1
- package/lib/browser/doc-model/save-task.d.ts +1 -1
- package/lib/browser/doc-model/save-task.d.ts.map +1 -1
- package/lib/browser/doc-model/saveParticipants.d.ts.map +1 -1
- package/lib/browser/doc-model/saveParticipants.js +1 -1
- package/lib/browser/doc-model/saveParticipants.js.map +1 -1
- package/lib/browser/doc-model/types.d.ts +3 -75
- package/lib/browser/doc-model/types.d.ts.map +1 -1
- package/lib/browser/doc-model/types.js.map +1 -1
- package/lib/browser/editor-collection.service.d.ts +6 -5
- package/lib/browser/editor-collection.service.d.ts.map +1 -1
- package/lib/browser/editor-collection.service.js +5 -6
- package/lib/browser/editor-collection.service.js.map +1 -1
- package/lib/browser/editor-electron.contribution.d.ts +1 -1
- package/lib/browser/editor-electron.contribution.d.ts.map +1 -1
- package/lib/browser/editor-opener.d.ts +1 -1
- package/lib/browser/editor-opener.d.ts.map +1 -1
- package/lib/browser/editor.contribution.d.ts +3 -5
- package/lib/browser/editor.contribution.d.ts.map +1 -1
- package/lib/browser/editor.contribution.js +4 -10
- package/lib/browser/editor.contribution.js.map +1 -1
- package/lib/browser/editor.decoration.service.d.ts +2 -2
- package/lib/browser/editor.decoration.service.d.ts.map +1 -1
- package/lib/browser/editor.module.less +12 -0
- package/lib/browser/editor.override.d.ts +3 -3
- package/lib/browser/editor.override.d.ts.map +1 -1
- package/lib/browser/editor.override.js +7 -10
- package/lib/browser/editor.override.js.map +1 -1
- package/lib/browser/editor.status-bar.service.d.ts +1 -1
- package/lib/browser/editor.status-bar.service.d.ts.map +1 -1
- package/lib/browser/editor.status-bar.service.js.map +1 -1
- package/lib/browser/editor.tab.service.d.ts +8 -0
- package/lib/browser/editor.tab.service.d.ts.map +1 -0
- package/lib/browser/editor.tab.service.js +19 -0
- package/lib/browser/editor.tab.service.js.map +1 -0
- package/lib/browser/editor.view.d.ts.map +1 -1
- package/lib/browser/editor.view.js +9 -6
- package/lib/browser/editor.view.js.map +1 -1
- package/lib/browser/feature.d.ts +2 -2
- package/lib/browser/feature.d.ts.map +1 -1
- package/lib/browser/format/format.service.d.ts.map +1 -1
- package/lib/browser/fs-resource/fs-editor-doc.d.ts +1 -1
- package/lib/browser/fs-resource/fs-editor-doc.d.ts.map +1 -1
- package/lib/browser/fs-resource/fs-resource.d.ts +3 -3
- package/lib/browser/fs-resource/fs-resource.d.ts.map +1 -1
- package/lib/browser/fs-resource/fs-resource.js +1 -2
- package/lib/browser/fs-resource/fs-resource.js.map +1 -1
- package/lib/browser/grid/grid.service.d.ts +2 -2
- package/lib/browser/grid/grid.service.d.ts.map +1 -1
- package/lib/browser/history/index.d.ts +1 -1
- package/lib/browser/history/index.d.ts.map +1 -1
- package/lib/browser/index.d.ts +4 -4
- package/lib/browser/index.d.ts.map +1 -1
- package/lib/browser/index.js +8 -3
- package/lib/browser/index.js.map +1 -1
- package/lib/browser/language/diagnostic-collection.d.ts +1 -1
- package/lib/browser/language/diagnostic-collection.d.ts.map +1 -1
- package/lib/browser/language/language-status.contribution.d.ts.map +1 -1
- package/lib/browser/language/language-status.service.d.ts +1 -1
- package/lib/browser/language/language-status.service.d.ts.map +1 -1
- package/lib/browser/language/language.service.d.ts +2 -2
- package/lib/browser/language/language.service.d.ts.map +1 -1
- package/lib/browser/menu/breadcrumbs.menus.d.ts.map +1 -1
- package/lib/browser/menu/breadcrumbs.menus.js.map +1 -1
- package/lib/browser/menu/editor.context.d.ts.map +1 -1
- package/lib/browser/menu/editor.menu.d.ts +1 -1
- package/lib/browser/menu/editor.menu.d.ts.map +1 -1
- package/lib/browser/menu/open-type-menu.contribution.d.ts.map +1 -1
- package/lib/browser/merge-editor/MergeEditorFloatComponents.d.ts.map +1 -1
- package/lib/browser/merge-editor/MergeEditorFloatComponents.js +2 -3
- package/lib/browser/merge-editor/MergeEditorFloatComponents.js.map +1 -1
- package/lib/browser/merge-editor/merge-editor.provider.d.ts +2 -2
- package/lib/browser/merge-editor/merge-editor.provider.d.ts.map +1 -1
- package/lib/browser/monaco-contrib/callHierarchy/callHierarchy.contribution.d.ts.map +1 -1
- package/lib/browser/monaco-contrib/callHierarchy/callHierarchy.service.d.ts +0 -1
- package/lib/browser/monaco-contrib/callHierarchy/callHierarchy.service.d.ts.map +1 -1
- package/lib/browser/monaco-contrib/command/command.service.d.ts +2 -2
- package/lib/browser/monaco-contrib/command/command.service.d.ts.map +1 -1
- package/lib/browser/monaco-contrib/command/command.service.js +1 -1
- package/lib/browser/monaco-contrib/command/command.service.js.map +1 -1
- package/lib/browser/monaco-contrib/tokenizer/textmate-registry.d.ts.map +1 -1
- package/lib/browser/monaco-contrib/tokenizer/textmate-tokenizer.d.ts +1 -1
- package/lib/browser/monaco-contrib/tokenizer/textmate-tokenizer.d.ts.map +1 -1
- package/lib/browser/monaco-contrib/tokenizer/textmate.service.d.ts +2 -3
- package/lib/browser/monaco-contrib/tokenizer/textmate.service.d.ts.map +1 -1
- package/lib/browser/monaco-contrib/tokenizer/textmate.service.js.map +1 -1
- package/lib/browser/monaco-contrib/typeHierarchy/typeHierarchy.contribution.d.ts.map +1 -1
- package/lib/browser/monaco-contrib/typeHierarchy/typeHierarchy.service.d.ts +1 -1
- package/lib/browser/monaco-contrib/typeHierarchy/typeHierarchy.service.d.ts.map +1 -1
- package/lib/browser/navigation.view.d.ts.map +1 -1
- package/lib/browser/navigation.view.js +12 -9
- package/lib/browser/navigation.view.js.map +1 -1
- package/lib/browser/preference/contribution.d.ts.map +1 -1
- package/lib/browser/preference/converter.d.ts.map +1 -1
- package/lib/browser/preference/converter.js +19 -0
- package/lib/browser/preference/converter.js.map +1 -1
- package/lib/browser/preference/schema.d.ts +2 -1
- package/lib/browser/preference/schema.d.ts.map +1 -1
- package/lib/browser/preference/schema.js +12 -0
- package/lib/browser/preference/schema.js.map +1 -1
- package/lib/browser/preference/util.d.ts.map +1 -1
- package/lib/browser/quick-open/go-to-line.d.ts +1 -1
- package/lib/browser/quick-open/go-to-line.d.ts.map +1 -1
- package/lib/browser/quick-open/workspace-symbol-quickopen.d.ts +3 -4
- package/lib/browser/quick-open/workspace-symbol-quickopen.d.ts.map +1 -1
- package/lib/browser/quick-open/workspace-symbol-quickopen.js.map +1 -1
- package/lib/browser/resource.service.d.ts +2 -2
- package/lib/browser/resource.service.d.ts.map +1 -1
- package/lib/browser/tab.view.d.ts.map +1 -1
- package/lib/browser/tab.view.js +91 -68
- package/lib/browser/tab.view.js.map +1 -1
- package/lib/browser/types.d.ts +8 -3
- package/lib/browser/types.d.ts.map +1 -1
- package/lib/browser/types.js +2 -1
- package/lib/browser/types.js.map +1 -1
- package/lib/browser/untitled-resource.d.ts +2 -2
- package/lib/browser/untitled-resource.d.ts.map +1 -1
- package/lib/browser/view/editor.react.d.ts.map +1 -1
- package/lib/browser/view/editor.react.js.map +1 -1
- package/lib/browser/view/suggest-widget.d.ts +1 -2
- package/lib/browser/view/suggest-widget.d.ts.map +1 -1
- package/lib/browser/view/suggest-widget.js +5 -6
- package/lib/browser/view/suggest-widget.js.map +1 -1
- package/lib/browser/workbench-editor.service.d.ts +12 -11
- package/lib/browser/workbench-editor.service.d.ts.map +1 -1
- package/lib/browser/workbench-editor.service.js +51 -52
- package/lib/browser/workbench-editor.service.js.map +1 -1
- package/lib/common/doc-cache.d.ts +1 -1
- package/lib/common/doc-cache.d.ts.map +1 -1
- package/lib/common/doc-cache.js.map +1 -1
- package/lib/common/editor.d.ts +78 -5
- package/lib/common/editor.d.ts.map +1 -1
- package/lib/common/editor.js.map +1 -1
- package/lib/common/language-status.d.ts +2 -2
- package/lib/common/language-status.d.ts.map +1 -1
- package/lib/common/language-status.js.map +1 -1
- package/lib/common/language.d.ts +1 -3
- package/lib/common/language.d.ts.map +1 -1
- package/lib/common/language.js.map +1 -1
- package/lib/common/mocks/workbench-editor.service.d.ts +3 -3
- package/lib/common/mocks/workbench-editor.service.d.ts.map +1 -1
- package/lib/common/mocks/workbench-editor.service.js +1 -0
- package/lib/common/mocks/workbench-editor.service.js.map +1 -1
- package/lib/common/resource.d.ts +1 -1
- package/lib/common/resource.d.ts.map +1 -1
- package/package.json +13 -13
- package/src/browser/breadcrumb/default.ts +3 -3
- package/src/browser/breadcrumb/document-symbol.ts +7 -7
- package/src/browser/breadcrumb/index.ts +3 -3
- package/src/browser/component.ts +5 -5
- package/src/browser/decoration-applier.ts +8 -7
- package/src/browser/diff/compare.ts +10 -10
- package/src/browser/diff/index.ts +12 -12
- package/src/browser/doc-cache/local-storage-cache.ts +2 -2
- package/src/browser/doc-model/editor-document-model-service.ts +14 -13
- package/src/browser/doc-model/editor-document-model.ts +12 -12
- package/src/browser/doc-model/editor-document-registry.ts +4 -4
- package/src/browser/doc-model/editor-is-fn.ts +1 -1
- package/src/browser/doc-model/override.ts +1 -1
- package/src/browser/doc-model/save-task.ts +5 -5
- package/src/browser/doc-model/saveParticipants.ts +10 -12
- package/src/browser/doc-model/types.ts +6 -102
- package/src/browser/editor-collection.service.ts +26 -29
- package/src/browser/editor-electron.contribution.ts +5 -5
- package/src/browser/editor-opener.ts +2 -2
- package/src/browser/editor.contribution.ts +34 -39
- package/src/browser/editor.decoration.service.ts +7 -7
- package/src/browser/editor.module.less +12 -0
- package/src/browser/editor.override.ts +12 -14
- package/src/browser/editor.status-bar.service.ts +4 -5
- package/src/browser/editor.tab.service.ts +16 -0
- package/src/browser/editor.view.tsx +14 -10
- package/src/browser/feature.ts +3 -3
- package/src/browser/format/format.service.ts +2 -2
- package/src/browser/format/formatterSelect.ts +2 -2
- package/src/browser/fs-resource/fs-editor-doc.ts +8 -8
- package/src/browser/fs-resource/fs-resource.ts +6 -7
- package/src/browser/grid/grid.service.ts +2 -2
- package/src/browser/history/index.ts +6 -6
- package/src/browser/index.ts +19 -13
- package/src/browser/language/diagnostic-collection.ts +2 -2
- package/src/browser/language/language-status.contribution.ts +2 -2
- package/src/browser/language/language-status.service.ts +2 -2
- package/src/browser/language/language.service.ts +6 -6
- package/src/browser/menu/breadcrumbs.menus.ts +2 -6
- package/src/browser/menu/editor.context.ts +1 -1
- package/src/browser/menu/editor.menu.ts +3 -3
- package/src/browser/menu/open-type-menu.contribution.ts +3 -3
- package/src/browser/menu/title-context.menu.ts +1 -1
- package/src/browser/merge-editor/MergeEditorFloatComponents.tsx +8 -2
- package/src/browser/merge-editor/merge-editor.provider.ts +3 -3
- package/src/browser/monaco-contrib/callHierarchy/callHierarchy.contribution.ts +2 -2
- package/src/browser/monaco-contrib/callHierarchy/callHierarchy.service.ts +3 -3
- package/src/browser/monaco-contrib/command/command.service.ts +10 -10
- package/src/browser/monaco-contrib/tokenizer/textmate-registry.ts +2 -2
- package/src/browser/monaco-contrib/tokenizer/textmate-tokenizer.ts +1 -1
- package/src/browser/monaco-contrib/tokenizer/textmate.service.ts +19 -17
- package/src/browser/monaco-contrib/typeHierarchy/typeHierarchy.contribution.ts +3 -3
- package/src/browser/monaco-contrib/typeHierarchy/typeHierarchy.service.ts +5 -5
- package/src/browser/navigation.view.tsx +25 -16
- package/src/browser/preference/contribution.ts +1 -1
- package/src/browser/preference/converter.ts +20 -1
- package/src/browser/preference/schema.ts +22 -4
- package/src/browser/preference/util.ts +1 -1
- package/src/browser/quick-open/go-to-line.ts +3 -3
- package/src/browser/quick-open/workspace-symbol-quickopen.ts +13 -13
- package/src/browser/resource.service.ts +9 -9
- package/src/browser/tab.view.tsx +168 -119
- package/src/browser/types.ts +21 -12
- package/src/browser/untitled-resource.ts +12 -12
- package/src/browser/view/editor.react.tsx +2 -1
- package/src/browser/view/suggest-widget.ts +1 -2
- package/src/browser/workbench-editor.service.ts +59 -60
- package/src/common/doc-cache.ts +2 -1
- package/src/common/editor.ts +109 -10
- package/src/common/language-status.ts +5 -3
- package/src/common/language.ts +2 -2
- package/src/common/mocks/workbench-editor.service.ts +5 -3
- package/src/common/resource.ts +1 -1
|
@@ -1,51 +1,48 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Autowired, INJECTOR_TOKEN, Injectable, Injector } from '@opensumi/di';
|
|
2
|
+
import { IContextKeyService, IRange } from '@opensumi/ide-core-browser';
|
|
3
3
|
import { ResourceContextKey } from '@opensumi/ide-core-browser/lib/contextkey';
|
|
4
4
|
import { MonacoService } from '@opensumi/ide-core-browser/lib/monaco';
|
|
5
5
|
import {
|
|
6
|
+
Disposable,
|
|
7
|
+
Emitter,
|
|
8
|
+
Emitter as EventEmitter,
|
|
6
9
|
ILineChange,
|
|
10
|
+
ISelection,
|
|
11
|
+
OnEvent,
|
|
7
12
|
URI,
|
|
8
13
|
WithEventBus,
|
|
9
|
-
OnEvent,
|
|
10
|
-
Emitter as EventEmitter,
|
|
11
|
-
ISelection,
|
|
12
|
-
Disposable,
|
|
13
|
-
objects,
|
|
14
14
|
isEmptyObject,
|
|
15
|
+
objects,
|
|
15
16
|
} from '@opensumi/ide-core-common';
|
|
16
|
-
import { Emitter } from '@opensumi/ide-core-common';
|
|
17
|
-
import type {
|
|
18
|
-
ICodeEditor as IMonacoCodeEditor,
|
|
19
|
-
IDiffEditor as IMonacoDiffEditor,
|
|
20
|
-
} from '@opensumi/ide-monaco/lib/browser/monaco-api/types';
|
|
21
|
-
import type { IDiffEditorConstructionOptions } from '@opensumi/monaco-editor-core/esm/vs/editor/browser/editorBrowser';
|
|
22
17
|
import * as monaco from '@opensumi/monaco-editor-core/esm/vs/editor/editor.api';
|
|
23
18
|
import { IConfigurationService } from '@opensumi/monaco-editor-core/esm/vs/platform/configuration/common/configuration';
|
|
24
19
|
|
|
25
20
|
import {
|
|
26
|
-
ICodeEditor,
|
|
27
|
-
IEditor,
|
|
28
|
-
EditorCollectionService,
|
|
29
|
-
IDiffEditor,
|
|
30
|
-
ResourceDecorationNeedChangeEvent,
|
|
31
21
|
CursorStatus,
|
|
32
|
-
|
|
33
|
-
IDecorationApplyOptions,
|
|
22
|
+
EditorCollectionService,
|
|
34
23
|
EditorType,
|
|
24
|
+
ICodeEditor,
|
|
25
|
+
IDecorationApplyOptions,
|
|
26
|
+
IDiffEditor,
|
|
27
|
+
IEditor,
|
|
35
28
|
IResourceOpenOptions,
|
|
29
|
+
IUndoStopOptions,
|
|
30
|
+
ResourceDecorationNeedChangeEvent,
|
|
36
31
|
} from '../common';
|
|
32
|
+
import { IEditorDocumentModel, IEditorDocumentModelRef } from '../common/editor';
|
|
37
33
|
|
|
38
34
|
import { MonacoEditorDecorationApplier } from './decoration-applier';
|
|
39
|
-
import {
|
|
40
|
-
IEditorDocumentModelRef,
|
|
41
|
-
EditorDocumentModelContentChangedEvent,
|
|
42
|
-
IEditorDocumentModelService,
|
|
43
|
-
IEditorDocumentModel,
|
|
44
|
-
} from './doc-model/types';
|
|
35
|
+
import { EditorDocumentModelContentChangedEvent, IEditorDocumentModelService } from './doc-model/types';
|
|
45
36
|
import { EditorFeatureRegistryImpl } from './feature';
|
|
46
|
-
import { getConvertedMonacoOptions,
|
|
37
|
+
import { getConvertedMonacoOptions, isDiffEditorOption, isEditorOption } from './preference/converter';
|
|
47
38
|
import { IEditorFeatureRegistry } from './types';
|
|
48
39
|
|
|
40
|
+
import type {
|
|
41
|
+
ICodeEditor as IMonacoCodeEditor,
|
|
42
|
+
IDiffEditor as IMonacoDiffEditor,
|
|
43
|
+
} from '@opensumi/ide-monaco/lib/browser/monaco-api/types';
|
|
44
|
+
import type { IDiffEditorConstructionOptions } from '@opensumi/monaco-editor-core/esm/vs/editor/browser/editorBrowser';
|
|
45
|
+
|
|
49
46
|
const { removeUndefined } = objects;
|
|
50
47
|
|
|
51
48
|
@Injectable()
|
|
@@ -286,7 +283,7 @@ export abstract class BaseMonacoEditorWrapper extends WithEventBus implements IE
|
|
|
286
283
|
);
|
|
287
284
|
this.addDispose(
|
|
288
285
|
this.configurationService.onDidChangeConfiguration((e) => {
|
|
289
|
-
const changedEditorKeys = e.affectedKeys.filter((key) => isEditorOption(key));
|
|
286
|
+
const changedEditorKeys = Array.from(e.affectedKeys.values()).filter((key) => isEditorOption(key));
|
|
290
287
|
if (changedEditorKeys.length > 0) {
|
|
291
288
|
this._doUpdateOptions();
|
|
292
289
|
}
|
|
@@ -620,7 +617,7 @@ export class BrowserDiffEditor extends WithEventBus implements IDiffEditor {
|
|
|
620
617
|
this.wrapEditors();
|
|
621
618
|
this.addDispose(
|
|
622
619
|
this.configurationService.onDidChangeConfiguration((e) => {
|
|
623
|
-
const changedEditorKeys = e.affectedKeys.filter((key) => isDiffEditorOption(key));
|
|
620
|
+
const changedEditorKeys = Array.from(e.affectedKeys.values()).filter((key) => isDiffEditorOption(key));
|
|
624
621
|
if (changedEditorKeys.length > 0) {
|
|
625
622
|
this.doUpdateDiffOptions();
|
|
626
623
|
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { Autowired, INJECTOR_TOKEN, Injector } from '@opensumi/di';
|
|
2
2
|
import {
|
|
3
|
-
IClientApp,
|
|
4
3
|
ClientAppContribution,
|
|
4
|
+
Domain,
|
|
5
|
+
EDITOR_COMMANDS,
|
|
6
|
+
IClientApp,
|
|
5
7
|
KeybindingContribution,
|
|
6
8
|
KeybindingRegistry,
|
|
7
|
-
EDITOR_COMMANDS,
|
|
8
|
-
Domain,
|
|
9
9
|
electronEnv,
|
|
10
10
|
} from '@opensumi/ide-core-browser';
|
|
11
|
-
import {
|
|
11
|
+
import { OnEvent, WithEventBus, isOSX } from '@opensumi/ide-core-common';
|
|
12
12
|
import { IElectronMainUIService } from '@opensumi/ide-core-common/lib/electron';
|
|
13
13
|
|
|
14
|
-
import {
|
|
14
|
+
import { IDocPersistentCacheProvider, WorkbenchEditorService } from '../common';
|
|
15
15
|
|
|
16
16
|
import { IEditorDocumentModelContentRegistry } from './doc-model/types';
|
|
17
17
|
import { ResourceDecorationChangeEvent } from './types';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Autowired, Injectable } from '@opensumi/di';
|
|
2
|
-
import { IOpener,
|
|
2
|
+
import { IOpener, IRange, URI } from '@opensumi/ide-core-browser';
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { ResourceService, WorkbenchEditorService } from '../common';
|
|
5
5
|
|
|
6
6
|
@Injectable()
|
|
7
7
|
export class EditorOpener implements IOpener {
|
|
@@ -1,48 +1,47 @@
|
|
|
1
1
|
import { Autowired, INJECTOR_TOKEN, Injector } from '@opensumi/di';
|
|
2
2
|
import {
|
|
3
|
-
|
|
3
|
+
AppConfig,
|
|
4
4
|
ClientAppContribution,
|
|
5
|
-
KeybindingContribution,
|
|
6
|
-
KeybindingRegistry,
|
|
7
|
-
EDITOR_COMMANDS,
|
|
8
5
|
CommandContribution,
|
|
9
6
|
CommandRegistry,
|
|
10
|
-
URI,
|
|
11
|
-
Domain,
|
|
12
|
-
localize,
|
|
13
|
-
formatLocalize,
|
|
14
|
-
MonacoService,
|
|
15
|
-
ServiceNames,
|
|
16
|
-
MonacoContribution,
|
|
17
7
|
CommandService,
|
|
18
|
-
|
|
19
|
-
IEventBus,
|
|
20
|
-
Schemes,
|
|
21
|
-
PreferenceService,
|
|
8
|
+
CorePreferences,
|
|
22
9
|
Disposable,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
10
|
+
Domain,
|
|
11
|
+
EDITOR_COMMANDS,
|
|
12
|
+
FILE_COMMANDS,
|
|
13
|
+
IClientApp,
|
|
26
14
|
IClipboardService,
|
|
27
|
-
|
|
15
|
+
IContextKeyService,
|
|
16
|
+
IEventBus,
|
|
17
|
+
IOpenerService,
|
|
18
|
+
IPreferenceSettingsService,
|
|
28
19
|
IQuickOpenHandlerRegistry,
|
|
29
|
-
|
|
20
|
+
KeybindingContribution,
|
|
21
|
+
KeybindingRegistry,
|
|
22
|
+
MonacoContribution,
|
|
30
23
|
MonacoOverrideServiceRegistry,
|
|
31
|
-
|
|
32
|
-
|
|
24
|
+
MonacoService,
|
|
25
|
+
OpenerContribution,
|
|
26
|
+
PreferenceService,
|
|
27
|
+
PrefixQuickOpenService,
|
|
28
|
+
QuickOpenContribution,
|
|
33
29
|
QuickPickItem,
|
|
34
|
-
|
|
30
|
+
QuickPickService,
|
|
35
31
|
SUPPORTED_ENCODINGS,
|
|
36
|
-
|
|
37
|
-
|
|
32
|
+
Schemes,
|
|
33
|
+
ServiceNames,
|
|
34
|
+
URI,
|
|
35
|
+
formatLocalize,
|
|
36
|
+
getLanguageIdFromMonaco,
|
|
37
|
+
localize,
|
|
38
38
|
} from '@opensumi/ide-core-browser';
|
|
39
39
|
import { ComponentContribution, ComponentRegistry } from '@opensumi/ide-core-browser/lib/layout';
|
|
40
|
-
import {
|
|
40
|
+
import { IMenuRegistry, MenuContribution, MenuId } from '@opensumi/ide-core-browser/lib/menu/next';
|
|
41
41
|
import { AbstractContextMenuService } from '@opensumi/ide-core-browser/lib/menu/next/menu.interface';
|
|
42
42
|
import { ICtxMenuRenderer } from '@opensumi/ide-core-browser/lib/menu/next/renderer/ctxmenu/base';
|
|
43
43
|
import { IRelaxedOpenMergeEditorArgs } from '@opensumi/ide-core-browser/lib/monaco/merge-editor-widget';
|
|
44
|
-
import {
|
|
45
|
-
import { IElectronMainUIService } from '@opensumi/ide-core-common/lib/electron';
|
|
44
|
+
import { ILogger, PreferenceScope, isWindows } from '@opensumi/ide-core-common';
|
|
46
45
|
import { MergeEditorService } from '@opensumi/ide-monaco/lib/browser/contrib/merge-editor/merge-editor.service';
|
|
47
46
|
import { ITextmateTokenizer, ITextmateTokenizerService } from '@opensumi/ide-monaco/lib/browser/contrib/tokenizer';
|
|
48
47
|
import { EOL } from '@opensumi/ide-monaco/lib/browser/monaco-api/types';
|
|
@@ -52,20 +51,19 @@ import { ContextKeyExpr } from '@opensumi/monaco-editor-core/esm/vs/platform/con
|
|
|
52
51
|
import { SyncDescriptor } from '@opensumi/monaco-editor-core/esm/vs/platform/instantiation/common/descriptors';
|
|
53
52
|
|
|
54
53
|
import {
|
|
55
|
-
WorkbenchEditorService,
|
|
56
|
-
IResourceOpenOptions,
|
|
57
|
-
EditorGroupSplitAction,
|
|
58
|
-
ILanguageService,
|
|
59
54
|
Direction,
|
|
55
|
+
EditorGroupSplitAction,
|
|
60
56
|
IDocPersistentCacheProvider,
|
|
61
57
|
IEditor,
|
|
58
|
+
ILanguageService,
|
|
59
|
+
IResourceOpenOptions,
|
|
62
60
|
SaveReason,
|
|
61
|
+
WorkbenchEditorService,
|
|
63
62
|
} from '../common';
|
|
64
63
|
import { AUTO_SAVE_MODE } from '../common/editor';
|
|
65
64
|
|
|
66
65
|
import { MonacoTextModelService } from './doc-model/override';
|
|
67
|
-
import { IEditorDocumentModelService } from './doc-model/types';
|
|
68
|
-
import { IEditorDocumentModelContentRegistry } from './doc-model/types';
|
|
66
|
+
import { IEditorDocumentModelContentRegistry, IEditorDocumentModelService } from './doc-model/types';
|
|
69
67
|
import { EditorOpener } from './editor-opener';
|
|
70
68
|
import { MonacoCodeService, MonacoContextViewService } from './editor.override';
|
|
71
69
|
import { EditorStatusBarService } from './editor.status-bar.service';
|
|
@@ -77,10 +75,10 @@ import { EditorContextMenuController } from './menu/editor.context';
|
|
|
77
75
|
import { NavigationMenuContainer } from './navigation.view';
|
|
78
76
|
import { GoToLineQuickOpenHandler } from './quick-open/go-to-line';
|
|
79
77
|
import { WorkspaceSymbolQuickOpenHandler } from './quick-open/workspace-symbol-quickopen';
|
|
80
|
-
import {
|
|
78
|
+
import { BrowserEditorContribution, EditorGroupsResetSizeEvent, IEditorFeatureRegistry } from './types';
|
|
81
79
|
import { EditorSuggestWidgetContribution } from './view/suggest-widget';
|
|
82
80
|
import { EditorTopPaddingContribution } from './view/topPadding';
|
|
83
|
-
import {
|
|
81
|
+
import { EditorGroup, WorkbenchEditorServiceImpl } from './workbench-editor.service';
|
|
84
82
|
|
|
85
83
|
interface ResourceArgs {
|
|
86
84
|
group: EditorGroup;
|
|
@@ -220,9 +218,6 @@ export class EditorContribution
|
|
|
220
218
|
@Autowired(ICtxMenuRenderer)
|
|
221
219
|
private readonly contextMenuRenderer: ICtxMenuRenderer;
|
|
222
220
|
|
|
223
|
-
@Autowired(IElectronMainUIService)
|
|
224
|
-
private readonly electronMainUIService: IElectronMainUIService;
|
|
225
|
-
|
|
226
221
|
registerMonacoDefaultFormattingSelector(register): void {
|
|
227
222
|
const formatSelector = this.injector.get(FormattingSelector);
|
|
228
223
|
register(formatSelector.select.bind(formatSelector));
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { Autowired, Injectable } from '@opensumi/di';
|
|
2
|
-
import {
|
|
2
|
+
import { Disposable, IDisposable, IEventBus, URI } from '@opensumi/ide-core-browser';
|
|
3
3
|
import { IIconService, IThemeService } from '@opensumi/ide-theme';
|
|
4
4
|
import { ICSSStyleService } from '@opensumi/ide-theme/lib/common/style';
|
|
5
5
|
import * as monaco from '@opensumi/monaco-editor-core/esm/vs/editor/editor.api';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { IContentDecorationRenderOptions, IDecorationRenderOptions, IThemeDecorationRenderOptions } from '../common';
|
|
8
8
|
|
|
9
9
|
import {
|
|
10
|
-
|
|
10
|
+
EditorDecorationChangeEvent,
|
|
11
|
+
EditorDecorationProviderRegistrationEvent,
|
|
12
|
+
EditorDecorationTypeRemovedEvent,
|
|
11
13
|
IBrowserTextEditorDecorationType,
|
|
12
14
|
IDynamicModelDecorationProperty,
|
|
13
|
-
|
|
15
|
+
IEditorDecorationCollectionService,
|
|
14
16
|
IEditorDecorationProvider,
|
|
15
|
-
|
|
16
|
-
EditorDecorationChangeEvent,
|
|
17
|
-
EditorDecorationTypeRemovedEvent,
|
|
17
|
+
IThemedCssStyle,
|
|
18
18
|
} from './types';
|
|
19
19
|
|
|
20
20
|
@Injectable()
|
|
@@ -160,6 +160,9 @@
|
|
|
160
160
|
flex-wrap: wrap;
|
|
161
161
|
width: 100%;
|
|
162
162
|
background: var(--editorGroupHeader-tabsBackground);
|
|
163
|
+
&.kt_editor_tabs_current_last {
|
|
164
|
+
display: flex;
|
|
165
|
+
}
|
|
163
166
|
&::before {
|
|
164
167
|
content: '';
|
|
165
168
|
height: 1px;
|
|
@@ -315,6 +318,15 @@
|
|
|
315
318
|
}
|
|
316
319
|
}
|
|
317
320
|
}
|
|
321
|
+
&.kt_editor_tab_current_prev {
|
|
322
|
+
display: flex;
|
|
323
|
+
}
|
|
324
|
+
&.kt_editor_tab_current_next {
|
|
325
|
+
display: flex;
|
|
326
|
+
}
|
|
327
|
+
&.kt_editor_tab_dirty {
|
|
328
|
+
display: flex;
|
|
329
|
+
}
|
|
318
330
|
&.kt_on_drag_over {
|
|
319
331
|
background-color: var(--editorGroup-dropBackground);
|
|
320
332
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Autowired, Injectable } from '@opensumi/di';
|
|
2
2
|
import { PreferenceService } from '@opensumi/ide-core-browser';
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
3
|
+
import { IRange, URI } from '@opensumi/ide-core-common';
|
|
4
|
+
import { isEqual } from '@opensumi/monaco-editor-core/esm/vs/base/common/resources';
|
|
5
5
|
import { AbstractCodeEditorService } from '@opensumi/monaco-editor-core/esm/vs/editor/browser/services/abstractCodeEditorService';
|
|
6
6
|
import { ICodeEditorService } from '@opensumi/monaco-editor-core/esm/vs/editor/browser/services/codeEditorService';
|
|
7
7
|
import * as monaco from '@opensumi/monaco-editor-core/esm/vs/editor/editor.api';
|
|
@@ -9,6 +9,7 @@ import { EditorScopedLayoutService } from '@opensumi/monaco-editor-core/esm/vs/e
|
|
|
9
9
|
import { StandaloneServices } from '@opensumi/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneServices';
|
|
10
10
|
import { IStandaloneThemeService } from '@opensumi/monaco-editor-core/esm/vs/editor/standalone/common/standaloneTheme';
|
|
11
11
|
import { ContextViewService } from '@opensumi/monaco-editor-core/esm/vs/platform/contextview/browser/contextViewService';
|
|
12
|
+
import { IResourceEditorInput } from '@opensumi/monaco-editor-core/esm/vs/platform/editor/common/editor';
|
|
12
13
|
|
|
13
14
|
/* istanbul ignore file */
|
|
14
15
|
import { EditorOpenType, WorkbenchEditorService } from '../common';
|
|
@@ -16,6 +17,8 @@ import { EditorOpenType, WorkbenchEditorService } from '../common';
|
|
|
16
17
|
import { BrowserCodeEditor } from './editor-collection.service';
|
|
17
18
|
import { WorkbenchEditorServiceImpl } from './workbench-editor.service';
|
|
18
19
|
|
|
20
|
+
import type { ICodeEditor as IMonacoCodeEditor } from '@opensumi/monaco-editor-core/esm/vs/editor/browser/editorBrowser';
|
|
21
|
+
|
|
19
22
|
@Injectable()
|
|
20
23
|
export class MonacoCodeService extends AbstractCodeEditorService {
|
|
21
24
|
@Autowired(WorkbenchEditorService)
|
|
@@ -43,22 +46,17 @@ export class MonacoCodeService extends AbstractCodeEditorService {
|
|
|
43
46
|
* @param sideBySide ?
|
|
44
47
|
*/
|
|
45
48
|
async openCodeEditor(
|
|
46
|
-
|
|
47
|
-
input: monaco.editor.IResourceInput,
|
|
49
|
+
input: IResourceEditorInput,
|
|
48
50
|
source: IMonacoCodeEditor | null,
|
|
49
51
|
sideBySide?: boolean,
|
|
50
52
|
): Promise<IMonacoCodeEditor | null> {
|
|
51
|
-
const resourceUri =
|
|
53
|
+
const resourceUri = input.resource;
|
|
52
54
|
// 判断打开下一个不同于当前编辑器的文件时,是否需要先固定当前编辑器Tab,从而避免被替换,例如:跳转到定义
|
|
53
55
|
const enablePreviewFromCodeNavigation = this.preferenceService.get<boolean>(
|
|
54
56
|
'editor.enablePreviewFromCodeNavigation',
|
|
55
57
|
);
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
source &&
|
|
59
|
-
!sideBySide &&
|
|
60
|
-
!new URI(source.getModel()?.uri).isEqual(input.resource)
|
|
61
|
-
) {
|
|
58
|
+
|
|
59
|
+
if (!enablePreviewFromCodeNavigation && source && !sideBySide && isEqual(source.getModel()?.uri, input.resource)) {
|
|
62
60
|
for (const visibleGroup of this.workbenchEditorService.editorGroups) {
|
|
63
61
|
if (visibleGroup.currentOpenType?.type === EditorOpenType.code) {
|
|
64
62
|
if (visibleGroup.currentEditor?.monacoEditor === source) {
|
|
@@ -90,6 +88,7 @@ export class MonacoCodeService extends AbstractCodeEditorService {
|
|
|
90
88
|
index++;
|
|
91
89
|
}
|
|
92
90
|
}
|
|
91
|
+
// @ts-ignore
|
|
93
92
|
const selection = input.options ? input.options.selection : null;
|
|
94
93
|
let range;
|
|
95
94
|
if (selection) {
|
|
@@ -104,13 +103,12 @@ export class MonacoCodeService extends AbstractCodeEditorService {
|
|
|
104
103
|
);
|
|
105
104
|
}
|
|
106
105
|
}
|
|
107
|
-
|
|
106
|
+
const openUri = URI.parse(resourceUri.toString());
|
|
107
|
+
await editorGroup.open(openUri, { index, range: range as IRange, focus: true });
|
|
108
108
|
return (editorGroup.codeEditor as BrowserCodeEditor).monacoEditor;
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
// @ts-ignore
|
|
113
|
-
|
|
114
112
|
export class MonacoContextViewService extends ContextViewService {
|
|
115
113
|
private menuContainer: HTMLDivElement;
|
|
116
114
|
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import { WorkbenchEditorService, IEditor, CursorStatus, ILanguageService } from '../common';
|
|
1
|
+
import { Autowired, Injectable } from '@opensumi/di';
|
|
2
|
+
import { EDITOR_COMMANDS, WithEventBus, localize } from '@opensumi/ide-core-browser';
|
|
3
|
+
import { IStatusBarService, StatusBarAlignment } from '@opensumi/ide-core-browser/lib/services';
|
|
6
4
|
|
|
5
|
+
import { CursorStatus, IEditor, ILanguageService, WorkbenchEditorService } from '../common';
|
|
7
6
|
|
|
8
7
|
import { EditorDocumentModelOptionChangedEvent } from './doc-model/types';
|
|
9
8
|
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
import { Injectable } from '@opensumi/di';
|
|
4
|
+
import { WithEventBus } from '@opensumi/ide-core-browser';
|
|
5
|
+
|
|
6
|
+
import { IEditorTabService } from './types';
|
|
7
|
+
|
|
8
|
+
@Injectable()
|
|
9
|
+
export class EditorTabService extends WithEventBus implements IEditorTabService {
|
|
10
|
+
renderEditorTab(component: ReactNode, isCurrent: boolean): ReactNode {
|
|
11
|
+
return component;
|
|
12
|
+
}
|
|
13
|
+
renderTabCloseComponent(component: ReactNode): ReactNode {
|
|
14
|
+
return component;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -15,8 +15,9 @@ import {
|
|
|
15
15
|
MaybeNull,
|
|
16
16
|
PreferenceService,
|
|
17
17
|
URI,
|
|
18
|
-
useDisposable,
|
|
19
18
|
View,
|
|
19
|
+
useDesignStyles,
|
|
20
|
+
useDisposable,
|
|
20
21
|
} from '@opensumi/ide-core-browser';
|
|
21
22
|
import {
|
|
22
23
|
IResizeHandleDelegate,
|
|
@@ -35,16 +36,16 @@ import { EditorGrid, SplitDirection } from './grid/grid.service';
|
|
|
35
36
|
import { NavigationBar } from './navigation.view';
|
|
36
37
|
import { Tabs } from './tab.view';
|
|
37
38
|
import {
|
|
39
|
+
CodeEditorDidVisibleEvent,
|
|
38
40
|
DragOverPosition,
|
|
39
41
|
EditorComponentRegistry,
|
|
40
42
|
EditorComponentRenderMode,
|
|
41
43
|
EditorGroupFileDropEvent,
|
|
42
44
|
EditorGroupsResetSizeEvent,
|
|
43
|
-
|
|
45
|
+
EditorOpenType,
|
|
44
46
|
EditorSide,
|
|
45
47
|
IEditorComponent,
|
|
46
|
-
|
|
47
|
-
EditorOpenType,
|
|
48
|
+
RegisterEditorSideComponentEvent,
|
|
48
49
|
ResoucesOfActiveComponentChangedEvent,
|
|
49
50
|
} from './types';
|
|
50
51
|
import { EditorGroup, WorkbenchEditorServiceImpl } from './workbench-editor.service';
|
|
@@ -57,6 +58,7 @@ export const EditorView = () => {
|
|
|
57
58
|
const rightWidgetInfo = componentRegistry.getComponentRegistryInfo('editor-widget-right');
|
|
58
59
|
const RightWidget: React.ComponentType<any> | undefined = rightWidgetInfo && rightWidgetInfo.views[0].component;
|
|
59
60
|
const [ready, setReady] = React.useState<boolean>(workbenchEditorService.gridReady);
|
|
61
|
+
const styles_kt_workbench_editor = useDesignStyles(styles.kt_workbench_editor);
|
|
60
62
|
|
|
61
63
|
React.useEffect(() => {
|
|
62
64
|
if (!ready) {
|
|
@@ -77,7 +79,7 @@ export const EditorView = () => {
|
|
|
77
79
|
|
|
78
80
|
return (
|
|
79
81
|
<div
|
|
80
|
-
className={
|
|
82
|
+
className={styles_kt_workbench_editor}
|
|
81
83
|
id='workbench-editor'
|
|
82
84
|
ref={(ele) => {
|
|
83
85
|
ref.current = ele;
|
|
@@ -238,6 +240,7 @@ export const EditorGroupView = observer(({ group }: { group: EditorGroup }) => {
|
|
|
238
240
|
|
|
239
241
|
const preferenceService = useInjectable(PreferenceService) as PreferenceService;
|
|
240
242
|
const [isEmpty, setIsEmpty] = React.useState(group.resources.length === 0);
|
|
243
|
+
const styles_kt_editor_group = useDesignStyles(styles.kt_editor_group);
|
|
241
244
|
|
|
242
245
|
const appConfig = useInjectable(AppConfig);
|
|
243
246
|
const { editorBackgroundImage } = appConfig;
|
|
@@ -289,7 +292,7 @@ export const EditorGroupView = observer(({ group }: { group: EditorGroup }) => {
|
|
|
289
292
|
return (
|
|
290
293
|
<div
|
|
291
294
|
ref={groupWrapperRef as any}
|
|
292
|
-
className={
|
|
295
|
+
className={styles_kt_editor_group}
|
|
293
296
|
tabIndex={1}
|
|
294
297
|
onFocus={(e) => {
|
|
295
298
|
group.gainFocus();
|
|
@@ -324,6 +327,7 @@ export const EditorGroupBody = observer(({ group }: { group: EditorGroup }) => {
|
|
|
324
327
|
const editorBodyRef = React.useRef<HTMLDivElement>(null);
|
|
325
328
|
const editorService = useInjectable(WorkbenchEditorService) as WorkbenchEditorServiceImpl;
|
|
326
329
|
const eventBus = useInjectable(IEventBus) as IEventBus;
|
|
330
|
+
const styles_kt_editor_component = useDesignStyles(styles.kt_editor_component);
|
|
327
331
|
const components: React.ReactNode[] = [];
|
|
328
332
|
const codeEditorRef = React.useRef<HTMLDivElement>(null);
|
|
329
333
|
const diffEditorRef = React.useRef<HTMLDivElement>(null);
|
|
@@ -450,7 +454,7 @@ export const EditorGroupBody = observer(({ group }: { group: EditorGroup }) => {
|
|
|
450
454
|
<div className={styles.kt_editor_components}>
|
|
451
455
|
<div
|
|
452
456
|
className={cls({
|
|
453
|
-
[
|
|
457
|
+
[styles_kt_editor_component]: true,
|
|
454
458
|
[styles.kt_hidden]: !group.currentOpenType || group.currentOpenType.type !== EditorOpenType.component,
|
|
455
459
|
})}
|
|
456
460
|
>
|
|
@@ -459,19 +463,19 @@ export const EditorGroupBody = observer(({ group }: { group: EditorGroup }) => {
|
|
|
459
463
|
<div
|
|
460
464
|
className={cls({
|
|
461
465
|
[styles.kt_editor_code_editor]: true,
|
|
462
|
-
[
|
|
466
|
+
[styles_kt_editor_component]: true,
|
|
463
467
|
[styles.kt_hidden]: !group.currentOpenType || group.currentOpenType.type !== EditorOpenType.code,
|
|
464
468
|
})}
|
|
465
469
|
ref={codeEditorRef}
|
|
466
470
|
/>
|
|
467
471
|
<div
|
|
468
|
-
className={cls(styles.kt_editor_diff_editor,
|
|
472
|
+
className={cls(styles.kt_editor_diff_editor, styles_kt_editor_component, {
|
|
469
473
|
[styles.kt_hidden]: !group.currentOpenType || group.currentOpenType.type !== EditorOpenType.diff,
|
|
470
474
|
})}
|
|
471
475
|
ref={diffEditorRef}
|
|
472
476
|
/>
|
|
473
477
|
<div
|
|
474
|
-
className={cls(styles.kt_editor_diff_3_editor,
|
|
478
|
+
className={cls(styles.kt_editor_diff_3_editor, styles_kt_editor_component, {
|
|
475
479
|
[styles.kt_hidden]: !group.currentOpenType || group.currentOpenType.type !== EditorOpenType.mergeEditor,
|
|
476
480
|
})}
|
|
477
481
|
ref={mergeEditorRef}
|
package/src/browser/feature.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Autowired, Injectable } from '@opensumi/di';
|
|
2
|
+
import { Emitter, Event, IDisposable, ILogger, URI, arrays } from '@opensumi/ide-core-browser';
|
|
3
3
|
|
|
4
4
|
import { IEditor } from '../common';
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { IEditorFeatureContribution, IEditorFeatureRegistry } from './types';
|
|
7
7
|
|
|
8
8
|
const { addElement } = arrays;
|
|
9
9
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Autowired, INJECTOR_TOKEN, Injectable, Injector } from '@opensumi/di';
|
|
2
2
|
import { CancellationToken, ILogger } from '@opensumi/ide-core-common';
|
|
3
3
|
import { languageFeaturesService } from '@opensumi/ide-monaco/lib/browser/monaco-api/languages';
|
|
4
4
|
import { Range } from '@opensumi/monaco-editor-core/esm/vs/editor/common/core/range';
|
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
DocumentRangeFormattingEditProvider,
|
|
8
8
|
} from '@opensumi/monaco-editor-core/esm/vs/editor/common/languages';
|
|
9
9
|
import {
|
|
10
|
-
getRealAndSyntheticDocumentFormattersOrdered,
|
|
11
10
|
FormattingMode,
|
|
11
|
+
getRealAndSyntheticDocumentFormattersOrdered,
|
|
12
12
|
} from '@opensumi/monaco-editor-core/esm/vs/editor/contrib/format/browser/format';
|
|
13
13
|
import { FormattingEdit } from '@opensumi/monaco-editor-core/esm/vs/editor/contrib/format/browser/formattingEdit';
|
|
14
14
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Autowired, Injectable } from '@opensumi/di';
|
|
2
|
+
import { PreferenceScope, PreferenceService, QuickPickService, URI, localize } from '@opensumi/ide-core-browser';
|
|
3
3
|
import { ITextModel } from '@opensumi/ide-monaco/lib/browser/monaco-api/types';
|
|
4
4
|
import { FormattingMode } from '@opensumi/monaco-editor-core/esm/vs/editor/contrib/format/browser/format';
|
|
5
5
|
import * as monaco from '@opensumi/monaco-editor-core/esm/vs/editor/editor.api';
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Autowired, Injectable } from '@opensumi/di';
|
|
2
2
|
import {
|
|
3
3
|
Emitter,
|
|
4
|
-
|
|
4
|
+
EncodingRegistry,
|
|
5
5
|
Event,
|
|
6
|
-
IApplicationService,
|
|
7
6
|
FileChangeType,
|
|
8
|
-
|
|
7
|
+
IApplicationService,
|
|
9
8
|
IEditorDocumentChange,
|
|
10
9
|
IEditorDocumentModelSaveResult,
|
|
10
|
+
OperatingSystem,
|
|
11
11
|
PreferenceService,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
UTF8_with_bom,
|
|
12
|
+
SaveTaskResponseState,
|
|
13
|
+
URI,
|
|
15
14
|
UTF8,
|
|
15
|
+
UTF8_with_bom,
|
|
16
16
|
detectEncodingFromBuffer,
|
|
17
|
-
|
|
17
|
+
getLanguageIdFromMonaco,
|
|
18
18
|
} from '@opensumi/ide-core-browser';
|
|
19
19
|
import { IFileServiceClient } from '@opensumi/ide-file-service';
|
|
20
20
|
import { EOL } from '@opensumi/ide-monaco/lib/browser/monaco-api/types';
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
import { Autowired, Injectable } from '@opensumi/di';
|
|
2
2
|
import {
|
|
3
|
+
IApplicationService,
|
|
4
|
+
LRUMap,
|
|
5
|
+
MessageType,
|
|
3
6
|
OperatingSystem,
|
|
4
7
|
URI,
|
|
5
8
|
WithEventBus,
|
|
6
|
-
localize,
|
|
7
9
|
formatLocalize,
|
|
8
|
-
|
|
9
|
-
LRUMap,
|
|
10
|
-
IApplicationService,
|
|
10
|
+
localize,
|
|
11
11
|
} from '@opensumi/ide-core-browser';
|
|
12
12
|
import { LabelService } from '@opensumi/ide-core-browser/lib/services';
|
|
13
13
|
import { FileChangeType, path } from '@opensumi/ide-core-common';
|
|
14
|
-
import {
|
|
14
|
+
import { FileStat, IFileServiceClient } from '@opensumi/ide-file-service/lib/common';
|
|
15
15
|
import { IDialogService } from '@opensumi/ide-overlay';
|
|
16
16
|
|
|
17
|
-
import {
|
|
18
|
-
import { DIFF_SCHEME } from '../../common';
|
|
17
|
+
import { AskSaveResult, DIFF_SCHEME, IResource, IResourceProvider, ResourceNeedUpdateEvent } from '../../common';
|
|
19
18
|
import { IEditorDocumentModelService } from '../doc-model/types';
|
|
20
19
|
|
|
21
20
|
import { FileTreeSet } from './file-tree-set';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { IDisposable, IEventBus, MaybeNull
|
|
1
|
+
import { Emitter, IDisposable, IEventBus, MaybeNull } from '@opensumi/ide-core-browser';
|
|
2
2
|
import { makeRandomHexString } from '@opensumi/ide-core-common';
|
|
3
3
|
|
|
4
|
-
import { IEditorGroup, IEditorGroupState
|
|
4
|
+
import { Direction, IEditorGroup, IEditorGroupState } from '../../common';
|
|
5
5
|
import { GridResizeEvent } from '../types';
|
|
6
6
|
|
|
7
7
|
export const editorGridUid = new Set();
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Autowired, Injectable } from '@opensumi/di';
|
|
2
2
|
import {
|
|
3
|
+
DisposableCollection,
|
|
4
|
+
EventType,
|
|
3
5
|
IPosition,
|
|
4
|
-
URI,
|
|
5
|
-
WithEventBus,
|
|
6
6
|
OnEvent,
|
|
7
7
|
PreferenceService,
|
|
8
|
+
URI,
|
|
9
|
+
WithEventBus,
|
|
8
10
|
addDisposableListener,
|
|
9
|
-
EventType,
|
|
10
|
-
DisposableCollection,
|
|
11
11
|
} from '@opensumi/ide-core-browser';
|
|
12
12
|
|
|
13
13
|
import { WorkbenchEditorService } from '../../common';
|
|
14
|
-
import {
|
|
14
|
+
import { EditorGroupChangeEvent, EditorGroupCloseEvent, EditorOpenType, EditorSelectionChangeEvent } from '../types';
|
|
15
15
|
|
|
16
16
|
const HistoryPositionLineThreshold = 7;
|
|
17
17
|
const HardMaxStateLength = 200; // 超过200个过后,会缩减至100个, 防止反复缩减
|