@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,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
isOSX,
|
|
4
|
-
isLinux,
|
|
2
|
+
PreferenceProxy,
|
|
5
3
|
PreferenceSchema,
|
|
6
4
|
PreferenceSchemaProperties,
|
|
7
|
-
|
|
5
|
+
isLinux,
|
|
6
|
+
isOSX,
|
|
7
|
+
localize,
|
|
8
8
|
} from '@opensumi/ide-core-browser';
|
|
9
9
|
|
|
10
10
|
export const USUAL_WORD_SEPARATORS = '`~!@#$%^&*()-=+[{]}\\|;:\'",.<>/?';
|
|
@@ -80,6 +80,7 @@ export const EDITOR_SUGGEST_DEFAULTS = {
|
|
|
80
80
|
|
|
81
81
|
export const EDITOR_INLINE_SUGGEST_DEFAULTS = {
|
|
82
82
|
enabled: true,
|
|
83
|
+
showToolbar: 'onHover',
|
|
83
84
|
};
|
|
84
85
|
|
|
85
86
|
export const enum WrappingIndent {
|
|
@@ -523,6 +524,23 @@ const monacoEditorSchema: PreferenceSchemaProperties = {
|
|
|
523
524
|
default: EDITOR_INLINE_SUGGEST_DEFAULTS.enabled,
|
|
524
525
|
description: '%editor.configuration.inlineSuggest.enabled%',
|
|
525
526
|
},
|
|
527
|
+
'editor.inlineSuggest.showToolbar': {
|
|
528
|
+
type: 'string',
|
|
529
|
+
default: EDITOR_INLINE_SUGGEST_DEFAULTS.showToolbar,
|
|
530
|
+
enum: ['always', 'onHover', 'never'],
|
|
531
|
+
enumDescriptions: [
|
|
532
|
+
localize(
|
|
533
|
+
'editor.configuration.inlineSuggest.showToolbar.always',
|
|
534
|
+
'Show the inline suggestion toolbar whenever an inline suggestion is shown.',
|
|
535
|
+
),
|
|
536
|
+
localize(
|
|
537
|
+
'editor.configuration.inlineSuggest.showToolbar.onHover',
|
|
538
|
+
'Show the inline suggestion toolbar when hovering over an inline suggestion.',
|
|
539
|
+
),
|
|
540
|
+
localize('editor.configuration.inlineSuggest.showToolbar.never', 'Never show the inline suggestion toolbar.'),
|
|
541
|
+
],
|
|
542
|
+
description: '%editor.configuration.inlineSuggest.showToolbar%',
|
|
543
|
+
},
|
|
526
544
|
'editor.experimental.stickyScroll.enabled': {
|
|
527
545
|
type: 'boolean',
|
|
528
546
|
default: true,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PreferenceService, createPreferenceProxy } from '@opensumi/ide-core-browser';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { EditorPreferences, editorPreferenceSchema } from './schema';
|
|
4
4
|
|
|
5
5
|
export function createEditorPreferenceProxy(
|
|
6
6
|
preferenceService: PreferenceService,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Autowired, Injectable } from '@opensumi/di';
|
|
2
2
|
import {
|
|
3
3
|
CommandService,
|
|
4
|
+
QuickOpenHandler,
|
|
4
5
|
formatLocalize,
|
|
5
6
|
localize,
|
|
6
|
-
QuickOpenHandler,
|
|
7
7
|
withNullAsUndefined,
|
|
8
8
|
} from '@opensumi/ide-core-browser';
|
|
9
|
-
import {
|
|
9
|
+
import { Mode, PrefixQuickOpenService, QuickOpenItem, QuickOpenModel } from '@opensumi/ide-core-browser/lib/quick-open';
|
|
10
10
|
import { Event as MonacoEvent } from '@opensumi/ide-monaco/lib/browser/monaco-api/types';
|
|
11
11
|
import { IRange as IMonacoRange } from '@opensumi/monaco-editor-core/esm/vs/editor/common/core/range';
|
|
12
12
|
import { IEditor as IMonacoCodeEditor } from '@opensumi/monaco-editor-core/esm/vs/editor/common/editorCommon';
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { Injectable, Autowired } from '@opensumi/di';
|
|
1
|
+
import { Autowired, Injectable } from '@opensumi/di';
|
|
4
2
|
import {
|
|
5
|
-
|
|
6
|
-
QuickOpenModel,
|
|
3
|
+
CancellationToken,
|
|
7
4
|
CancellationTokenSource,
|
|
5
|
+
QuickOpenHandler,
|
|
8
6
|
QuickOpenItem,
|
|
9
|
-
CancellationToken,
|
|
10
|
-
URI,
|
|
11
7
|
QuickOpenMode,
|
|
12
|
-
|
|
8
|
+
QuickOpenModel,
|
|
9
|
+
URI,
|
|
13
10
|
getIcon,
|
|
11
|
+
getSymbolIcon,
|
|
14
12
|
} from '@opensumi/ide-core-browser';
|
|
15
|
-
import { ILogger,
|
|
16
|
-
import {
|
|
13
|
+
import { ILogger, IReporterService, REPORT_NAME, localize } from '@opensumi/ide-core-common';
|
|
14
|
+
import { QuickOpenActionProvider, QuickOpenBaseAction } from '@opensumi/ide-quick-open';
|
|
17
15
|
import { IWorkspaceService } from '@opensumi/ide-workspace';
|
|
18
16
|
import { SymbolKind as SymbolKindEnum } from '@opensumi/monaco-editor-core/esm/vs/editor/common/languages';
|
|
19
17
|
|
|
20
18
|
import {
|
|
21
|
-
|
|
19
|
+
EditorGroupSplitAction,
|
|
22
20
|
ILanguageService,
|
|
23
|
-
WorkspaceSymbolParams,
|
|
24
21
|
WorkbenchEditorService,
|
|
25
|
-
|
|
22
|
+
WorkspaceSymbolParams,
|
|
23
|
+
WorkspaceSymbolProvider,
|
|
26
24
|
} from '../../common';
|
|
27
25
|
|
|
26
|
+
import type { Range, SymbolInformation } from 'vscode-languageserver-types';
|
|
27
|
+
|
|
28
28
|
@Injectable()
|
|
29
29
|
class WorkspaceSymbolOpenSideAction extends QuickOpenBaseAction {
|
|
30
30
|
constructor() {
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { observable } from 'mobx';
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { Disposable,
|
|
3
|
+
import { Autowired, Injectable } from '@opensumi/di';
|
|
4
|
+
import { IDisposable, OnEvent, URI, WithEventBus } from '@opensumi/ide-core-browser';
|
|
5
|
+
import { Disposable, Emitter, ILogger, LRUMap, arrays } from '@opensumi/ide-core-common';
|
|
6
6
|
|
|
7
7
|
import {
|
|
8
|
-
|
|
8
|
+
AskSaveResult,
|
|
9
9
|
IResource,
|
|
10
|
-
IResourceProvider,
|
|
11
|
-
ResourceNeedUpdateEvent,
|
|
12
|
-
ResourceDidUpdateEvent,
|
|
13
10
|
IResourceDecoration,
|
|
14
|
-
|
|
11
|
+
IResourceProvider,
|
|
15
12
|
ResourceDecorationChangeEvent,
|
|
16
|
-
|
|
13
|
+
ResourceDecorationNeedChangeEvent,
|
|
14
|
+
ResourceDidUpdateEvent,
|
|
15
|
+
ResourceNeedUpdateEvent,
|
|
16
|
+
ResourceService,
|
|
17
17
|
} from '../common';
|
|
18
18
|
|
|
19
19
|
const { addElement } = arrays;
|
package/src/browser/tab.view.tsx
CHANGED
|
@@ -1,45 +1,52 @@
|
|
|
1
1
|
import cls from 'classnames';
|
|
2
2
|
import React, {
|
|
3
|
-
useEffect,
|
|
4
|
-
useState,
|
|
5
|
-
useCallback,
|
|
6
|
-
useRef,
|
|
7
|
-
useContext,
|
|
8
|
-
useMemo,
|
|
9
|
-
forwardRef,
|
|
10
3
|
DragEvent,
|
|
11
4
|
HTMLAttributes,
|
|
12
|
-
Ref,
|
|
13
5
|
MouseEvent,
|
|
6
|
+
Ref,
|
|
7
|
+
forwardRef,
|
|
8
|
+
useCallback,
|
|
9
|
+
useContext,
|
|
10
|
+
useEffect,
|
|
11
|
+
useMemo,
|
|
12
|
+
useRef,
|
|
13
|
+
useState,
|
|
14
14
|
} from 'react';
|
|
15
15
|
|
|
16
16
|
import { Scrollbars } from '@opensumi/ide-components';
|
|
17
17
|
import {
|
|
18
|
-
|
|
19
|
-
MaybeNull,
|
|
20
|
-
IEventBus,
|
|
21
|
-
getSlotLocation,
|
|
18
|
+
AppConfig,
|
|
22
19
|
ConfigContext,
|
|
23
|
-
ResizeEvent,
|
|
24
|
-
URI,
|
|
25
20
|
Disposable,
|
|
26
|
-
DomListener,
|
|
27
|
-
PreferenceService,
|
|
28
21
|
DisposableCollection,
|
|
22
|
+
DomListener,
|
|
29
23
|
Event,
|
|
24
|
+
IEventBus,
|
|
25
|
+
MaybeNull,
|
|
26
|
+
PreferenceService,
|
|
27
|
+
ResizeEvent,
|
|
28
|
+
URI,
|
|
30
29
|
getExternalIcon,
|
|
30
|
+
getIcon,
|
|
31
|
+
getSlotLocation,
|
|
32
|
+
useDesignStyles,
|
|
31
33
|
} from '@opensumi/ide-core-browser';
|
|
32
34
|
import { InlineMenuBar } from '@opensumi/ide-core-browser/lib/components/actions';
|
|
33
|
-
import { LAYOUT_VIEW_SIZE } from '@opensumi/ide-core-browser/lib/layout/constants';
|
|
34
35
|
import { VIEW_CONTAINERS } from '@opensumi/ide-core-browser/lib/layout/view-id';
|
|
35
36
|
import { IMenuRegistry, MenuId } from '@opensumi/ide-core-browser/lib/menu/next';
|
|
36
37
|
import { useInjectable, useUpdateOnEventBusEvent } from '@opensumi/ide-core-browser/lib/react-hooks';
|
|
37
38
|
|
|
38
|
-
import { IResource,
|
|
39
|
+
import { IEditorGroup, IResource, ResourceDidUpdateEvent, ResourceService, WorkbenchEditorService } from '../common';
|
|
39
40
|
|
|
40
41
|
import styles from './editor.module.less';
|
|
41
42
|
import { TabTitleMenuService } from './menu/title-context.menu';
|
|
42
|
-
import {
|
|
43
|
+
import {
|
|
44
|
+
DragOverPosition,
|
|
45
|
+
EditorGroupFileDropEvent,
|
|
46
|
+
GridResizeEvent,
|
|
47
|
+
IEditorActionRegistry,
|
|
48
|
+
IEditorTabService,
|
|
49
|
+
} from './types';
|
|
43
50
|
import { useUpdateOnGroupTabChange } from './view/react-hook';
|
|
44
51
|
import { EditorGroup, WorkbenchEditorServiceImpl } from './workbench-editor.service';
|
|
45
52
|
|
|
@@ -62,6 +69,21 @@ export const Tabs = ({ group }: ITabsProps) => {
|
|
|
62
69
|
const tabTitleMenuService = useInjectable(TabTitleMenuService) as TabTitleMenuService;
|
|
63
70
|
const preferenceService = useInjectable<PreferenceService>(PreferenceService);
|
|
64
71
|
const menuRegistry = useInjectable<IMenuRegistry>(IMenuRegistry);
|
|
72
|
+
const editorTabService = useInjectable<IEditorTabService>(IEditorTabService);
|
|
73
|
+
const appConfig = useInjectable<AppConfig>(AppConfig);
|
|
74
|
+
|
|
75
|
+
const styles_tab_right = useDesignStyles(styles.tab_right);
|
|
76
|
+
const styles_close_tab = useDesignStyles(styles.close_tab);
|
|
77
|
+
const styles_kt_editor_close_icon = useDesignStyles(styles.kt_editor_close_icon);
|
|
78
|
+
const styles_kt_editor_tabs_content = useDesignStyles(styles.kt_editor_tabs_content);
|
|
79
|
+
const styles_kt_editor_tabs_current_last = useDesignStyles(styles.kt_editor_tabs_current_last);
|
|
80
|
+
const styles_kt_editor_tab = useDesignStyles(styles.kt_editor_tab);
|
|
81
|
+
const styles_kt_editor_tab_current_prev = useDesignStyles(styles.kt_editor_tab_current_prev);
|
|
82
|
+
const styles_kt_editor_tab_current_next = useDesignStyles(styles.kt_editor_tab_current_next);
|
|
83
|
+
const styles_kt_editor_tab_current = useDesignStyles(styles.kt_editor_tab_current);
|
|
84
|
+
const styles_kt_editor_tab_dirty = useDesignStyles(styles.kt_editor_tab_dirty);
|
|
85
|
+
const styles_kt_editor_tabs = useDesignStyles(styles.kt_editor_tabs);
|
|
86
|
+
const styles_kt_editor_tabs_scroll_wrapper = useDesignStyles(styles.kt_editor_tabs_scroll_wrapper);
|
|
65
87
|
|
|
66
88
|
const [tabsLoadingMap, setTabsLoadingMap] = useState<{ [resource: string]: boolean }>({});
|
|
67
89
|
const [wrapMode, setWrapMode] = useState<boolean>(!!preferenceService.get<boolean>('editor.wrapTab'));
|
|
@@ -314,113 +336,138 @@ export const Tabs = ({ group }: ITabsProps) => {
|
|
|
314
336
|
[editorService],
|
|
315
337
|
);
|
|
316
338
|
|
|
317
|
-
const
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
<div
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
: LAYOUT_VIEW_SIZE.EDITOR_TABS_HEIGHT,
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
onContextMenu={(event) => {
|
|
344
|
-
tabTitleMenuService.show(event.nativeEvent.x, event.nativeEvent.y, resource && resource.uri, group);
|
|
345
|
-
event.preventDefault();
|
|
346
|
-
}}
|
|
347
|
-
key={resource.uri.toString()}
|
|
348
|
-
onMouseUp={(e) => {
|
|
349
|
-
if (e.nativeEvent.which === 2) {
|
|
350
|
-
e.preventDefault();
|
|
339
|
+
const renderEditorTab = React.useCallback(
|
|
340
|
+
(resource: IResource, isCurrent: boolean) => {
|
|
341
|
+
const decoration = resourceService.getResourceDecoration(resource.uri);
|
|
342
|
+
const subname = resourceService.getResourceSubname(resource, group.resources);
|
|
343
|
+
|
|
344
|
+
return editorTabService.renderEditorTab(
|
|
345
|
+
<>
|
|
346
|
+
<div className={tabsLoadingMap[resource.uri.toString()] ? 'loading_indicator' : cls(resource.icon)}> </div>
|
|
347
|
+
<div>{resource.name}</div>
|
|
348
|
+
{subname ? <div className={styles.subname}>{subname}</div> : null}
|
|
349
|
+
{decoration.readOnly ? (
|
|
350
|
+
<span className={cls(getExternalIcon('lock'), styles.editor_readonly_icon)}></span>
|
|
351
|
+
) : null}
|
|
352
|
+
<div className={styles_tab_right}>
|
|
353
|
+
<div
|
|
354
|
+
className={cls({
|
|
355
|
+
[styles.kt_hidden]: !decoration.dirty,
|
|
356
|
+
[styles.dirty]: true,
|
|
357
|
+
})}
|
|
358
|
+
></div>
|
|
359
|
+
<div
|
|
360
|
+
className={styles_close_tab}
|
|
361
|
+
onMouseDown={(e) => {
|
|
351
362
|
e.stopPropagation();
|
|
352
363
|
group.close(resource.uri);
|
|
364
|
+
}}
|
|
365
|
+
>
|
|
366
|
+
{editorTabService.renderTabCloseComponent(
|
|
367
|
+
<div className={cls(getIcon('close'), styles_kt_editor_close_icon)} />,
|
|
368
|
+
)}
|
|
369
|
+
</div>
|
|
370
|
+
</div>
|
|
371
|
+
</>,
|
|
372
|
+
isCurrent,
|
|
373
|
+
);
|
|
374
|
+
},
|
|
375
|
+
[editorTabService],
|
|
376
|
+
);
|
|
377
|
+
|
|
378
|
+
const renderTabContent = () => {
|
|
379
|
+
const curTabIndex = group.resources.findIndex((resource) => group.currentResource === resource);
|
|
380
|
+
return (
|
|
381
|
+
<div
|
|
382
|
+
className={cls({
|
|
383
|
+
[styles_kt_editor_tabs_content]: true,
|
|
384
|
+
[styles_kt_editor_tabs_current_last]: curTabIndex === group.resources.length - 1,
|
|
385
|
+
})}
|
|
386
|
+
ref={contentRef as any}
|
|
387
|
+
>
|
|
388
|
+
{group.resources.map((resource, i) => {
|
|
389
|
+
let ref: HTMLDivElement | null;
|
|
390
|
+
const decoration = resourceService.getResourceDecoration(resource.uri);
|
|
391
|
+
return (
|
|
392
|
+
<div
|
|
393
|
+
draggable={true}
|
|
394
|
+
title={resource.title}
|
|
395
|
+
className={cls({
|
|
396
|
+
[styles_kt_editor_tab]: true,
|
|
397
|
+
[styles.last_in_row]: tabMap.get(i),
|
|
398
|
+
[styles_kt_editor_tab_current_prev]: curTabIndex - 1 === i,
|
|
399
|
+
[styles_kt_editor_tab_current_next]: curTabIndex + 1 === i,
|
|
400
|
+
[styles_kt_editor_tab_current]: group.currentResource === resource,
|
|
401
|
+
[styles.kt_editor_tab_preview]: group.previewURI && group.previewURI.isEqual(resource.uri),
|
|
402
|
+
[styles_kt_editor_tab_dirty]: decoration.dirty,
|
|
403
|
+
})}
|
|
404
|
+
style={
|
|
405
|
+
wrapMode && i === group.resources.length - 1
|
|
406
|
+
? { marginRight: lastMarginRight, height: appConfig.layoutViewSize!.editorTabsHeight }
|
|
407
|
+
: { height: appConfig.layoutViewSize!.editorTabsHeight }
|
|
353
408
|
}
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
e.preventDefault();
|
|
363
|
-
e.stopPropagation();
|
|
364
|
-
if (ref) {
|
|
365
|
-
ref.classList.add(styles.kt_on_drag_over);
|
|
366
|
-
}
|
|
367
|
-
}}
|
|
368
|
-
onDragLeave={(e) => {
|
|
369
|
-
if (ref) {
|
|
370
|
-
ref.classList.remove(styles.kt_on_drag_over);
|
|
371
|
-
}
|
|
372
|
-
}}
|
|
373
|
-
onDrop={(e) => {
|
|
374
|
-
if (ref) {
|
|
375
|
-
ref.classList.remove(styles.kt_on_drag_over);
|
|
376
|
-
}
|
|
377
|
-
if (onDrop) {
|
|
378
|
-
onDrop(e, i, resource);
|
|
379
|
-
}
|
|
380
|
-
}}
|
|
381
|
-
onDoubleClick={(e) => {
|
|
382
|
-
group.pinPreviewed(resource.uri);
|
|
383
|
-
}}
|
|
384
|
-
ref={(el) => (ref = el)}
|
|
385
|
-
onDragStart={(e) => {
|
|
386
|
-
e.dataTransfer.setData('uri', resource.uri.toString());
|
|
387
|
-
e.dataTransfer.setData('uri-source-group', group.name);
|
|
388
|
-
}}
|
|
389
|
-
>
|
|
390
|
-
<div className={tabsLoadingMap[resource.uri.toString()] ? 'loading_indicator' : cls(resource.icon)}> </div>
|
|
391
|
-
<div>{resource.name}</div>
|
|
392
|
-
{subname ? <div className={styles.subname}>{subname}</div> : null}
|
|
393
|
-
{decoration.readOnly ? (
|
|
394
|
-
<span className={cls(getExternalIcon('lock'), styles.editor_readonly_icon)}></span>
|
|
395
|
-
) : null}
|
|
396
|
-
<div className={styles.tab_right}>
|
|
397
|
-
<div
|
|
398
|
-
className={cls({
|
|
399
|
-
[styles.kt_hidden]: !decoration.dirty,
|
|
400
|
-
[styles.dirty]: true,
|
|
401
|
-
})}
|
|
402
|
-
></div>
|
|
403
|
-
<div
|
|
404
|
-
className={styles.close_tab}
|
|
405
|
-
onMouseDown={(e) => {
|
|
409
|
+
onContextMenu={(event) => {
|
|
410
|
+
tabTitleMenuService.show(event.nativeEvent.x, event.nativeEvent.y, resource && resource.uri, group);
|
|
411
|
+
event.preventDefault();
|
|
412
|
+
}}
|
|
413
|
+
key={resource.uri.toString()}
|
|
414
|
+
onMouseUp={(e) => {
|
|
415
|
+
if (e.nativeEvent.which === 2) {
|
|
416
|
+
e.preventDefault();
|
|
406
417
|
e.stopPropagation();
|
|
407
418
|
group.close(resource.uri);
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
419
|
+
}
|
|
420
|
+
}}
|
|
421
|
+
onMouseDown={(e) => {
|
|
422
|
+
if (e.nativeEvent.which === 1) {
|
|
423
|
+
group.open(resource.uri, { focus: true });
|
|
424
|
+
}
|
|
425
|
+
}}
|
|
426
|
+
data-uri={resource.uri.toString()}
|
|
427
|
+
onDragOver={(e) => {
|
|
428
|
+
e.preventDefault();
|
|
429
|
+
e.stopPropagation();
|
|
430
|
+
if (ref) {
|
|
431
|
+
ref.classList.add(styles.kt_on_drag_over);
|
|
432
|
+
}
|
|
433
|
+
}}
|
|
434
|
+
onDragLeave={(e) => {
|
|
435
|
+
if (ref) {
|
|
436
|
+
ref.classList.remove(styles.kt_on_drag_over);
|
|
437
|
+
}
|
|
438
|
+
}}
|
|
439
|
+
onDrop={(e) => {
|
|
440
|
+
if (ref) {
|
|
441
|
+
ref.classList.remove(styles.kt_on_drag_over);
|
|
442
|
+
}
|
|
443
|
+
if (onDrop) {
|
|
444
|
+
onDrop(e, i, resource);
|
|
445
|
+
}
|
|
446
|
+
}}
|
|
447
|
+
onDoubleClick={(e) => {
|
|
448
|
+
group.pinPreviewed(resource.uri);
|
|
449
|
+
}}
|
|
450
|
+
ref={(el) => (ref = el)}
|
|
451
|
+
onDragStart={(e) => {
|
|
452
|
+
e.dataTransfer.setData('uri', resource.uri.toString());
|
|
453
|
+
e.dataTransfer.setData('uri-source-group', group.name);
|
|
454
|
+
}}
|
|
455
|
+
>
|
|
456
|
+
{renderEditorTab(resource, group.currentResource === resource)}
|
|
412
457
|
</div>
|
|
413
|
-
|
|
414
|
-
)
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
458
|
+
);
|
|
459
|
+
})}
|
|
460
|
+
{wrapMode && (
|
|
461
|
+
<EditorActions className={styles.kt_editor_wrap_mode_action} ref={editorActionRef} group={group} />
|
|
462
|
+
)}
|
|
463
|
+
</div>
|
|
464
|
+
);
|
|
465
|
+
};
|
|
419
466
|
|
|
420
467
|
return (
|
|
421
|
-
<div id={VIEW_CONTAINERS.EDITOR_TABS} className={
|
|
468
|
+
<div id={VIEW_CONTAINERS.EDITOR_TABS} className={styles_kt_editor_tabs}>
|
|
422
469
|
<div
|
|
423
|
-
className={
|
|
470
|
+
className={styles_kt_editor_tabs_scroll_wrapper}
|
|
424
471
|
ref={tabWrapperRef as any}
|
|
425
472
|
onDragOver={handleWrapperDragOver}
|
|
426
473
|
onDragLeave={handleWrapperDragLeave}
|
|
@@ -453,6 +500,7 @@ export type IEditorActionsProps = IEditorActionsBaseProps & HTMLAttributes<HTMLD
|
|
|
453
500
|
|
|
454
501
|
export const EditorActions = forwardRef<HTMLDivElement, IEditorActionsProps>(
|
|
455
502
|
(props: IEditorActionsProps, ref: Ref<typeof EditorActions>) => {
|
|
503
|
+
const styles_editor_actions = useDesignStyles(styles.editor_actions);
|
|
456
504
|
const { group, className } = props;
|
|
457
505
|
|
|
458
506
|
const acquireArgs = useCallback(
|
|
@@ -469,6 +517,7 @@ export const EditorActions = forwardRef<HTMLDivElement, IEditorActionsProps>(
|
|
|
469
517
|
|
|
470
518
|
const editorActionRegistry = useInjectable<IEditorActionRegistry>(IEditorActionRegistry);
|
|
471
519
|
const editorService: WorkbenchEditorServiceImpl = useInjectable(WorkbenchEditorService);
|
|
520
|
+
const appConfig = useInjectable<AppConfig>(AppConfig);
|
|
472
521
|
const menu = editorActionRegistry.getMenu(group);
|
|
473
522
|
const [hasFocus, setHasFocus] = useState<boolean>(editorService.currentEditorGroup === group);
|
|
474
523
|
const [args, setArgs] = useState<[URI, IEditorGroup, MaybeNull<URI>] | undefined>(acquireArgs());
|
|
@@ -499,8 +548,8 @@ export const EditorActions = forwardRef<HTMLDivElement, IEditorActionsProps>(
|
|
|
499
548
|
return (
|
|
500
549
|
<div
|
|
501
550
|
ref={ref}
|
|
502
|
-
className={cls(
|
|
503
|
-
style={{ height:
|
|
551
|
+
className={cls(styles_editor_actions, className)}
|
|
552
|
+
style={{ height: appConfig.layoutViewSize!.editorTabsHeight }}
|
|
504
553
|
>
|
|
505
554
|
<InlineMenuBar<URI, IEditorGroup, MaybeNull<URI>>
|
|
506
555
|
menus={menu}
|
package/src/browser/types.ts
CHANGED
|
@@ -1,29 +1,31 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
1
3
|
import {
|
|
2
|
-
MaybePromise,
|
|
3
|
-
IDisposable,
|
|
4
4
|
BasicEvent,
|
|
5
|
+
Event,
|
|
6
|
+
IDisposable,
|
|
5
7
|
IRange,
|
|
6
|
-
MaybeNull,
|
|
7
8
|
ISelection,
|
|
9
|
+
MaybeNull,
|
|
10
|
+
MaybePromise,
|
|
8
11
|
URI,
|
|
9
|
-
Event,
|
|
10
12
|
} from '@opensumi/ide-core-browser';
|
|
11
13
|
import { IContextMenu } from '@opensumi/ide-core-browser/lib/menu/next';
|
|
12
14
|
import { IThemeColor } from '@opensumi/ide-core-common';
|
|
13
15
|
import { editor } from '@opensumi/monaco-editor-core/esm/vs/editor/editor.api';
|
|
14
16
|
|
|
15
17
|
import {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
IEditorGroup,
|
|
18
|
+
DragOverPosition,
|
|
19
|
+
EditorOpenType,
|
|
19
20
|
IDecorationRenderOptions,
|
|
21
|
+
IEditor,
|
|
22
|
+
IEditorGroup,
|
|
23
|
+
IEditorOpenType,
|
|
24
|
+
IResource,
|
|
20
25
|
ITextEditorDecorationType,
|
|
21
|
-
TrackedRangeStickiness,
|
|
22
26
|
OverviewRulerLane,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
DragOverPosition,
|
|
26
|
-
EditorOpenType,
|
|
27
|
+
ResourceService,
|
|
28
|
+
TrackedRangeStickiness,
|
|
27
29
|
} from '../common';
|
|
28
30
|
|
|
29
31
|
import { IEditorDocumentModelContentRegistry } from './doc-model/types';
|
|
@@ -482,3 +484,10 @@ export class ResoucesOfActiveComponentChangedEvent extends BasicEvent<{
|
|
|
482
484
|
component: IEditorComponent;
|
|
483
485
|
resources: IResource[];
|
|
484
486
|
}> {}
|
|
487
|
+
|
|
488
|
+
export const IEditorTabService = Symbol('IEditorTabService');
|
|
489
|
+
|
|
490
|
+
export interface IEditorTabService {
|
|
491
|
+
renderEditorTab(component: ReactNode, isCurrent?: boolean): ReactNode;
|
|
492
|
+
renderTabCloseComponent(component: ReactNode): ReactNode;
|
|
493
|
+
}
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Autowired, Injectable } from '@opensumi/di';
|
|
2
2
|
import {
|
|
3
|
-
|
|
3
|
+
AppConfig,
|
|
4
|
+
CommandService,
|
|
4
5
|
Emitter,
|
|
5
6
|
Event,
|
|
6
|
-
|
|
7
|
-
WithEventBus,
|
|
7
|
+
IApplicationService,
|
|
8
8
|
IEditorDocumentChange,
|
|
9
9
|
IEditorDocumentModelSaveResult,
|
|
10
|
-
|
|
11
|
-
CommandService,
|
|
10
|
+
MessageType,
|
|
12
11
|
OperatingSystem,
|
|
13
|
-
IApplicationService,
|
|
14
12
|
PreferenceService,
|
|
13
|
+
SaveTaskResponseState,
|
|
14
|
+
Schemes,
|
|
15
|
+
URI,
|
|
16
|
+
WithEventBus,
|
|
17
|
+
formatLocalize,
|
|
15
18
|
getLanguageIdFromMonaco,
|
|
19
|
+
isWindows,
|
|
16
20
|
localize,
|
|
17
|
-
formatLocalize,
|
|
18
|
-
MessageType,
|
|
19
21
|
path,
|
|
20
|
-
isWindows,
|
|
21
|
-
SaveTaskResponseState,
|
|
22
22
|
} from '@opensumi/ide-core-browser';
|
|
23
23
|
import { EOL } from '@opensumi/ide-monaco/lib/browser/monaco-api/types';
|
|
24
24
|
import { IDialogService } from '@opensumi/ide-overlay';
|
|
25
25
|
|
|
26
26
|
import { AskSaveResult, IResource, IResourceProvider, WorkbenchEditorService } from '../common';
|
|
27
27
|
|
|
28
|
-
import {
|
|
28
|
+
import { IEditorDocumentModelContentProvider, IEditorDocumentModelService } from './doc-model/types';
|
|
29
29
|
|
|
30
30
|
@Injectable()
|
|
31
31
|
export class UntitledDocumentIdCounter {
|
|
@@ -3,7 +3,8 @@ import React from 'react';
|
|
|
3
3
|
import { URI, useInjectable } from '@opensumi/ide-core-browser';
|
|
4
4
|
|
|
5
5
|
import { EditorCollectionService, ICodeEditor } from '../../common';
|
|
6
|
-
import {
|
|
6
|
+
import { IEditorDocumentModelRef } from '../../common/editor';
|
|
7
|
+
import { IEditorDocumentModelService } from '../doc-model/types';
|
|
7
8
|
|
|
8
9
|
export interface ICodeEditorProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
9
10
|
uri?: URI;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Autowired, Injectable } from '@opensumi/di';
|
|
2
|
-
import { PreferenceService } from '@opensumi/ide-core-browser';
|
|
3
|
-
import { SuggestEvent, DisposableCollection } from '@opensumi/ide-core-browser';
|
|
2
|
+
import { DisposableCollection, PreferenceService, SuggestEvent } from '@opensumi/ide-core-browser';
|
|
4
3
|
import { IEventBus } from '@opensumi/ide-core-common';
|
|
5
4
|
import { SuggestController } from '@opensumi/monaco-editor-core/esm/vs/editor/contrib/suggest/browser/suggestController';
|
|
6
5
|
|