@theia/editor 1.67.0-next.13 → 1.67.0-next.56
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/README.md +1 -1
- package/package.json +4 -4
- package/src/browser/editor-contribution.ts +26 -8
- package/src/browser/editor-frontend-module.ts +6 -0
- package/src/browser/index.ts +2 -0
- package/src/browser/split-editor-contribution.ts +46 -0
- package/src/browser/text-editor-split-contribution.ts +50 -0
- package/lib/browser/decorations/editor-decoration-style.d.ts +0 -9
- package/lib/browser/decorations/editor-decoration-style.d.ts.map +0 -1
- package/lib/browser/decorations/editor-decoration-style.js +0 -37
- package/lib/browser/decorations/editor-decoration-style.js.map +0 -1
- package/lib/browser/decorations/editor-decoration.d.ts +0 -119
- package/lib/browser/decorations/editor-decoration.d.ts.map +0 -1
- package/lib/browser/decorations/editor-decoration.js +0 -38
- package/lib/browser/decorations/editor-decoration.js.map +0 -1
- package/lib/browser/decorations/editor-decorator.d.ts +0 -7
- package/lib/browser/decorations/editor-decorator.d.ts.map +0 -1
- package/lib/browser/decorations/editor-decorator.js +0 -39
- package/lib/browser/decorations/editor-decorator.js.map +0 -1
- package/lib/browser/decorations/index.d.ts +0 -4
- package/lib/browser/decorations/index.d.ts.map +0 -1
- package/lib/browser/decorations/index.js +0 -22
- package/lib/browser/decorations/index.js.map +0 -1
- package/lib/browser/diff-navigator.d.ts +0 -10
- package/lib/browser/diff-navigator.d.ts.map +0 -1
- package/lib/browser/diff-navigator.js +0 -20
- package/lib/browser/diff-navigator.js.map +0 -1
- package/lib/browser/editor-command.d.ts +0 -102
- package/lib/browser/editor-command.d.ts.map +0 -1
- package/lib/browser/editor-command.js +0 -402
- package/lib/browser/editor-command.js.map +0 -1
- package/lib/browser/editor-contribution.d.ts +0 -30
- package/lib/browser/editor-contribution.d.ts.map +0 -1
- package/lib/browser/editor-contribution.js +0 -206
- package/lib/browser/editor-contribution.js.map +0 -1
- package/lib/browser/editor-frontend-module.d.ts +0 -6
- package/lib/browser/editor-frontend-module.d.ts.map +0 -1
- package/lib/browser/editor-frontend-module.js +0 -83
- package/lib/browser/editor-frontend-module.js.map +0 -1
- package/lib/browser/editor-keybinding.d.ts +0 -6
- package/lib/browser/editor-keybinding.d.ts.map +0 -1
- package/lib/browser/editor-keybinding.js +0 -51
- package/lib/browser/editor-keybinding.js.map +0 -1
- package/lib/browser/editor-language-quick-pick-service.d.ts +0 -12
- package/lib/browser/editor-language-quick-pick-service.d.ts.map +0 -1
- package/lib/browser/editor-language-quick-pick-service.js +0 -77
- package/lib/browser/editor-language-quick-pick-service.js.map +0 -1
- package/lib/browser/editor-linenumber-contribution.d.ts +0 -16
- package/lib/browser/editor-linenumber-contribution.d.ts.map +0 -1
- package/lib/browser/editor-linenumber-contribution.js +0 -89
- package/lib/browser/editor-linenumber-contribution.js.map +0 -1
- package/lib/browser/editor-manager.d.ts +0 -135
- package/lib/browser/editor-manager.d.ts.map +0 -1
- package/lib/browser/editor-manager.js +0 -472
- package/lib/browser/editor-manager.js.map +0 -1
- package/lib/browser/editor-menu.d.ts +0 -51
- package/lib/browser/editor-menu.d.ts.map +0 -1
- package/lib/browser/editor-menu.js +0 -208
- package/lib/browser/editor-menu.js.map +0 -1
- package/lib/browser/editor-navigation-contribution.d.ts +0 -68
- package/lib/browser/editor-navigation-contribution.d.ts.map +0 -1
- package/lib/browser/editor-navigation-contribution.js +0 -324
- package/lib/browser/editor-navigation-contribution.js.map +0 -1
- package/lib/browser/editor-variable-contribution.d.ts +0 -9
- package/lib/browser/editor-variable-contribution.d.ts.map +0 -1
- package/lib/browser/editor-variable-contribution.js +0 -65
- package/lib/browser/editor-variable-contribution.js.map +0 -1
- package/lib/browser/editor-widget-factory.d.ts +0 -18
- package/lib/browser/editor-widget-factory.d.ts.map +0 -1
- package/lib/browser/editor-widget-factory.js +0 -84
- package/lib/browser/editor-widget-factory.js.map +0 -1
- package/lib/browser/editor-widget.d.ts +0 -28
- package/lib/browser/editor-widget.d.ts.map +0 -1
- package/lib/browser/editor-widget.js +0 -130
- package/lib/browser/editor-widget.js.map +0 -1
- package/lib/browser/editor.d.ts +0 -311
- package/lib/browser/editor.d.ts.map +0 -1
- package/lib/browser/editor.js +0 -104
- package/lib/browser/editor.js.map +0 -1
- package/lib/browser/index.d.ts +0 -10
- package/lib/browser/index.d.ts.map +0 -1
- package/lib/browser/index.js +0 -28
- package/lib/browser/index.js.map +0 -1
- package/lib/browser/language-status/editor-language-status-service.d.ts +0 -78
- package/lib/browser/language-status/editor-language-status-service.d.ts.map +0 -1
- package/lib/browser/language-status/editor-language-status-service.js +0 -244
- package/lib/browser/language-status/editor-language-status-service.js.map +0 -1
- package/lib/browser/navigation/navigation-location-service.d.ts +0 -132
- package/lib/browser/navigation/navigation-location-service.d.ts.map +0 -1
- package/lib/browser/navigation/navigation-location-service.js +0 -352
- package/lib/browser/navigation/navigation-location-service.js.map +0 -1
- package/lib/browser/navigation/navigation-location-service.spec.d.ts +0 -2
- package/lib/browser/navigation/navigation-location-service.spec.d.ts.map +0 -1
- package/lib/browser/navigation/navigation-location-service.spec.js +0 -185
- package/lib/browser/navigation/navigation-location-service.spec.js.map +0 -1
- package/lib/browser/navigation/navigation-location-similarity.d.ts +0 -16
- package/lib/browser/navigation/navigation-location-similarity.d.ts.map +0 -1
- package/lib/browser/navigation/navigation-location-similarity.js +0 -58
- package/lib/browser/navigation/navigation-location-similarity.js.map +0 -1
- package/lib/browser/navigation/navigation-location-similarity.spec.d.ts +0 -2
- package/lib/browser/navigation/navigation-location-similarity.spec.d.ts.map +0 -1
- package/lib/browser/navigation/navigation-location-similarity.spec.js +0 -33
- package/lib/browser/navigation/navigation-location-similarity.spec.js.map +0 -1
- package/lib/browser/navigation/navigation-location-updater.d.ts +0 -36
- package/lib/browser/navigation/navigation-location-updater.d.ts.map +0 -1
- package/lib/browser/navigation/navigation-location-updater.js +0 -206
- package/lib/browser/navigation/navigation-location-updater.js.map +0 -1
- package/lib/browser/navigation/navigation-location-updater.spec.d.ts +0 -2
- package/lib/browser/navigation/navigation-location-updater.spec.d.ts.map +0 -1
- package/lib/browser/navigation/navigation-location-updater.spec.js +0 -178
- package/lib/browser/navigation/navigation-location-updater.spec.js.map +0 -1
- package/lib/browser/navigation/navigation-location.d.ts +0 -192
- package/lib/browser/navigation/navigation-location.d.ts.map +0 -1
- package/lib/browser/navigation/navigation-location.js +0 -301
- package/lib/browser/navigation/navigation-location.js.map +0 -1
- package/lib/browser/navigation/test/mock-navigation-location-updater.d.ts +0 -16
- package/lib/browser/navigation/test/mock-navigation-location-updater.d.ts.map +0 -1
- package/lib/browser/navigation/test/mock-navigation-location-updater.js +0 -39
- package/lib/browser/navigation/test/mock-navigation-location-updater.js.map +0 -1
- package/lib/browser/quick-editor-service.d.ts +0 -17
- package/lib/browser/quick-editor-service.d.ts.map +0 -1
- package/lib/browser/quick-editor-service.js +0 -102
- package/lib/browser/quick-editor-service.js.map +0 -1
- package/lib/browser/undo-redo-service.d.ts +0 -24
- package/lib/browser/undo-redo-service.d.ts.map +0 -1
- package/lib/browser/undo-redo-service.js +0 -106
- package/lib/browser/undo-redo-service.js.map +0 -1
- package/lib/common/editor-generated-preference-schema.d.ts +0 -303
- package/lib/common/editor-generated-preference-schema.d.ts.map +0 -1
- package/lib/common/editor-generated-preference-schema.js +0 -2666
- package/lib/common/editor-generated-preference-schema.js.map +0 -1
- package/lib/common/editor-preferences.d.ts +0 -42
- package/lib/common/editor-preferences.d.ts.map +0 -1
- package/lib/common/editor-preferences.js +0 -179
- package/lib/common/editor-preferences.js.map +0 -1
- package/lib/common/language-selector.d.ts +0 -14
- package/lib/common/language-selector.d.ts.map +0 -1
- package/lib/common/language-selector.js +0 -91
- package/lib/common/language-selector.js.map +0 -1
- package/lib/node/editor-backend-module.d.ts +0 -4
- package/lib/node/editor-backend-module.d.ts.map +0 -1
- package/lib/node/editor-backend-module.js +0 -23
- package/lib/node/editor-backend-module.js.map +0 -1
- package/lib/package.spec.d.ts +0 -1
- package/lib/package.spec.d.ts.map +0 -1
- package/lib/package.spec.js +0 -26
- package/lib/package.spec.js.map +0 -1
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
import URI from '@theia/core/lib/common/uri';
|
|
2
|
-
import { RecursivePartial, Emitter, Event, CommandService, ContributionProvider, Disposable } from '@theia/core/lib/common';
|
|
3
|
-
import { WidgetOpenerOptions, NavigatableWidgetOpenHandler, NavigatableWidgetOptions } from '@theia/core/lib/browser';
|
|
4
|
-
import { EditorWidget } from './editor-widget';
|
|
5
|
-
import { Range, Position, Location, TextEditor } from './editor';
|
|
6
|
-
import { NavigationLocationService } from './navigation/navigation-location-service';
|
|
7
|
-
import { PreferenceService } from '@theia/core/lib/common/preferences';
|
|
8
|
-
export interface WidgetId {
|
|
9
|
-
id: number;
|
|
10
|
-
uri: string;
|
|
11
|
-
}
|
|
12
|
-
export interface EditorOpenerOptions extends WidgetOpenerOptions {
|
|
13
|
-
selection?: RecursivePartial<Range>;
|
|
14
|
-
revealOption?: 'auto' | 'center' | 'centerIfOutsideViewport';
|
|
15
|
-
preview?: boolean;
|
|
16
|
-
counter?: number;
|
|
17
|
-
}
|
|
18
|
-
export declare const EditorSelectionResolver: unique symbol;
|
|
19
|
-
export interface EditorSelectionResolver {
|
|
20
|
-
priority?: number;
|
|
21
|
-
resolveSelection(widget: EditorWidget, options: EditorOpenerOptions, uri?: URI): Promise<RecursivePartial<Range> | undefined>;
|
|
22
|
-
}
|
|
23
|
-
export declare class EditorManager extends NavigatableWidgetOpenHandler<EditorWidget> {
|
|
24
|
-
readonly id: string;
|
|
25
|
-
readonly label: string;
|
|
26
|
-
protected readonly editorCounters: Map<string, number>;
|
|
27
|
-
protected readonly onActiveEditorChangedEmitter: Emitter<EditorWidget | undefined>;
|
|
28
|
-
/**
|
|
29
|
-
* Emit when the active editor is changed.
|
|
30
|
-
*/
|
|
31
|
-
readonly onActiveEditorChanged: Event<EditorWidget | undefined>;
|
|
32
|
-
protected readonly onCurrentEditorChangedEmitter: Emitter<EditorWidget | undefined>;
|
|
33
|
-
/**
|
|
34
|
-
* Emit when the current editor is changed.
|
|
35
|
-
*/
|
|
36
|
-
readonly onCurrentEditorChanged: Event<EditorWidget | undefined>;
|
|
37
|
-
protected readonly commands: CommandService;
|
|
38
|
-
protected readonly preferenceService: PreferenceService;
|
|
39
|
-
protected readonly resolverContributions: ContributionProvider<EditorSelectionResolver>;
|
|
40
|
-
protected selectionResolvers: EditorSelectionResolver[];
|
|
41
|
-
protected readonly navigationLocationService: NavigationLocationService;
|
|
42
|
-
protected init(): void;
|
|
43
|
-
/**
|
|
44
|
-
* Registers a dynamic selection resolver.
|
|
45
|
-
* The resolver is added to the sorted list of selection resolvers and can later be disposed to remove it.
|
|
46
|
-
*
|
|
47
|
-
* @param resolver The selection resolver to register.
|
|
48
|
-
* @returns A Disposable that unregisters the resolver when disposed.
|
|
49
|
-
*/
|
|
50
|
-
registerSelectionResolver(resolver: EditorSelectionResolver): Disposable;
|
|
51
|
-
getByUri(uri: URI, options?: EditorOpenerOptions): Promise<EditorWidget | undefined>;
|
|
52
|
-
getOrCreateByUri(uri: URI, options?: EditorOpenerOptions): Promise<EditorWidget>;
|
|
53
|
-
createByUri(uri: URI, options?: EditorOpenerOptions): Promise<EditorWidget>;
|
|
54
|
-
protected readonly recentlyVisibleIds: string[];
|
|
55
|
-
protected get recentlyVisible(): EditorWidget | undefined;
|
|
56
|
-
protected addRecentlyVisible(widget: EditorWidget): void;
|
|
57
|
-
protected removeRecentlyVisible(widget: EditorWidget): void;
|
|
58
|
-
protected _activeEditor: EditorWidget | undefined;
|
|
59
|
-
/**
|
|
60
|
-
* The active editor.
|
|
61
|
-
* If there is an active editor (one that has focus), active and current are the same.
|
|
62
|
-
*/
|
|
63
|
-
get activeEditor(): EditorWidget | undefined;
|
|
64
|
-
protected setActiveEditor(active: EditorWidget | undefined): void;
|
|
65
|
-
protected updateActiveEditor(): void;
|
|
66
|
-
protected _currentEditor: EditorWidget | undefined;
|
|
67
|
-
/**
|
|
68
|
-
* The most recently activated editor (which might not have the focus anymore, hence it is not active).
|
|
69
|
-
* If no editor has focus, e.g. when a context menu is shown, the active editor is `undefined`, but current might be the editor that was active before the menu popped up.
|
|
70
|
-
*/
|
|
71
|
-
get currentEditor(): EditorWidget | undefined;
|
|
72
|
-
protected setCurrentEditor(current: EditorWidget | undefined): void;
|
|
73
|
-
protected updateCurrentEditor(): void;
|
|
74
|
-
canHandle(uri: URI, options?: WidgetOpenerOptions): number;
|
|
75
|
-
open(uri: URI, options?: EditorOpenerOptions): Promise<EditorWidget>;
|
|
76
|
-
/**
|
|
77
|
-
* Opens an editor to the side of the current editor. Defaults to opening to the right.
|
|
78
|
-
* To modify direction, pass options with `{widgetOptions: {mode: ...}}`
|
|
79
|
-
*/
|
|
80
|
-
openToSide(uri: URI, options?: EditorOpenerOptions): Promise<EditorWidget>;
|
|
81
|
-
protected doOpen(widget: EditorWidget, uri: URI, options?: EditorOpenerOptions): Promise<void>;
|
|
82
|
-
protected revealSelection(widget: EditorWidget, uri: URI, options?: EditorOpenerOptions): Promise<void>;
|
|
83
|
-
protected resolveSelection(widget: EditorWidget, options: EditorOpenerOptions, uri?: URI): Promise<RecursivePartial<Range> | undefined>;
|
|
84
|
-
protected getSelection(widget: EditorWidget, selection: RecursivePartial<Range>): Range | Position | undefined;
|
|
85
|
-
protected removeFromCounter(widget: EditorWidget): void;
|
|
86
|
-
protected extractIdFromWidget(widget: EditorWidget): WidgetId;
|
|
87
|
-
protected checkCounterForWidget(widget: EditorWidget): void;
|
|
88
|
-
protected createCounterForUri(uri: URI): number;
|
|
89
|
-
protected getCounterForUri(uri: URI): number | undefined;
|
|
90
|
-
protected getOrCreateCounterForUri(uri: URI): number;
|
|
91
|
-
protected createWidgetOptions(uri: URI, options?: EditorOpenerOptions): NavigatableWidgetOptions;
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Provides direct access to the underlying text editor.
|
|
95
|
-
*/
|
|
96
|
-
export declare abstract class EditorAccess {
|
|
97
|
-
protected readonly editorManager: EditorManager;
|
|
98
|
-
/**
|
|
99
|
-
* The URI of the underlying document from the editor.
|
|
100
|
-
*/
|
|
101
|
-
get uri(): string | undefined;
|
|
102
|
-
/**
|
|
103
|
-
* The selection location from the text editor.
|
|
104
|
-
*/
|
|
105
|
-
get selection(): Location | undefined;
|
|
106
|
-
/**
|
|
107
|
-
* The unique identifier of the language the current editor belongs to.
|
|
108
|
-
*/
|
|
109
|
-
get languageId(): string | undefined;
|
|
110
|
-
/**
|
|
111
|
-
* The text editor.
|
|
112
|
-
*/
|
|
113
|
-
get editor(): TextEditor | undefined;
|
|
114
|
-
/**
|
|
115
|
-
* The editor widget, or `undefined` if not applicable.
|
|
116
|
-
*/
|
|
117
|
-
protected abstract editorWidget(): EditorWidget | undefined;
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* Provides direct access to the currently active text editor.
|
|
121
|
-
*/
|
|
122
|
-
export declare class CurrentEditorAccess extends EditorAccess {
|
|
123
|
-
protected editorWidget(): EditorWidget | undefined;
|
|
124
|
-
}
|
|
125
|
-
/**
|
|
126
|
-
* Provides access to the active text editor.
|
|
127
|
-
*/
|
|
128
|
-
export declare class ActiveEditorAccess extends EditorAccess {
|
|
129
|
-
protected editorWidget(): EditorWidget | undefined;
|
|
130
|
-
}
|
|
131
|
-
export declare namespace EditorAccess {
|
|
132
|
-
const CURRENT = "current-editor-access";
|
|
133
|
-
const ACTIVE = "active-editor-access";
|
|
134
|
-
}
|
|
135
|
-
//# sourceMappingURL=editor-manager.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"editor-manager.d.ts","sourceRoot":"","sources":["../../src/browser/editor-manager.ts"],"names":[],"mappings":"AAiBA,OAAO,GAAG,MAAM,4BAA4B,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,KAAK,EAAE,cAAc,EAAO,oBAAoB,EAAkB,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAC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copyright (C) 2017 TypeFox and others.
|
|
4
|
-
//
|
|
5
|
-
// This program and the accompanying materials are made available under the
|
|
6
|
-
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
-
// http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
-
//
|
|
9
|
-
// This Source Code may also be made available under the following Secondary
|
|
10
|
-
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
-
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
-
// with the GNU Classpath Exception which is available at
|
|
13
|
-
// https://www.gnu.org/software/classpath/license.html.
|
|
14
|
-
//
|
|
15
|
-
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
|
-
// *****************************************************************************
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.ActiveEditorAccess = exports.CurrentEditorAccess = exports.EditorAccess = exports.EditorManager = exports.EditorSelectionResolver = void 0;
|
|
19
|
-
const tslib_1 = require("tslib");
|
|
20
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
21
|
-
const common_1 = require("@theia/core/lib/common");
|
|
22
|
-
const browser_1 = require("@theia/core/lib/browser");
|
|
23
|
-
const editor_widget_1 = require("./editor-widget");
|
|
24
|
-
const editor_1 = require("./editor");
|
|
25
|
-
const editor_widget_factory_1 = require("./editor-widget-factory");
|
|
26
|
-
const navigation_location_service_1 = require("./navigation/navigation-location-service");
|
|
27
|
-
const preferences_1 = require("@theia/core/lib/common/preferences");
|
|
28
|
-
exports.EditorSelectionResolver = Symbol('EditorSelectionResolver');
|
|
29
|
-
let EditorManager = class EditorManager extends browser_1.NavigatableWidgetOpenHandler {
|
|
30
|
-
constructor() {
|
|
31
|
-
super(...arguments);
|
|
32
|
-
this.id = editor_widget_factory_1.EditorWidgetFactory.ID;
|
|
33
|
-
this.label = common_1.nls.localizeByDefault('Text Editor');
|
|
34
|
-
this.editorCounters = new Map();
|
|
35
|
-
this.onActiveEditorChangedEmitter = new common_1.Emitter();
|
|
36
|
-
/**
|
|
37
|
-
* Emit when the active editor is changed.
|
|
38
|
-
*/
|
|
39
|
-
this.onActiveEditorChanged = this.onActiveEditorChangedEmitter.event;
|
|
40
|
-
this.onCurrentEditorChangedEmitter = new common_1.Emitter();
|
|
41
|
-
/**
|
|
42
|
-
* Emit when the current editor is changed.
|
|
43
|
-
*/
|
|
44
|
-
this.onCurrentEditorChanged = this.onCurrentEditorChangedEmitter.event;
|
|
45
|
-
this.selectionResolvers = [];
|
|
46
|
-
this.recentlyVisibleIds = [];
|
|
47
|
-
}
|
|
48
|
-
init() {
|
|
49
|
-
super.init();
|
|
50
|
-
this.selectionResolvers = common_1.Prioritizeable.prioritizeAllSync(this.resolverContributions.getContributions(), resolver => { var _a; return (_a = resolver.priority) !== null && _a !== void 0 ? _a : 0; }).map(p => p.value);
|
|
51
|
-
this.shell.onDidChangeActiveWidget(() => this.updateActiveEditor());
|
|
52
|
-
this.shell.onDidChangeCurrentWidget(() => this.updateCurrentEditor());
|
|
53
|
-
this.shell.onDidDoubleClickMainArea(() => this.commands.executeCommand(browser_1.CommonCommands.NEW_UNTITLED_TEXT_FILE.id));
|
|
54
|
-
this.onCreated(widget => {
|
|
55
|
-
widget.onDidChangeVisibility(() => {
|
|
56
|
-
if (widget.isVisible) {
|
|
57
|
-
this.addRecentlyVisible(widget);
|
|
58
|
-
}
|
|
59
|
-
this.updateCurrentEditor();
|
|
60
|
-
});
|
|
61
|
-
this.checkCounterForWidget(widget);
|
|
62
|
-
widget.disposed.connect(() => {
|
|
63
|
-
this.removeFromCounter(widget);
|
|
64
|
-
this.removeRecentlyVisible(widget);
|
|
65
|
-
this.updateCurrentEditor();
|
|
66
|
-
});
|
|
67
|
-
});
|
|
68
|
-
for (const widget of this.all) {
|
|
69
|
-
if (widget.isVisible) {
|
|
70
|
-
this.addRecentlyVisible(widget);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
this.updateCurrentEditor();
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Registers a dynamic selection resolver.
|
|
77
|
-
* The resolver is added to the sorted list of selection resolvers and can later be disposed to remove it.
|
|
78
|
-
*
|
|
79
|
-
* @param resolver The selection resolver to register.
|
|
80
|
-
* @returns A Disposable that unregisters the resolver when disposed.
|
|
81
|
-
*/
|
|
82
|
-
registerSelectionResolver(resolver) {
|
|
83
|
-
this.selectionResolvers.push(resolver);
|
|
84
|
-
this.selectionResolvers.sort((a, b) => { var _a, _b; return ((_a = b.priority) !== null && _a !== void 0 ? _a : 0) - ((_b = a.priority) !== null && _b !== void 0 ? _b : 0); });
|
|
85
|
-
return {
|
|
86
|
-
dispose: () => {
|
|
87
|
-
const index = this.selectionResolvers.indexOf(resolver);
|
|
88
|
-
if (index !== -1) {
|
|
89
|
-
this.selectionResolvers.splice(index, 1);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
getByUri(uri, options) {
|
|
95
|
-
return this.getWidget(uri, options);
|
|
96
|
-
}
|
|
97
|
-
getOrCreateByUri(uri, options) {
|
|
98
|
-
return this.getOrCreateWidget(uri, options);
|
|
99
|
-
}
|
|
100
|
-
createByUri(uri, options) {
|
|
101
|
-
const counter = this.createCounterForUri(uri);
|
|
102
|
-
if (!(options === null || options === void 0 ? void 0 : options.counter) || options.counter < counter) {
|
|
103
|
-
options = { ...options, counter };
|
|
104
|
-
}
|
|
105
|
-
return this.getOrCreateByUri(uri, options);
|
|
106
|
-
}
|
|
107
|
-
get recentlyVisible() {
|
|
108
|
-
const id = this.recentlyVisibleIds[0];
|
|
109
|
-
return id && this.all.find(w => w.id === id) || undefined;
|
|
110
|
-
}
|
|
111
|
-
addRecentlyVisible(widget) {
|
|
112
|
-
this.removeRecentlyVisible(widget);
|
|
113
|
-
this.recentlyVisibleIds.unshift(widget.id);
|
|
114
|
-
}
|
|
115
|
-
removeRecentlyVisible(widget) {
|
|
116
|
-
const index = this.recentlyVisibleIds.indexOf(widget.id);
|
|
117
|
-
if (index !== -1) {
|
|
118
|
-
this.recentlyVisibleIds.splice(index, 1);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* The active editor.
|
|
123
|
-
* If there is an active editor (one that has focus), active and current are the same.
|
|
124
|
-
*/
|
|
125
|
-
get activeEditor() {
|
|
126
|
-
return this._activeEditor;
|
|
127
|
-
}
|
|
128
|
-
setActiveEditor(active) {
|
|
129
|
-
if (this._activeEditor !== active) {
|
|
130
|
-
this._activeEditor = active;
|
|
131
|
-
this.onActiveEditorChangedEmitter.fire(this._activeEditor);
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
updateActiveEditor() {
|
|
135
|
-
const widget = this.shell.activeWidget;
|
|
136
|
-
if (widget instanceof editor_widget_1.EditorWidget) {
|
|
137
|
-
this.addRecentlyVisible(widget);
|
|
138
|
-
this.setActiveEditor(widget);
|
|
139
|
-
}
|
|
140
|
-
else {
|
|
141
|
-
this.setActiveEditor(undefined);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
/**
|
|
145
|
-
* The most recently activated editor (which might not have the focus anymore, hence it is not active).
|
|
146
|
-
* If no editor has focus, e.g. when a context menu is shown, the active editor is `undefined`, but current might be the editor that was active before the menu popped up.
|
|
147
|
-
*/
|
|
148
|
-
get currentEditor() {
|
|
149
|
-
return this._currentEditor;
|
|
150
|
-
}
|
|
151
|
-
setCurrentEditor(current) {
|
|
152
|
-
if (this._currentEditor !== current) {
|
|
153
|
-
this._currentEditor = current;
|
|
154
|
-
this.onCurrentEditorChangedEmitter.fire(this._currentEditor);
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
updateCurrentEditor() {
|
|
158
|
-
const widget = this.shell.currentWidget;
|
|
159
|
-
if (widget instanceof editor_widget_1.EditorWidget) {
|
|
160
|
-
this.setCurrentEditor(widget);
|
|
161
|
-
}
|
|
162
|
-
else if (!this._currentEditor || !this._currentEditor.isVisible || this.currentEditor !== this.recentlyVisible) {
|
|
163
|
-
this.setCurrentEditor(this.recentlyVisible);
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
canHandle(uri, options) {
|
|
167
|
-
if (browser_1.DiffUris.isDiffUri(uri)) {
|
|
168
|
-
const [/* left */ , right] = browser_1.DiffUris.decode(uri);
|
|
169
|
-
uri = right;
|
|
170
|
-
}
|
|
171
|
-
if ((0, browser_1.getDefaultHandler)(uri, this.preferenceService) === 'default') {
|
|
172
|
-
return browser_1.defaultHandlerPriority;
|
|
173
|
-
}
|
|
174
|
-
return 100;
|
|
175
|
-
}
|
|
176
|
-
async open(uri, options) {
|
|
177
|
-
var _a;
|
|
178
|
-
this.navigationLocationService.startNavigation();
|
|
179
|
-
try {
|
|
180
|
-
if ((options === null || options === void 0 ? void 0 : options.counter) === undefined) {
|
|
181
|
-
const insertionOptions = this.shell.getInsertionOptions(options === null || options === void 0 ? void 0 : options.widgetOptions);
|
|
182
|
-
// Definitely creating a new tabbar - no widget can match.
|
|
183
|
-
if ((_a = insertionOptions.addOptions.mode) === null || _a === void 0 ? void 0 : _a.startsWith('split')) {
|
|
184
|
-
return await super.open(uri, { counter: this.createCounterForUri(uri), ...options });
|
|
185
|
-
}
|
|
186
|
-
// Check the target tabbar for an existing widget.
|
|
187
|
-
const tabbar = insertionOptions.addOptions.ref && this.shell.getTabBarFor(insertionOptions.addOptions.ref);
|
|
188
|
-
if (tabbar) {
|
|
189
|
-
const currentUri = uri.toString();
|
|
190
|
-
for (const title of tabbar.titles) {
|
|
191
|
-
if (title.owner instanceof editor_widget_1.EditorWidget) {
|
|
192
|
-
const { uri: otherWidgetUri, id } = this.extractIdFromWidget(title.owner);
|
|
193
|
-
if (otherWidgetUri === currentUri) {
|
|
194
|
-
return await super.open(uri, { counter: id, ...options });
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
// If the user has opted to prefer to open an existing editor even if it's on a different tab, check if we have anything about the URI.
|
|
200
|
-
if (this.preferenceService.get('workbench.editor.revealIfOpen', false)) {
|
|
201
|
-
const counter = this.getCounterForUri(uri);
|
|
202
|
-
if (counter !== undefined) {
|
|
203
|
-
return await super.open(uri, { counter, ...options });
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
// Open a new widget.
|
|
207
|
-
return await super.open(uri, { counter: this.createCounterForUri(uri), ...options });
|
|
208
|
-
}
|
|
209
|
-
return await super.open(uri, options);
|
|
210
|
-
}
|
|
211
|
-
finally {
|
|
212
|
-
this.navigationLocationService.endNavigation();
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
/**
|
|
216
|
-
* Opens an editor to the side of the current editor. Defaults to opening to the right.
|
|
217
|
-
* To modify direction, pass options with `{widgetOptions: {mode: ...}}`
|
|
218
|
-
*/
|
|
219
|
-
openToSide(uri, options) {
|
|
220
|
-
const counter = this.createCounterForUri(uri);
|
|
221
|
-
const splitOptions = { widgetOptions: { mode: 'split-right' }, ...options, counter };
|
|
222
|
-
return this.open(uri, splitOptions);
|
|
223
|
-
}
|
|
224
|
-
async doOpen(widget, uri, options) {
|
|
225
|
-
await super.doOpen(widget, uri, options);
|
|
226
|
-
await this.revealSelection(widget, uri, options);
|
|
227
|
-
}
|
|
228
|
-
async revealSelection(widget, uri, options) {
|
|
229
|
-
var _a, _b;
|
|
230
|
-
let inputSelection = options === null || options === void 0 ? void 0 : options.selection;
|
|
231
|
-
if (!inputSelection) {
|
|
232
|
-
inputSelection = await this.resolveSelection(widget, options !== null && options !== void 0 ? options : {}, uri);
|
|
233
|
-
}
|
|
234
|
-
// this logic could be moved into a 'EditorSelectionResolver'
|
|
235
|
-
if (!inputSelection && uri) {
|
|
236
|
-
// support file:///some/file.js#73,84
|
|
237
|
-
// support file:///some/file.js#L73
|
|
238
|
-
const match = /^L?(\d+)(?:,(\d+))?/.exec(uri.fragment);
|
|
239
|
-
if (match) {
|
|
240
|
-
inputSelection = {
|
|
241
|
-
start: {
|
|
242
|
-
line: parseInt(match[1]) - 1,
|
|
243
|
-
character: match[2] ? parseInt(match[2]) - 1 : 0
|
|
244
|
-
}
|
|
245
|
-
};
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
if (inputSelection) {
|
|
249
|
-
const selection = this.getSelection(widget, inputSelection);
|
|
250
|
-
const editor = widget.editor;
|
|
251
|
-
if (editor_1.Position.is(selection)) {
|
|
252
|
-
editor.cursor = selection;
|
|
253
|
-
editor.revealPosition(selection, { vertical: (_a = options === null || options === void 0 ? void 0 : options.revealOption) !== null && _a !== void 0 ? _a : 'center' });
|
|
254
|
-
}
|
|
255
|
-
else if (editor_1.Range.is(selection)) {
|
|
256
|
-
editor.cursor = selection.end;
|
|
257
|
-
editor.selection = { ...selection, direction: 'ltr' };
|
|
258
|
-
editor.revealRange(selection, { at: (_b = options === null || options === void 0 ? void 0 : options.revealOption) !== null && _b !== void 0 ? _b : 'center' });
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
async resolveSelection(widget, options, uri) {
|
|
263
|
-
if (options.selection) {
|
|
264
|
-
return options.selection;
|
|
265
|
-
}
|
|
266
|
-
for (const resolver of this.selectionResolvers) {
|
|
267
|
-
try {
|
|
268
|
-
const selection = await resolver.resolveSelection(widget, options, uri);
|
|
269
|
-
if (selection) {
|
|
270
|
-
return selection;
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
catch (error) {
|
|
274
|
-
console.error(error);
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
return undefined;
|
|
278
|
-
}
|
|
279
|
-
getSelection(widget, selection) {
|
|
280
|
-
const { start, end } = selection;
|
|
281
|
-
if (editor_1.Position.is(start)) {
|
|
282
|
-
if (editor_1.Position.is(end)) {
|
|
283
|
-
return widget.editor.document.toValidRange({ start, end });
|
|
284
|
-
}
|
|
285
|
-
return widget.editor.document.toValidPosition(start);
|
|
286
|
-
}
|
|
287
|
-
const line = start && start.line !== undefined && start.line >= 0 ? start.line : undefined;
|
|
288
|
-
if (line === undefined) {
|
|
289
|
-
return undefined;
|
|
290
|
-
}
|
|
291
|
-
const character = start && start.character !== undefined && start.character >= 0 ? start.character : widget.editor.document.getLineMaxColumn(line);
|
|
292
|
-
const endLine = end && end.line !== undefined && end.line >= 0 ? end.line : undefined;
|
|
293
|
-
if (endLine === undefined) {
|
|
294
|
-
return { line, character };
|
|
295
|
-
}
|
|
296
|
-
const endCharacter = end && end.character !== undefined && end.character >= 0 ? end.character : widget.editor.document.getLineMaxColumn(endLine);
|
|
297
|
-
return {
|
|
298
|
-
start: { line, character },
|
|
299
|
-
end: { line: endLine, character: endCharacter }
|
|
300
|
-
};
|
|
301
|
-
}
|
|
302
|
-
removeFromCounter(widget) {
|
|
303
|
-
const { id, uri } = this.extractIdFromWidget(widget);
|
|
304
|
-
if (uri && !Number.isNaN(id)) {
|
|
305
|
-
let max = -Infinity;
|
|
306
|
-
this.all.forEach(editor => {
|
|
307
|
-
const candidateID = this.extractIdFromWidget(editor);
|
|
308
|
-
if ((candidateID.uri === uri) && (candidateID.id > max)) {
|
|
309
|
-
max = candidateID.id;
|
|
310
|
-
}
|
|
311
|
-
});
|
|
312
|
-
if (max > -Infinity) {
|
|
313
|
-
this.editorCounters.set(uri, max);
|
|
314
|
-
}
|
|
315
|
-
else {
|
|
316
|
-
this.editorCounters.delete(uri);
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
extractIdFromWidget(widget) {
|
|
321
|
-
const uri = widget.editor.uri.toString();
|
|
322
|
-
const id = Number(widget.id.slice(widget.id.lastIndexOf(':') + 1));
|
|
323
|
-
return { id, uri };
|
|
324
|
-
}
|
|
325
|
-
checkCounterForWidget(widget) {
|
|
326
|
-
var _a;
|
|
327
|
-
const { id, uri } = this.extractIdFromWidget(widget);
|
|
328
|
-
const numericalId = Number(id);
|
|
329
|
-
if (uri && !Number.isNaN(numericalId)) {
|
|
330
|
-
const highestKnownId = (_a = this.editorCounters.get(uri)) !== null && _a !== void 0 ? _a : -Infinity;
|
|
331
|
-
if (numericalId > highestKnownId) {
|
|
332
|
-
this.editorCounters.set(uri, numericalId);
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
createCounterForUri(uri) {
|
|
337
|
-
var _a;
|
|
338
|
-
const identifier = uri.toString();
|
|
339
|
-
const next = ((_a = this.editorCounters.get(identifier)) !== null && _a !== void 0 ? _a : 0) + 1;
|
|
340
|
-
return next;
|
|
341
|
-
}
|
|
342
|
-
getCounterForUri(uri) {
|
|
343
|
-
var _a;
|
|
344
|
-
const idWithoutCounter = editor_widget_factory_1.EditorWidgetFactory.createID(uri);
|
|
345
|
-
const counterOfMostRecentlyVisibleEditor = (_a = this.recentlyVisibleIds.find(id => id.startsWith(idWithoutCounter))) === null || _a === void 0 ? void 0 : _a.slice(idWithoutCounter.length + 1);
|
|
346
|
-
return counterOfMostRecentlyVisibleEditor === undefined ? undefined : parseInt(counterOfMostRecentlyVisibleEditor);
|
|
347
|
-
}
|
|
348
|
-
getOrCreateCounterForUri(uri) {
|
|
349
|
-
var _a;
|
|
350
|
-
return (_a = this.getCounterForUri(uri)) !== null && _a !== void 0 ? _a : this.createCounterForUri(uri);
|
|
351
|
-
}
|
|
352
|
-
createWidgetOptions(uri, options) {
|
|
353
|
-
var _a;
|
|
354
|
-
const navigatableOptions = super.createWidgetOptions(uri, options);
|
|
355
|
-
navigatableOptions.counter = (_a = options === null || options === void 0 ? void 0 : options.counter) !== null && _a !== void 0 ? _a : this.getOrCreateCounterForUri(uri);
|
|
356
|
-
return navigatableOptions;
|
|
357
|
-
}
|
|
358
|
-
};
|
|
359
|
-
exports.EditorManager = EditorManager;
|
|
360
|
-
tslib_1.__decorate([
|
|
361
|
-
(0, inversify_1.inject)(common_1.CommandService),
|
|
362
|
-
tslib_1.__metadata("design:type", Object)
|
|
363
|
-
], EditorManager.prototype, "commands", void 0);
|
|
364
|
-
tslib_1.__decorate([
|
|
365
|
-
(0, inversify_1.inject)(preferences_1.PreferenceService),
|
|
366
|
-
tslib_1.__metadata("design:type", Object)
|
|
367
|
-
], EditorManager.prototype, "preferenceService", void 0);
|
|
368
|
-
tslib_1.__decorate([
|
|
369
|
-
(0, inversify_1.inject)(common_1.ContributionProvider),
|
|
370
|
-
(0, inversify_1.named)(exports.EditorSelectionResolver),
|
|
371
|
-
tslib_1.__metadata("design:type", Object)
|
|
372
|
-
], EditorManager.prototype, "resolverContributions", void 0);
|
|
373
|
-
tslib_1.__decorate([
|
|
374
|
-
(0, inversify_1.inject)(navigation_location_service_1.NavigationLocationService),
|
|
375
|
-
tslib_1.__metadata("design:type", navigation_location_service_1.NavigationLocationService)
|
|
376
|
-
], EditorManager.prototype, "navigationLocationService", void 0);
|
|
377
|
-
tslib_1.__decorate([
|
|
378
|
-
(0, inversify_1.postConstruct)(),
|
|
379
|
-
tslib_1.__metadata("design:type", Function),
|
|
380
|
-
tslib_1.__metadata("design:paramtypes", []),
|
|
381
|
-
tslib_1.__metadata("design:returntype", void 0)
|
|
382
|
-
], EditorManager.prototype, "init", null);
|
|
383
|
-
exports.EditorManager = EditorManager = tslib_1.__decorate([
|
|
384
|
-
(0, inversify_1.injectable)()
|
|
385
|
-
], EditorManager);
|
|
386
|
-
/**
|
|
387
|
-
* Provides direct access to the underlying text editor.
|
|
388
|
-
*/
|
|
389
|
-
let EditorAccess = class EditorAccess {
|
|
390
|
-
/**
|
|
391
|
-
* The URI of the underlying document from the editor.
|
|
392
|
-
*/
|
|
393
|
-
get uri() {
|
|
394
|
-
const editor = this.editor;
|
|
395
|
-
if (editor) {
|
|
396
|
-
return editor.uri.toString();
|
|
397
|
-
}
|
|
398
|
-
return undefined;
|
|
399
|
-
}
|
|
400
|
-
/**
|
|
401
|
-
* The selection location from the text editor.
|
|
402
|
-
*/
|
|
403
|
-
get selection() {
|
|
404
|
-
const editor = this.editor;
|
|
405
|
-
if (editor) {
|
|
406
|
-
const uri = editor.uri.toString();
|
|
407
|
-
const range = editor.selection;
|
|
408
|
-
return {
|
|
409
|
-
range,
|
|
410
|
-
uri
|
|
411
|
-
};
|
|
412
|
-
}
|
|
413
|
-
return undefined;
|
|
414
|
-
}
|
|
415
|
-
/**
|
|
416
|
-
* The unique identifier of the language the current editor belongs to.
|
|
417
|
-
*/
|
|
418
|
-
get languageId() {
|
|
419
|
-
const editor = this.editor;
|
|
420
|
-
if (editor) {
|
|
421
|
-
return editor.document.languageId;
|
|
422
|
-
}
|
|
423
|
-
return undefined;
|
|
424
|
-
}
|
|
425
|
-
/**
|
|
426
|
-
* The text editor.
|
|
427
|
-
*/
|
|
428
|
-
get editor() {
|
|
429
|
-
const editorWidget = this.editorWidget();
|
|
430
|
-
if (editorWidget) {
|
|
431
|
-
return editorWidget.editor;
|
|
432
|
-
}
|
|
433
|
-
return undefined;
|
|
434
|
-
}
|
|
435
|
-
};
|
|
436
|
-
exports.EditorAccess = EditorAccess;
|
|
437
|
-
tslib_1.__decorate([
|
|
438
|
-
(0, inversify_1.inject)(EditorManager),
|
|
439
|
-
tslib_1.__metadata("design:type", EditorManager)
|
|
440
|
-
], EditorAccess.prototype, "editorManager", void 0);
|
|
441
|
-
exports.EditorAccess = EditorAccess = tslib_1.__decorate([
|
|
442
|
-
(0, inversify_1.injectable)()
|
|
443
|
-
], EditorAccess);
|
|
444
|
-
/**
|
|
445
|
-
* Provides direct access to the currently active text editor.
|
|
446
|
-
*/
|
|
447
|
-
let CurrentEditorAccess = class CurrentEditorAccess extends EditorAccess {
|
|
448
|
-
editorWidget() {
|
|
449
|
-
return this.editorManager.currentEditor;
|
|
450
|
-
}
|
|
451
|
-
};
|
|
452
|
-
exports.CurrentEditorAccess = CurrentEditorAccess;
|
|
453
|
-
exports.CurrentEditorAccess = CurrentEditorAccess = tslib_1.__decorate([
|
|
454
|
-
(0, inversify_1.injectable)()
|
|
455
|
-
], CurrentEditorAccess);
|
|
456
|
-
/**
|
|
457
|
-
* Provides access to the active text editor.
|
|
458
|
-
*/
|
|
459
|
-
let ActiveEditorAccess = class ActiveEditorAccess extends EditorAccess {
|
|
460
|
-
editorWidget() {
|
|
461
|
-
return this.editorManager.activeEditor;
|
|
462
|
-
}
|
|
463
|
-
};
|
|
464
|
-
exports.ActiveEditorAccess = ActiveEditorAccess;
|
|
465
|
-
exports.ActiveEditorAccess = ActiveEditorAccess = tslib_1.__decorate([
|
|
466
|
-
(0, inversify_1.injectable)()
|
|
467
|
-
], ActiveEditorAccess);
|
|
468
|
-
(function (EditorAccess) {
|
|
469
|
-
EditorAccess.CURRENT = 'current-editor-access';
|
|
470
|
-
EditorAccess.ACTIVE = 'active-editor-access';
|
|
471
|
-
})(EditorAccess || (exports.EditorAccess = EditorAccess = {}));
|
|
472
|
-
//# sourceMappingURL=editor-manager.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"editor-manager.js","sourceRoot":"","sources":["../../src/browser/editor-manager.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;AAEhF,4DAAwF;AAExF,mDAAiJ;AACjJ,qDAEiC;AACjC,mDAA+C;AAC/C,qCAAiE;AACjE,mEAA8D;AAC9D,0FAAqF;AACrF,oEAAuE;AAc1D,QAAA,uBAAuB,GAAG,MAAM,CAAC,yBAAyB,CAAC,CAAC;AAOlE,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,sCAA0C;IAAtE;;QAEM,OAAE,GAAG,2CAAmB,CAAC,EAAE,CAAC;QAE5B,UAAK,GAAG,YAAG,CAAC,iBAAiB,CAAC,aAAa,CAAC,CAAC;QAEnC,mBAAc,GAAG,IAAI,GAAG,EAAkB,CAAC;QAE3C,iCAA4B,GAAG,IAAI,gBAAO,E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