@opensumi/ide-editor 3.9.1-next-1749540423.0 → 3.9.1-next-1749546307.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/decoration-applier.d.ts +1 -1
- package/lib/browser/decoration-applier.d.ts.map +1 -1
- package/lib/browser/decoration-applier.js +4 -4
- package/lib/browser/decoration-applier.js.map +1 -1
- package/lib/browser/editor-collection.service.d.ts +57 -21
- package/lib/browser/editor-collection.service.d.ts.map +1 -1
- package/lib/browser/editor-collection.service.js +207 -56
- package/lib/browser/editor-collection.service.js.map +1 -1
- package/lib/browser/editor.contribution.d.ts.map +1 -1
- package/lib/browser/editor.contribution.js +0 -1
- package/lib/browser/editor.contribution.js.map +1 -1
- package/lib/browser/editor.less +0 -31
- package/lib/browser/editor.view.js +1 -1
- package/lib/browser/editor.view.js.map +1 -1
- package/lib/browser/multi-diff/multi-diff-editor.d.ts +7 -10
- package/lib/browser/multi-diff/multi-diff-editor.d.ts.map +1 -1
- package/lib/browser/multi-diff/multi-diff-editor.js +7 -62
- package/lib/browser/multi-diff/multi-diff-editor.js.map +1 -1
- package/lib/browser/multi-diff/multi-diff-resource.d.ts.map +1 -1
- package/lib/browser/multi-diff/multi-diff-resource.js.map +1 -1
- package/lib/browser/workbench-editor.service.js +1 -1
- package/lib/browser/workbench-editor.service.js.map +1 -1
- package/lib/common/editor.d.ts +0 -11
- package/lib/common/editor.d.ts.map +1 -1
- package/lib/common/editor.js.map +1 -1
- package/lib/common/multi-diff.d.ts +1 -6
- package/lib/common/multi-diff.d.ts.map +1 -1
- package/lib/common/multi-diff.js.map +1 -1
- package/package.json +14 -14
- package/src/browser/decoration-applier.ts +8 -12
- package/src/browser/editor-collection.service.ts +264 -65
- package/src/browser/editor.contribution.ts +0 -2
- package/src/browser/editor.less +0 -31
- package/src/browser/editor.view.tsx +1 -1
- package/src/browser/multi-diff/multi-diff-editor.ts +10 -97
- package/src/browser/multi-diff/multi-diff-resource.ts +1 -0
- package/src/browser/workbench-editor.service.ts +1 -1
- package/src/common/editor.ts +0 -14
- package/src/common/multi-diff.ts +1 -8
- package/lib/browser/base-editor-wrapper.d.ts +0 -63
- package/lib/browser/base-editor-wrapper.d.ts.map +0 -1
- package/lib/browser/base-editor-wrapper.js +0 -224
- package/lib/browser/base-editor-wrapper.js.map +0 -1
- package/src/browser/base-editor-wrapper.ts +0 -279
|
@@ -1246,7 +1246,6 @@ export class EditorContribution
|
|
|
1246
1246
|
title: string;
|
|
1247
1247
|
multiDiffSourceUri: UriComponents;
|
|
1248
1248
|
resources: { originalUri?: UriComponents; modifiedUri?: UriComponents }[];
|
|
1249
|
-
editorOptions?: IResourceOpenOptions;
|
|
1250
1249
|
}) => {
|
|
1251
1250
|
const sources: MultiDiffEditorItem[] = [];
|
|
1252
1251
|
for (const { originalUri, modifiedUri } of options.resources) {
|
|
@@ -1263,7 +1262,6 @@ export class EditorContribution
|
|
|
1263
1262
|
this.multiDiffResolver.registerSources(multiDiffSourceUri, sources);
|
|
1264
1263
|
await this.workbenchEditorService.open(multiDiffSourceUri, {
|
|
1265
1264
|
label: options.title,
|
|
1266
|
-
...options.editorOptions,
|
|
1267
1265
|
});
|
|
1268
1266
|
},
|
|
1269
1267
|
},
|
package/src/browser/editor.less
CHANGED
|
@@ -20,34 +20,3 @@
|
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
|
|
24
|
-
.monaco-component.multiDiffEditor {
|
|
25
|
-
& .multiDiffEntry {
|
|
26
|
-
& .header {
|
|
27
|
-
margin-top: 8px;
|
|
28
|
-
.header-content {
|
|
29
|
-
margin-top: 0;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
.status {
|
|
33
|
-
&:empty {
|
|
34
|
-
&::before {
|
|
35
|
-
content: 'M';
|
|
36
|
-
}
|
|
37
|
-
color: var(--gitDecoration-modifiedResourceForeground);
|
|
38
|
-
}
|
|
39
|
-
&.added {
|
|
40
|
-
color: var(--gitDecoration-addedResourceForeground);
|
|
41
|
-
}
|
|
42
|
-
&.deleted {
|
|
43
|
-
color: var(--gitDecoration-deletedResourceForeground);
|
|
44
|
-
}
|
|
45
|
-
&.renamed {
|
|
46
|
-
color: var(--gitDecoration-renamedResourceForeground);
|
|
47
|
-
}
|
|
48
|
-
&.modified {
|
|
49
|
-
color: var(--gitDecoration-modifiedResourceForeground);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
@@ -1,18 +1,7 @@
|
|
|
1
1
|
import { Autowired, INJECTOR_TOKEN, Injectable, Injector } from '@opensumi/di';
|
|
2
2
|
import { PreferenceService } from '@opensumi/ide-core-browser';
|
|
3
|
+
import { DisposableStore, Emitter, IDisposable, ILogger, OnEvent, URI, WithEventBus } from '@opensumi/ide-core-common';
|
|
3
4
|
import {
|
|
4
|
-
DisposableStore,
|
|
5
|
-
Emitter,
|
|
6
|
-
Event,
|
|
7
|
-
IDisposable,
|
|
8
|
-
ILogger,
|
|
9
|
-
OnEvent,
|
|
10
|
-
URI,
|
|
11
|
-
WithEventBus,
|
|
12
|
-
isString,
|
|
13
|
-
} from '@opensumi/ide-core-common';
|
|
14
|
-
import {
|
|
15
|
-
ISettableObservable,
|
|
16
5
|
ValueWithChangeEventFromObservable,
|
|
17
6
|
constObservable,
|
|
18
7
|
derived,
|
|
@@ -36,14 +25,11 @@ import { IMultiDiffResourceId } from '@opensumi/monaco-editor-core/esm/vs/editor
|
|
|
36
25
|
import { Range } from '@opensumi/monaco-editor-core/esm/vs/editor/common/core/range';
|
|
37
26
|
import { IDiffEditor } from '@opensumi/monaco-editor-core/esm/vs/editor/common/editorCommon';
|
|
38
27
|
|
|
39
|
-
import {
|
|
28
|
+
import { IEditorDocumentModelRef, IResourceOpenOptions } from '../../common/editor';
|
|
40
29
|
import { IMultiDiffEditor, IMultiDiffSourceResolverService, IResolvedMultiDiffSource } from '../../common/multi-diff';
|
|
41
|
-
import { DiffEditorPart } from '../base-editor-wrapper';
|
|
42
30
|
import { EditorDocumentModelContentChangedEvent, IEditorDocumentModelService } from '../doc-model/types';
|
|
43
31
|
import { IConvertedMonacoOptions, IResource, ResourceDecorationNeedChangeEvent } from '../types';
|
|
44
32
|
|
|
45
|
-
import type { EditorCollectionServiceImpl } from '../editor-collection.service';
|
|
46
|
-
|
|
47
33
|
@Injectable({ multiple: true })
|
|
48
34
|
export class BrowserMultiDiffEditor extends WithEventBus implements IMultiDiffEditor {
|
|
49
35
|
@Autowired(INJECTOR_TOKEN)
|
|
@@ -53,7 +39,7 @@ export class BrowserMultiDiffEditor extends WithEventBus implements IMultiDiffEd
|
|
|
53
39
|
private readonly messageService: IMessageService;
|
|
54
40
|
|
|
55
41
|
@Autowired(IEditorDocumentModelService)
|
|
56
|
-
|
|
42
|
+
documentModelManager: IEditorDocumentModelService;
|
|
57
43
|
|
|
58
44
|
@Autowired(PreferenceService)
|
|
59
45
|
private readonly preferenceService: PreferenceService;
|
|
@@ -72,13 +58,8 @@ export class BrowserMultiDiffEditor extends WithEventBus implements IMultiDiffEd
|
|
|
72
58
|
|
|
73
59
|
private multiDiffModel: IMultiDiffEditorModel & IDisposable;
|
|
74
60
|
|
|
75
|
-
constructor(
|
|
76
|
-
public readonly multiDiffWidget: MultiDiffEditorWidget,
|
|
77
|
-
private convertedOptions: IConvertedMonacoOptions,
|
|
78
|
-
private editorCollectionService: EditorCollectionServiceImpl,
|
|
79
|
-
) {
|
|
61
|
+
constructor(private multiDiffWidget: MultiDiffEditorWidget, private convertedOptions: IConvertedMonacoOptions) {
|
|
80
62
|
super();
|
|
81
|
-
this.editorCollectionService.addMultiDiffEditors([this]);
|
|
82
63
|
}
|
|
83
64
|
|
|
84
65
|
@OnEvent(EditorDocumentModelContentChangedEvent)
|
|
@@ -128,36 +109,7 @@ export class BrowserMultiDiffEditor extends WithEventBus implements IMultiDiffEd
|
|
|
128
109
|
}
|
|
129
110
|
}
|
|
130
111
|
|
|
131
|
-
|
|
132
|
-
modifiedEditor: { editor: ICodeEditor } | undefined,
|
|
133
|
-
originalEditor: { editor: ICodeEditor } | undefined,
|
|
134
|
-
modifiedInstance: any,
|
|
135
|
-
originalInstance: any,
|
|
136
|
-
documents: ISettableObservable<readonly RefCounted<IDocumentDiffItem>[] | 'loading', void>,
|
|
137
|
-
): void {
|
|
138
|
-
const editors: DiffEditorPart[] = [];
|
|
139
|
-
if (modifiedEditor) {
|
|
140
|
-
const modifiedDiffEditorPart = this.injector.get(DiffEditorPart, [
|
|
141
|
-
modifiedEditor.editor,
|
|
142
|
-
() => modifiedInstance,
|
|
143
|
-
EditorType.MODIFIED_DIFF,
|
|
144
|
-
documents,
|
|
145
|
-
]);
|
|
146
|
-
editors.push(modifiedDiffEditorPart);
|
|
147
|
-
}
|
|
148
|
-
if (originalEditor) {
|
|
149
|
-
const originalDiffEditorPart = this.injector.get(DiffEditorPart, [
|
|
150
|
-
originalEditor.editor,
|
|
151
|
-
() => originalInstance,
|
|
152
|
-
EditorType.ORIGINAL_DIFF,
|
|
153
|
-
documents,
|
|
154
|
-
]);
|
|
155
|
-
editors.push(originalDiffEditorPart);
|
|
156
|
-
}
|
|
157
|
-
this.editorCollectionService.addEditors(editors);
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
async compareMultiple(editor: IMultiDiffEditor, resource: IResource, options?: IResourceOpenOptions): Promise<void> {
|
|
112
|
+
async compareMultiple(resource: IResource, options?: IResourceOpenOptions): Promise<void> {
|
|
161
113
|
// Save current view state before changing
|
|
162
114
|
if (this.currentUri) {
|
|
163
115
|
this.saveViewState(this.currentUri);
|
|
@@ -172,10 +124,12 @@ export class BrowserMultiDiffEditor extends WithEventBus implements IMultiDiffEd
|
|
|
172
124
|
this,
|
|
173
125
|
resources,
|
|
174
126
|
async (r, store) => {
|
|
127
|
+
/** @description documentsWithPromises */
|
|
175
128
|
let original: IEditorDocumentModelRef | undefined;
|
|
176
129
|
let modified: IEditorDocumentModelRef | undefined;
|
|
177
130
|
|
|
178
131
|
const multiDiffItemStore = new DisposableStore();
|
|
132
|
+
|
|
179
133
|
try {
|
|
180
134
|
[original, modified] = await Promise.all([
|
|
181
135
|
r.originalUri ? this.documentModelManager.createModelReference(r.originalUri) : undefined,
|
|
@@ -198,11 +152,9 @@ export class BrowserMultiDiffEditor extends WithEventBus implements IMultiDiffEd
|
|
|
198
152
|
multiDiffEditorItem: r,
|
|
199
153
|
original: original?.instance.getMonacoModel(),
|
|
200
154
|
modified: modified?.instance.getMonacoModel(),
|
|
201
|
-
originalInstance: original?.instance,
|
|
202
|
-
modifiedInstance: modified?.instance,
|
|
203
155
|
contextKeys: r.contextKeys,
|
|
204
156
|
options: {
|
|
205
|
-
readOnly:
|
|
157
|
+
readOnly: modified?.instance.readonly,
|
|
206
158
|
// TODO: codelens,wordWrap options
|
|
207
159
|
...this.convertedOptions.diffOptions,
|
|
208
160
|
},
|
|
@@ -222,6 +174,7 @@ export class BrowserMultiDiffEditor extends WithEventBus implements IMultiDiffEd
|
|
|
222
174
|
const documents = observableValue<readonly RefCounted<IDocumentDiffItem>[] | 'loading'>('documents', 'loading');
|
|
223
175
|
|
|
224
176
|
const updateDocuments = derived(async (reader) => {
|
|
177
|
+
/** @description Update documents */
|
|
225
178
|
const docsPromises = documentsWithPromises.read(reader);
|
|
226
179
|
const docs = await Promise.all(docsPromises);
|
|
227
180
|
const newDocuments = docs.filter((item) => item !== undefined);
|
|
@@ -240,51 +193,11 @@ export class BrowserMultiDiffEditor extends WithEventBus implements IMultiDiffEd
|
|
|
240
193
|
const viewModel = this.multiDiffWidget.createViewModel(this.multiDiffModel);
|
|
241
194
|
await viewModel.waitForDiffs();
|
|
242
195
|
this.multiDiffWidget.setViewModel(viewModel);
|
|
243
|
-
this.multiDiffWidget.getActiveControl();
|
|
244
196
|
|
|
245
197
|
// Update current URI and restore view state
|
|
246
198
|
this.currentUri = resource.uri;
|
|
247
199
|
this.restoreViewState(resource.uri);
|
|
248
|
-
|
|
249
|
-
for (const ref of documentRefs) {
|
|
250
|
-
if (isString(ref)) {
|
|
251
|
-
continue;
|
|
252
|
-
}
|
|
253
|
-
const modified = ref.object.modified;
|
|
254
|
-
const original = ref.object.original;
|
|
255
|
-
if (!modified && !original) {
|
|
256
|
-
continue;
|
|
257
|
-
}
|
|
258
|
-
let modifiedEditor = modified ? this.multiDiffWidget.tryGetCodeEditor(modified.uri) : undefined;
|
|
259
|
-
let originalEditor = original ? this.multiDiffWidget.tryGetCodeEditor(original.uri) : undefined;
|
|
260
|
-
if (!modifiedEditor && !originalEditor) {
|
|
261
|
-
const editor = modified || original;
|
|
262
|
-
if (!editor) {
|
|
263
|
-
continue;
|
|
264
|
-
}
|
|
265
|
-
Event.once(editor.onDidChangeAttached)(() => {
|
|
266
|
-
setTimeout(() => {
|
|
267
|
-
modifiedEditor = modified ? this.multiDiffWidget.tryGetCodeEditor(modified.uri) : undefined;
|
|
268
|
-
originalEditor = original ? this.multiDiffWidget.tryGetCodeEditor(original.uri) : undefined;
|
|
269
|
-
this.createAndRegisterEditorParts(
|
|
270
|
-
modifiedEditor,
|
|
271
|
-
originalEditor,
|
|
272
|
-
(ref.object as any).modifiedInstance,
|
|
273
|
-
(ref.object as any).originalInstance,
|
|
274
|
-
documents,
|
|
275
|
-
);
|
|
276
|
-
}, 0);
|
|
277
|
-
});
|
|
278
|
-
continue;
|
|
279
|
-
}
|
|
280
|
-
this.createAndRegisterEditorParts(
|
|
281
|
-
modifiedEditor,
|
|
282
|
-
originalEditor,
|
|
283
|
-
(ref.object as any).modifiedInstance,
|
|
284
|
-
(ref.object as any).originalInstance,
|
|
285
|
-
documents,
|
|
286
|
-
);
|
|
287
|
-
}
|
|
200
|
+
|
|
288
201
|
this.multiDiffModelChangeEmitter.fire(this.multiDiffModel);
|
|
289
202
|
}
|
|
290
203
|
|
|
@@ -40,6 +40,7 @@ export class MultiDiffResourceProvider extends WithEventBus implements IResource
|
|
|
40
40
|
// Get icon from the first modified file
|
|
41
41
|
const firstModifiedUri = parsedSources.length > 0 ? new URI(parsedSources[0].modifiedUri) : undefined;
|
|
42
42
|
const icon = firstModifiedUri ? this.labelService.getIcon(firstModifiedUri) : undefined;
|
|
43
|
+
|
|
43
44
|
return {
|
|
44
45
|
name: `Multi-Diff: ${name || parsedSources.length + ' files'}`,
|
|
45
46
|
icon: icon || getIcon('diff'),
|
|
@@ -2498,7 +2498,7 @@ export class EditorGroup extends WithEventBus implements IGridEditorGroup {
|
|
|
2498
2498
|
});
|
|
2499
2499
|
}
|
|
2500
2500
|
|
|
2501
|
-
await this.multiDiffEditor.compareMultiple(
|
|
2501
|
+
await this.multiDiffEditor.compareMultiple(resource, options);
|
|
2502
2502
|
}
|
|
2503
2503
|
}
|
|
2504
2504
|
|
package/src/common/editor.ts
CHANGED
|
@@ -209,11 +209,6 @@ export enum EditorType {
|
|
|
209
209
|
MERGE_EDITOR_DIFF = 'MERGE_EDITOR_DIFF',
|
|
210
210
|
}
|
|
211
211
|
|
|
212
|
-
export interface IEditorDecorationApplier {
|
|
213
|
-
clearDecorations(): void;
|
|
214
|
-
applyDecorationFromProvider(): void;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
212
|
/**
|
|
218
213
|
* 一个 IEditor 代表了一个最小的编辑器单元,可以是 CodeEditor 中的一个,也可以是 DiffEditor 中的两个
|
|
219
214
|
*/
|
|
@@ -239,11 +234,6 @@ export interface IEditor {
|
|
|
239
234
|
*/
|
|
240
235
|
currentUri: URI | null;
|
|
241
236
|
|
|
242
|
-
/**
|
|
243
|
-
* 装饰器应用器
|
|
244
|
-
*/
|
|
245
|
-
decorationApplier: IEditorDecorationApplier;
|
|
246
|
-
|
|
247
237
|
/**
|
|
248
238
|
* 插入代码片段
|
|
249
239
|
* @param template
|
|
@@ -285,8 +275,6 @@ export interface IEditor {
|
|
|
285
275
|
onFocus: Event<void>;
|
|
286
276
|
|
|
287
277
|
onBlur: Event<void>;
|
|
288
|
-
|
|
289
|
-
updateDocumentModel?: (uri: URI) => void;
|
|
290
278
|
}
|
|
291
279
|
|
|
292
280
|
export interface IUndoStopOptions {
|
|
@@ -379,11 +367,9 @@ export abstract class EditorCollectionService {
|
|
|
379
367
|
public abstract getEditorByUri(uri: URI): IEditor | undefined;
|
|
380
368
|
|
|
381
369
|
public abstract listDiffEditors(): IDiffEditor[];
|
|
382
|
-
public abstract listMultiDiffEditors(): IMultiDiffEditor[];
|
|
383
370
|
|
|
384
371
|
public abstract onCodeEditorCreate: Event<ICodeEditor>;
|
|
385
372
|
public abstract onDiffEditorCreate: Event<IDiffEditor>;
|
|
386
|
-
public abstract onMultiDiffEditorCreate: Event<IMultiDiffEditor>;
|
|
387
373
|
}
|
|
388
374
|
|
|
389
375
|
export type IOpenResourceResult = { group: IEditorGroup; resource: IResource } | false;
|
package/src/common/multi-diff.ts
CHANGED
|
@@ -10,8 +10,6 @@ import {
|
|
|
10
10
|
import { IResourceOpenOptions } from './editor';
|
|
11
11
|
import { IResource } from './resource';
|
|
12
12
|
|
|
13
|
-
import type { MultiDiffEditorWidget } from '@opensumi/monaco-editor-core/esm/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidget';
|
|
14
|
-
|
|
15
13
|
export const MULTI_DIFF_SCHEME = 'multi-diff-editor';
|
|
16
14
|
|
|
17
15
|
export const IMultiDiffSourceResolverService = Symbol('IMultiDiffSourceResolverService');
|
|
@@ -60,7 +58,7 @@ export interface IMultiDiffEditor extends IDisposable {
|
|
|
60
58
|
/**
|
|
61
59
|
* Compare multiple file pairs
|
|
62
60
|
*/
|
|
63
|
-
compareMultiple(
|
|
61
|
+
compareMultiple(resource: IResource, options?: IResourceOpenOptions): Promise<void>;
|
|
64
62
|
|
|
65
63
|
/**
|
|
66
64
|
* Get all file pairs currently being compared
|
|
@@ -96,9 +94,4 @@ export interface IMultiDiffEditor extends IDisposable {
|
|
|
96
94
|
* Expand all files
|
|
97
95
|
*/
|
|
98
96
|
expandAll(): void;
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Get the multi-diff editor widget
|
|
102
|
-
*/
|
|
103
|
-
multiDiffWidget: MultiDiffEditorWidget;
|
|
104
97
|
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { IRange } from '@opensumi/ide-core-browser';
|
|
2
|
-
import { Disposable, URI, WithEventBus } from '@opensumi/ide-core-common';
|
|
3
|
-
import * as monaco from '@opensumi/ide-monaco';
|
|
4
|
-
import { ISettableObservable } from '@opensumi/ide-monaco/lib/common/observable';
|
|
5
|
-
import { RefCounted } from '@opensumi/monaco-editor-core/esm/vs/editor/browser/widget/diffEditor/utils';
|
|
6
|
-
import { IDocumentDiffItem } from '@opensumi/monaco-editor-core/esm/vs/editor/browser/widget/multiDiffEditor/model';
|
|
7
|
-
import { IConfigurationService } from '@opensumi/monaco-editor-core/esm/vs/platform/configuration/common/configuration';
|
|
8
|
-
import { EditorType, IDecorationApplyOptions, IEditor, IUndoStopOptions } from '../common';
|
|
9
|
-
import { IEditorDocumentModel } from '../common/editor';
|
|
10
|
-
import { MonacoEditorDecorationApplier } from './decoration-applier';
|
|
11
|
-
import { IEditorFeatureRegistry } from './types';
|
|
12
|
-
import type { ICodeEditor as IMonacoCodeEditor } from '@opensumi/ide-monaco/lib/browser/monaco-api/types';
|
|
13
|
-
export type ISumiEditor = IEditor;
|
|
14
|
-
export declare function insertSnippetWithMonacoEditor(editor: IMonacoCodeEditor, template: string, ranges: IRange[], opts: IUndoStopOptions): void;
|
|
15
|
-
export declare abstract class BaseMonacoEditorWrapper extends WithEventBus implements IEditor {
|
|
16
|
-
readonly monacoEditor: IMonacoCodeEditor;
|
|
17
|
-
private type;
|
|
18
|
-
abstract readonly currentDocumentModel: IEditorDocumentModel | null;
|
|
19
|
-
get currentUri(): URI | null;
|
|
20
|
-
getId(): string;
|
|
21
|
-
getSelections(): monaco.Selection[];
|
|
22
|
-
onFocus: monaco.Event<void>;
|
|
23
|
-
onBlur: monaco.Event<void>;
|
|
24
|
-
protected _specialEditorOptions: any;
|
|
25
|
-
protected _specialModelOptions: monaco.editor.ITextModelUpdateOptions;
|
|
26
|
-
protected _editorOptionsFromContribution: any;
|
|
27
|
-
protected readonly editorFeatureRegistry: IEditorFeatureRegistry;
|
|
28
|
-
protected readonly configurationService: IConfigurationService;
|
|
29
|
-
readonly decorationApplier: MonacoEditorDecorationApplier;
|
|
30
|
-
private _disableSelectionEmitter;
|
|
31
|
-
protected disableSelectionEmitter(): void;
|
|
32
|
-
protected enableSelectionEmitter(): void;
|
|
33
|
-
private injector;
|
|
34
|
-
constructor(monacoEditor: IMonacoCodeEditor, type: EditorType);
|
|
35
|
-
private onDidChangeModel;
|
|
36
|
-
getType(): EditorType;
|
|
37
|
-
updateOptions(editorOptions?: monaco.editor.IEditorOptions, modelOptions?: monaco.editor.ITextModelUpdateOptions): void;
|
|
38
|
-
private _doUpdateOptions;
|
|
39
|
-
/**
|
|
40
|
-
* 合并所有的选项
|
|
41
|
-
* 优先关系: (从高到底)
|
|
42
|
-
* 1. 当前编辑器的特殊选项(通过调用 updateOptions或者启动时传入)
|
|
43
|
-
* 2. 来自 featureRegistry 的根据 当前uri 提供的选项
|
|
44
|
-
* 3. 来自偏好设置的选项
|
|
45
|
-
*/
|
|
46
|
-
private _calculateFinalOptions;
|
|
47
|
-
insertSnippet(template: string, ranges: IRange[], opts: IUndoStopOptions): void;
|
|
48
|
-
applyDecoration(key: string, options: IDecorationApplyOptions[]): void;
|
|
49
|
-
onSelectionsChanged(listener: any): import("@opensumi/monaco-editor-core/esm/vs/base/common/lifecycle").IDisposable;
|
|
50
|
-
onVisibleRangesChanged(listener: any): Disposable;
|
|
51
|
-
setSelections(selections: any): void;
|
|
52
|
-
setSelection(selection: any): void;
|
|
53
|
-
save(): Promise<void>;
|
|
54
|
-
onConfigurationChanged(listener: any): import("@opensumi/monaco-editor-core/esm/vs/base/common/lifecycle").IDisposable;
|
|
55
|
-
}
|
|
56
|
-
export declare class DiffEditorPart extends BaseMonacoEditorWrapper implements IEditor {
|
|
57
|
-
_getDocumentModel: () => IEditorDocumentModel | null;
|
|
58
|
-
private documents;
|
|
59
|
-
get currentDocumentModel(): IEditorDocumentModel | null;
|
|
60
|
-
updateDocumentModel(uri: URI): void;
|
|
61
|
-
constructor(monacoEditor: IMonacoCodeEditor, _getDocumentModel: () => IEditorDocumentModel | null, type: EditorType, documents: ISettableObservable<readonly RefCounted<IDocumentDiffItem>[] | 'loading', void>);
|
|
62
|
-
}
|
|
63
|
-
//# sourceMappingURL=base-editor-wrapper.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base-editor-wrapper.d.ts","sourceRoot":"","sources":["../../src/browser/base-editor-wrapper.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,UAAU,EAAc,GAAG,EAAE,YAAY,EAA0B,MAAM,2BAA2B,CAAC;AAC9G,OAAO,KAAK,MAAM,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AACjF,OAAO,EAAE,UAAU,EAAE,MAAM,4EAA4E,CAAC;AACxG,OAAO,EAAE,iBAAiB,EAAE,MAAM,iFAAiF,CAAC;AACpH,OAAO,EAAE,qBAAqB,EAAE,MAAM,iFAAiF,CAAC;AAExH,OAAO,EAAE,UAAU,EAAE,uBAAuB,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC3F,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAExD,OAAO,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAErE,OAAO,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAEjD,OAAO,KAAK,EAAE,WAAW,IAAI,iBAAiB,EAAE,MAAM,mDAAmD,CAAC;AAE1G,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC;AAElC,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,iBAAiB,EACzB,QAAQ,EAAE,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mBAAmB,CAAC,QAAQ,KAAA;IAW5B,sBAAsB,CAAC,QAAQ,KAAA;IAgB/B,aAAa,CAAC,UAAU,KAAA;IAIxB,YAAY,CAAC,SAAS,KAAA;IAIT,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAMlC,sBAAsB,CAAC,QAAQ,KAAA;CAMhC;AACD,qBACa,cAAe,SAAQ,uBAAwB,YAAW,OAAO;IA4BnE,iBAAiB,EAAE,MAAM,oBAAoB,GAAG,IAAI;IAE3D,OAAO,CAAC,SAAS;IA7BnB,IAAI,oBAAoB,gCAEvB;IAEM,mBAAmB,CAAC,GAAG,EAAE,GAAG;gBAsBjC,YAAY,EAAE,iBAAiB,EACxB,iBAAiB,EAAE,MAAM,oBAAoB,GAAG,IAAI,EAC3D,IAAI,EAAE,UAAU,EACR,SAAS,EAAE,mBAAmB,CAAC,SAAS,UAAU,CAAC,iBAAiB,CAAC,EAAE,GAAG,SAAS,EAAE,IAAI,CAAC;CAIrG"}
|
|
@@ -1,224 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DiffEditorPart = exports.BaseMonacoEditorWrapper = void 0;
|
|
4
|
-
exports.insertSnippetWithMonacoEditor = insertSnippetWithMonacoEditor;
|
|
5
|
-
const tslib_1 = require("tslib");
|
|
6
|
-
const di_1 = require("@opensumi/di");
|
|
7
|
-
const ide_core_common_1 = require("@opensumi/ide-core-common");
|
|
8
|
-
const monaco = tslib_1.__importStar(require("@opensumi/ide-monaco"));
|
|
9
|
-
const configuration_1 = require("@opensumi/monaco-editor-core/esm/vs/platform/configuration/common/configuration");
|
|
10
|
-
const common_1 = require("../common");
|
|
11
|
-
const decoration_applier_1 = require("./decoration-applier");
|
|
12
|
-
const converter_1 = require("./preference/converter");
|
|
13
|
-
const types_1 = require("./types");
|
|
14
|
-
function insertSnippetWithMonacoEditor(editor, template, ranges, opts) {
|
|
15
|
-
const snippetController = editor.getContribution('snippetController2');
|
|
16
|
-
const selections = ranges.map((r) => new monaco.Selection(r.startLineNumber, r.startColumn, r.endLineNumber, r.endColumn));
|
|
17
|
-
editor.setSelections(selections);
|
|
18
|
-
editor.focus();
|
|
19
|
-
snippetController.insert(template, 0, 0, opts.undoStopBefore, opts.undoStopAfter);
|
|
20
|
-
}
|
|
21
|
-
const { removeUndefined } = ide_core_common_1.objects;
|
|
22
|
-
function updateOptionsWithMonacoEditor(monacoEditor, editorOptions, modelOptions) {
|
|
23
|
-
monacoEditor.updateOptions(editorOptions);
|
|
24
|
-
if (monacoEditor.getModel()) {
|
|
25
|
-
monacoEditor.getModel().updateOptions(modelOptions);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
let BaseMonacoEditorWrapper = class BaseMonacoEditorWrapper extends ide_core_common_1.WithEventBus {
|
|
29
|
-
get currentUri() {
|
|
30
|
-
return this.currentDocumentModel ? this.currentDocumentModel.uri : null;
|
|
31
|
-
}
|
|
32
|
-
getId() {
|
|
33
|
-
return this.monacoEditor.getId();
|
|
34
|
-
}
|
|
35
|
-
getSelections() {
|
|
36
|
-
return this.monacoEditor.getSelections() || [];
|
|
37
|
-
}
|
|
38
|
-
disableSelectionEmitter() {
|
|
39
|
-
this._disableSelectionEmitter = true;
|
|
40
|
-
}
|
|
41
|
-
enableSelectionEmitter() {
|
|
42
|
-
this._disableSelectionEmitter = false;
|
|
43
|
-
}
|
|
44
|
-
constructor(monacoEditor, type) {
|
|
45
|
-
super();
|
|
46
|
-
this.monacoEditor = monacoEditor;
|
|
47
|
-
this.type = type;
|
|
48
|
-
this.onFocus = this.monacoEditor.onDidFocusEditorWidget;
|
|
49
|
-
this.onBlur = this.monacoEditor.onDidBlurEditorWidget;
|
|
50
|
-
this._specialEditorOptions = {};
|
|
51
|
-
this._specialModelOptions = {};
|
|
52
|
-
this._editorOptionsFromContribution = {};
|
|
53
|
-
this._disableSelectionEmitter = false;
|
|
54
|
-
this.decorationApplier = this.injector.get(decoration_applier_1.MonacoEditorDecorationApplier, [this.monacoEditor]);
|
|
55
|
-
this.addDispose(this.monacoEditor.onDidChangeModel(this.onDidChangeModel.bind(this)));
|
|
56
|
-
this.addDispose(this.monacoEditor.onDidChangeModelLanguage(() => {
|
|
57
|
-
this._doUpdateOptions();
|
|
58
|
-
}));
|
|
59
|
-
this.addDispose(this.configurationService.onDidChangeConfiguration((e) => {
|
|
60
|
-
const changedEditorKeys = Array.from(e.affectedKeys.values()).filter((key) => (0, converter_1.isEditorOption)(key));
|
|
61
|
-
if (changedEditorKeys.length > 0) {
|
|
62
|
-
this._doUpdateOptions();
|
|
63
|
-
}
|
|
64
|
-
}));
|
|
65
|
-
}
|
|
66
|
-
async onDidChangeModel() {
|
|
67
|
-
this._editorOptionsFromContribution = {};
|
|
68
|
-
const uri = this.currentUri;
|
|
69
|
-
if (uri) {
|
|
70
|
-
Promise.resolve(this.editorFeatureRegistry.runProvideEditorOptionsForUri(uri)).then((options) => {
|
|
71
|
-
if (!this.currentUri || !uri.isEqual(this.currentUri)) {
|
|
72
|
-
return; // uri可能已经变了
|
|
73
|
-
}
|
|
74
|
-
if (options && Object.keys(options).length > 0) {
|
|
75
|
-
this._editorOptionsFromContribution = options;
|
|
76
|
-
if (!(0, ide_core_common_1.isEmptyObject)(this._editorOptionsFromContribution)) {
|
|
77
|
-
this._doUpdateOptions();
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
getType() {
|
|
84
|
-
return this.type;
|
|
85
|
-
}
|
|
86
|
-
updateOptions(editorOptions = {}, modelOptions = {}) {
|
|
87
|
-
this._specialEditorOptions = removeUndefined({ ...this._specialEditorOptions, ...editorOptions });
|
|
88
|
-
this._specialModelOptions = removeUndefined({ ...this._specialModelOptions, ...modelOptions });
|
|
89
|
-
this._doUpdateOptions();
|
|
90
|
-
}
|
|
91
|
-
_doUpdateOptions() {
|
|
92
|
-
const { editorOptions, modelOptions } = this._calculateFinalOptions();
|
|
93
|
-
updateOptionsWithMonacoEditor(this.monacoEditor, editorOptions, modelOptions);
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* 合并所有的选项
|
|
97
|
-
* 优先关系: (从高到底)
|
|
98
|
-
* 1. 当前编辑器的特殊选项(通过调用 updateOptions或者启动时传入)
|
|
99
|
-
* 2. 来自 featureRegistry 的根据 当前uri 提供的选项
|
|
100
|
-
* 3. 来自偏好设置的选项
|
|
101
|
-
*/
|
|
102
|
-
_calculateFinalOptions() {
|
|
103
|
-
var _a;
|
|
104
|
-
const uriStr = this.currentUri ? this.currentUri.toString() : undefined;
|
|
105
|
-
const languageId = this.currentDocumentModel ? this.currentDocumentModel.languageId : undefined;
|
|
106
|
-
const options = (0, converter_1.getConvertedMonacoOptions)(this.configurationService, uriStr, languageId, undefined);
|
|
107
|
-
const basicEditorOptions = {
|
|
108
|
-
readOnly: ((_a = this.currentDocumentModel) === null || _a === void 0 ? void 0 : _a.readonly) || false,
|
|
109
|
-
};
|
|
110
|
-
let editorOptions = {
|
|
111
|
-
...basicEditorOptions,
|
|
112
|
-
...options.editorOptions,
|
|
113
|
-
...this._editorOptionsFromContribution,
|
|
114
|
-
...this._specialEditorOptions,
|
|
115
|
-
};
|
|
116
|
-
if (this.type !== common_1.EditorType.CODE) {
|
|
117
|
-
editorOptions = {
|
|
118
|
-
...editorOptions,
|
|
119
|
-
...options.diffOptions,
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
return {
|
|
123
|
-
editorOptions,
|
|
124
|
-
modelOptions: { ...options.modelOptions, ...this._specialModelOptions },
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
insertSnippet(template, ranges, opts) {
|
|
128
|
-
insertSnippetWithMonacoEditor(this.monacoEditor, template, ranges, opts);
|
|
129
|
-
}
|
|
130
|
-
applyDecoration(key, options) {
|
|
131
|
-
this.decorationApplier.applyDecoration(key, options);
|
|
132
|
-
}
|
|
133
|
-
onSelectionsChanged(listener) {
|
|
134
|
-
return this.monacoEditor.onDidChangeCursorSelection((e) => {
|
|
135
|
-
if (!this._disableSelectionEmitter) {
|
|
136
|
-
listener({
|
|
137
|
-
selections: this.getSelections(),
|
|
138
|
-
source: e.source,
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
|
-
});
|
|
142
|
-
}
|
|
143
|
-
onVisibleRangesChanged(listener) {
|
|
144
|
-
const disposer = new ide_core_common_1.Disposable();
|
|
145
|
-
const monacoEditor = this.monacoEditor;
|
|
146
|
-
disposer.addDispose(monacoEditor.onDidScrollChange((e) => {
|
|
147
|
-
listener(this.monacoEditor.getVisibleRanges());
|
|
148
|
-
}));
|
|
149
|
-
disposer.addDispose(monacoEditor.onDidLayoutChange((e) => {
|
|
150
|
-
listener(this.monacoEditor.getVisibleRanges());
|
|
151
|
-
}));
|
|
152
|
-
return disposer;
|
|
153
|
-
}
|
|
154
|
-
setSelections(selections) {
|
|
155
|
-
return this.monacoEditor.setSelections(selections);
|
|
156
|
-
}
|
|
157
|
-
setSelection(selection) {
|
|
158
|
-
return this.monacoEditor.setSelection(selection);
|
|
159
|
-
}
|
|
160
|
-
async save() {
|
|
161
|
-
if (this.currentDocumentModel) {
|
|
162
|
-
await this.currentDocumentModel.save();
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
onConfigurationChanged(listener) {
|
|
166
|
-
const monacoEditor = this.monacoEditor;
|
|
167
|
-
return monacoEditor.onDidChangeConfiguration((e) => {
|
|
168
|
-
listener();
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
};
|
|
172
|
-
exports.BaseMonacoEditorWrapper = BaseMonacoEditorWrapper;
|
|
173
|
-
tslib_1.__decorate([
|
|
174
|
-
(0, di_1.Autowired)(types_1.IEditorFeatureRegistry),
|
|
175
|
-
tslib_1.__metadata("design:type", Object)
|
|
176
|
-
], BaseMonacoEditorWrapper.prototype, "editorFeatureRegistry", void 0);
|
|
177
|
-
tslib_1.__decorate([
|
|
178
|
-
(0, di_1.Autowired)(configuration_1.IConfigurationService),
|
|
179
|
-
tslib_1.__metadata("design:type", Object)
|
|
180
|
-
], BaseMonacoEditorWrapper.prototype, "configurationService", void 0);
|
|
181
|
-
tslib_1.__decorate([
|
|
182
|
-
(0, di_1.Autowired)(di_1.INJECTOR_TOKEN),
|
|
183
|
-
tslib_1.__metadata("design:type", di_1.Injector)
|
|
184
|
-
], BaseMonacoEditorWrapper.prototype, "injector", void 0);
|
|
185
|
-
exports.BaseMonacoEditorWrapper = BaseMonacoEditorWrapper = tslib_1.__decorate([
|
|
186
|
-
(0, di_1.Injectable)({ multiple: true }),
|
|
187
|
-
tslib_1.__metadata("design:paramtypes", [Object, Object])
|
|
188
|
-
], BaseMonacoEditorWrapper);
|
|
189
|
-
let DiffEditorPart = class DiffEditorPart extends BaseMonacoEditorWrapper {
|
|
190
|
-
get currentDocumentModel() {
|
|
191
|
-
return this._getDocumentModel();
|
|
192
|
-
}
|
|
193
|
-
updateDocumentModel(uri) {
|
|
194
|
-
const document = this.documents.get();
|
|
195
|
-
if (document === 'loading') {
|
|
196
|
-
return;
|
|
197
|
-
}
|
|
198
|
-
for (const item of document) {
|
|
199
|
-
if (item.object.modified) {
|
|
200
|
-
if (ide_core_common_1.URI.from(item.object.modified.uri).isEqual(uri)) {
|
|
201
|
-
this._getDocumentModel = () => item.object.modifiedInstance;
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
if (item.object.original) {
|
|
205
|
-
if (ide_core_common_1.URI.from(item.object.original.uri).isEqual(uri)) {
|
|
206
|
-
this._getDocumentModel = () => item.object.originalInstance;
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
this.decorationApplier.clearDecorations();
|
|
211
|
-
this.decorationApplier.applyDecorationFromProvider();
|
|
212
|
-
}
|
|
213
|
-
constructor(monacoEditor, _getDocumentModel, type, documents) {
|
|
214
|
-
super(monacoEditor, type);
|
|
215
|
-
this._getDocumentModel = _getDocumentModel;
|
|
216
|
-
this.documents = documents;
|
|
217
|
-
}
|
|
218
|
-
};
|
|
219
|
-
exports.DiffEditorPart = DiffEditorPart;
|
|
220
|
-
exports.DiffEditorPart = DiffEditorPart = tslib_1.__decorate([
|
|
221
|
-
(0, di_1.Injectable)({ multiple: true }),
|
|
222
|
-
tslib_1.__metadata("design:paramtypes", [Object, Function, Object, Object])
|
|
223
|
-
], DiffEditorPart);
|
|
224
|
-
//# sourceMappingURL=base-editor-wrapper.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base-editor-wrapper.js","sourceRoot":"","sources":["../../src/browser/base-editor-wrapper.ts"],"names":[],"mappings":";;;AAoBA,sEAcC;;AAlCD,qCAA+E;AAE/E,+DAA8G;AAC9G,qEAA+C;AAI/C,mHAAwH;AAExH,sCAA2F;AAG3F,6DAAqE;AACrE,sDAAmF;AACnF,mCAAiD;AAMjD,SAAgB,6BAA6B,CAC3C,MAAyB,EACzB,QAAgB,EAChB,MAAgB,EAChB,IAAsB;IAEtB,MAAM,iBAAiB,GAAG,MAAM,CAAC,eAAe,CAAC,oBAAoB,CAAQ,CAAC;IAC9E,MAAM,UAAU,GAAiB,MAAM,CAAC,GAAG,CACzC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,aAAa,EAAE,CAAC,CAAC,SAAS,CAAC,CAC5F,CAAC;IACF,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IACjC,MAAM,CAAC,KAAK,EAAE,CAAC;IAEf,iBAAiB,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;AACpF,CAAC;AAED,MAAM,EAAE,eAAe,EAAE,GAAG,yBAAO,CAAC;AAEpC,SAAS,6BAA6B,CACpC,YAA+B,EAC/B,aAA2C,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