@theia/editor 1.45.0 → 1.46.0-next.72
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 +30 -30
- package/lib/browser/decorations/editor-decoration-style.d.ts +8 -8
- package/lib/browser/decorations/editor-decoration-style.js +36 -36
- package/lib/browser/decorations/editor-decoration.d.ts +106 -106
- package/lib/browser/decorations/editor-decoration.js +37 -37
- package/lib/browser/decorations/editor-decorator.d.ts +6 -6
- package/lib/browser/decorations/editor-decorator.js +43 -43
- package/lib/browser/decorations/index.d.ts +3 -3
- package/lib/browser/decorations/index.js +30 -30
- package/lib/browser/diff-navigator.d.ts +9 -10
- package/lib/browser/diff-navigator.d.ts.map +1 -1
- package/lib/browser/diff-navigator.js +19 -19
- package/lib/browser/diff-navigator.js.map +1 -1
- package/lib/browser/editor-command.d.ts +102 -102
- package/lib/browser/editor-command.js +426 -426
- package/lib/browser/editor-contribution.d.ts +26 -26
- package/lib/browser/editor-contribution.js +198 -198
- package/lib/browser/editor-frontend-module.d.ts +5 -5
- package/lib/browser/editor-frontend-module.js +74 -74
- package/lib/browser/editor-generated-preference-schema.d.ts +282 -249
- package/lib/browser/editor-generated-preference-schema.d.ts.map +1 -1
- package/lib/browser/editor-generated-preference-schema.js +2451 -2316
- package/lib/browser/editor-generated-preference-schema.js.map +1 -1
- package/lib/browser/editor-keybinding.d.ts +5 -5
- package/lib/browser/editor-keybinding.js +55 -55
- package/lib/browser/editor-linenumber-contribution.d.ts +15 -15
- package/lib/browser/editor-linenumber-contribution.d.ts.map +1 -1
- package/lib/browser/editor-linenumber-contribution.js +95 -96
- package/lib/browser/editor-linenumber-contribution.js.map +1 -1
- package/lib/browser/editor-manager.d.ts +115 -115
- package/lib/browser/editor-manager.js +428 -428
- package/lib/browser/editor-menu.d.ts +48 -48
- package/lib/browser/editor-menu.js +210 -210
- package/lib/browser/editor-navigation-contribution.d.ts +67 -67
- package/lib/browser/editor-navigation-contribution.js +343 -343
- package/lib/browser/editor-preferences.d.ts +41 -41
- package/lib/browser/editor-preferences.js +176 -176
- package/lib/browser/editor-variable-contribution.d.ts +8 -8
- package/lib/browser/editor-variable-contribution.js +64 -64
- package/lib/browser/editor-widget-factory.d.ts +17 -17
- package/lib/browser/editor-widget-factory.js +91 -91
- package/lib/browser/editor-widget.d.ts +24 -24
- package/lib/browser/editor-widget.d.ts.map +1 -1
- package/lib/browser/editor-widget.js +122 -114
- package/lib/browser/editor-widget.js.map +1 -1
- package/lib/browser/editor.d.ts +295 -293
- package/lib/browser/editor.d.ts.map +1 -1
- package/lib/browser/editor.js +103 -103
- package/lib/browser/editor.js.map +1 -1
- package/lib/browser/index.d.ts +10 -10
- package/lib/browser/index.js +37 -37
- package/lib/browser/language-status/editor-language-status-service.d.ts +77 -77
- package/lib/browser/language-status/editor-language-status-service.js +251 -251
- package/lib/browser/navigation/navigation-location-service.d.ts +103 -103
- package/lib/browser/navigation/navigation-location-service.js +281 -281
- package/lib/browser/navigation/navigation-location-service.spec.d.ts +1 -1
- package/lib/browser/navigation/navigation-location-service.spec.js +184 -184
- package/lib/browser/navigation/navigation-location-similarity.d.ts +15 -15
- package/lib/browser/navigation/navigation-location-similarity.js +62 -62
- package/lib/browser/navigation/navigation-location-similarity.spec.d.ts +1 -1
- package/lib/browser/navigation/navigation-location-similarity.spec.js +32 -32
- package/lib/browser/navigation/navigation-location-updater.d.ts +35 -35
- package/lib/browser/navigation/navigation-location-updater.js +210 -210
- package/lib/browser/navigation/navigation-location-updater.spec.d.ts +1 -1
- package/lib/browser/navigation/navigation-location-updater.spec.js +177 -177
- package/lib/browser/navigation/navigation-location.d.ts +191 -191
- package/lib/browser/navigation/navigation-location.js +300 -300
- package/lib/browser/navigation/test/mock-navigation-location-updater.d.ts +15 -15
- package/lib/browser/navigation/test/mock-navigation-location-updater.js +38 -38
- package/lib/browser/quick-editor-service.d.ts +16 -16
- package/lib/browser/quick-editor-service.js +109 -109
- package/lib/browser/undo-redo-service.d.ts +23 -23
- package/lib/browser/undo-redo-service.js +110 -110
- package/lib/common/language-selector.d.ts +13 -13
- package/lib/common/language-selector.js +90 -90
- package/lib/package.spec.js +25 -25
- package/package.json +5 -5
- package/src/browser/decorations/editor-decoration-style.ts +41 -41
- package/src/browser/decorations/editor-decoration.ts +127 -127
- package/src/browser/decorations/editor-decorator.ts +36 -36
- package/src/browser/decorations/index.ts +19 -19
- package/src/browser/diff-navigator.ts +27 -28
- package/src/browser/editor-command.ts +414 -414
- package/src/browser/editor-contribution.ts +185 -185
- package/src/browser/editor-frontend-module.ts +87 -87
- package/src/browser/editor-generated-preference-schema.ts +2707 -2539
- package/src/browser/editor-keybinding.ts +55 -55
- package/src/browser/editor-linenumber-contribution.ts +88 -89
- package/src/browser/editor-manager.ts +442 -442
- package/src/browser/editor-menu.ts +224 -224
- package/src/browser/editor-navigation-contribution.ts +343 -343
- package/src/browser/editor-preferences.ts +226 -226
- package/src/browser/editor-variable-contribution.ts +54 -54
- package/src/browser/editor-widget-factory.ts +82 -82
- package/src/browser/editor-widget.ts +137 -130
- package/src/browser/editor.ts +360 -358
- package/src/browser/index.ts +26 -26
- package/src/browser/language-status/editor-language-status-service.ts +271 -271
- package/src/browser/language-status/editor-language-status.css +101 -101
- package/src/browser/navigation/navigation-location-service.spec.ts +245 -245
- package/src/browser/navigation/navigation-location-service.ts +284 -284
- package/src/browser/navigation/navigation-location-similarity.spec.ts +46 -46
- package/src/browser/navigation/navigation-location-similarity.ts +58 -58
- package/src/browser/navigation/navigation-location-updater.spec.ts +197 -197
- package/src/browser/navigation/navigation-location-updater.ts +220 -220
- package/src/browser/navigation/navigation-location.ts +418 -418
- package/src/browser/navigation/test/mock-navigation-location-updater.ts +41 -41
- package/src/browser/quick-editor-service.ts +94 -94
- package/src/browser/style/index.css +19 -19
- package/src/browser/undo-redo-service.ts +120 -120
- package/src/common/language-selector.ts +104 -104
- package/src/package.spec.ts +28 -28
|
@@ -1,116 +1,116 @@
|
|
|
1
|
-
import URI from '@theia/core/lib/common/uri';
|
|
2
|
-
import { RecursivePartial, Emitter, Event, MaybePromise, CommandService } from '@theia/core/lib/common';
|
|
3
|
-
import { WidgetOpenerOptions, NavigatableWidgetOpenHandler, NavigatableWidgetOptions, PreferenceService } from '@theia/core/lib/browser';
|
|
4
|
-
import { EditorWidget } from './editor-widget';
|
|
5
|
-
import { Range, Position, Location, TextEditor } from './editor';
|
|
6
|
-
export interface WidgetId {
|
|
7
|
-
id: number;
|
|
8
|
-
uri: string;
|
|
9
|
-
}
|
|
10
|
-
export interface EditorOpenerOptions extends WidgetOpenerOptions {
|
|
11
|
-
selection?: RecursivePartial<Range>;
|
|
12
|
-
preview?: boolean;
|
|
13
|
-
counter?: number;
|
|
14
|
-
}
|
|
15
|
-
export declare class EditorManager extends NavigatableWidgetOpenHandler<EditorWidget> {
|
|
16
|
-
readonly id: string;
|
|
17
|
-
readonly label = "Code Editor";
|
|
18
|
-
protected readonly editorCounters: Map<string, number>;
|
|
19
|
-
protected readonly onActiveEditorChangedEmitter: Emitter<EditorWidget | undefined>;
|
|
20
|
-
/**
|
|
21
|
-
* Emit when the active editor is changed.
|
|
22
|
-
*/
|
|
23
|
-
readonly onActiveEditorChanged: Event<EditorWidget | undefined>;
|
|
24
|
-
protected readonly onCurrentEditorChangedEmitter: Emitter<EditorWidget | undefined>;
|
|
25
|
-
/**
|
|
26
|
-
* Emit when the current editor is changed.
|
|
27
|
-
*/
|
|
28
|
-
readonly onCurrentEditorChanged: Event<EditorWidget | undefined>;
|
|
29
|
-
protected readonly commands: CommandService;
|
|
30
|
-
protected readonly preferenceService: PreferenceService;
|
|
31
|
-
protected init(): void;
|
|
32
|
-
getByUri(uri: URI, options?: EditorOpenerOptions): Promise<EditorWidget | undefined>;
|
|
33
|
-
getOrCreateByUri(uri: URI, options?: EditorOpenerOptions): Promise<EditorWidget>;
|
|
34
|
-
protected tryGetPendingWidget(uri: URI, options?: EditorOpenerOptions): MaybePromise<EditorWidget> | undefined;
|
|
35
|
-
protected getWidget(uri: URI, options?: EditorOpenerOptions): Promise<EditorWidget | undefined>;
|
|
36
|
-
protected getOrCreateWidget(uri: URI, options?: EditorOpenerOptions): Promise<EditorWidget>;
|
|
37
|
-
protected readonly recentlyVisibleIds: string[];
|
|
38
|
-
protected get recentlyVisible(): EditorWidget | undefined;
|
|
39
|
-
protected addRecentlyVisible(widget: EditorWidget): void;
|
|
40
|
-
protected removeRecentlyVisible(widget: EditorWidget): void;
|
|
41
|
-
protected _activeEditor: EditorWidget | undefined;
|
|
42
|
-
/**
|
|
43
|
-
* The active editor.
|
|
44
|
-
* If there is an active editor (one that has focus), active and current are the same.
|
|
45
|
-
*/
|
|
46
|
-
get activeEditor(): EditorWidget | undefined;
|
|
47
|
-
protected setActiveEditor(active: EditorWidget | undefined): void;
|
|
48
|
-
protected updateActiveEditor(): void;
|
|
49
|
-
protected _currentEditor: EditorWidget | undefined;
|
|
50
|
-
/**
|
|
51
|
-
* The most recently activated editor (which might not have the focus anymore, hence it is not active).
|
|
52
|
-
* 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.
|
|
53
|
-
*/
|
|
54
|
-
get currentEditor(): EditorWidget | undefined;
|
|
55
|
-
protected setCurrentEditor(current: EditorWidget | undefined): void;
|
|
56
|
-
protected updateCurrentEditor(): void;
|
|
57
|
-
canHandle(uri: URI, options?: WidgetOpenerOptions): number;
|
|
58
|
-
open(uri: URI, options?: EditorOpenerOptions): Promise<EditorWidget>;
|
|
59
|
-
/**
|
|
60
|
-
* Opens an editor to the side of the current editor. Defaults to opening to the right.
|
|
61
|
-
* To modify direction, pass options with `{widgetOptions: {mode: ...}}`
|
|
62
|
-
*/
|
|
63
|
-
openToSide(uri: URI, options?: EditorOpenerOptions): Promise<EditorWidget>;
|
|
64
|
-
protected revealSelection(widget: EditorWidget, input?: EditorOpenerOptions, uri?: URI): void;
|
|
65
|
-
protected getSelection(widget: EditorWidget, selection: RecursivePartial<Range>): Range | Position | undefined;
|
|
66
|
-
protected removeFromCounter(widget: EditorWidget): void;
|
|
67
|
-
protected extractIdFromWidget(widget: EditorWidget): WidgetId;
|
|
68
|
-
protected checkCounterForWidget(widget: EditorWidget): void;
|
|
69
|
-
protected createCounterForUri(uri: URI): number;
|
|
70
|
-
protected getCounterForUri(uri: URI): number | undefined;
|
|
71
|
-
protected getOrCreateCounterForUri(uri: URI): number;
|
|
72
|
-
protected createWidgetOptions(uri: URI, options?: EditorOpenerOptions): NavigatableWidgetOptions;
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Provides direct access to the underlying text editor.
|
|
76
|
-
*/
|
|
77
|
-
export declare abstract class EditorAccess {
|
|
78
|
-
protected readonly editorManager: EditorManager;
|
|
79
|
-
/**
|
|
80
|
-
* The URI of the underlying document from the editor.
|
|
81
|
-
*/
|
|
82
|
-
get uri(): string | undefined;
|
|
83
|
-
/**
|
|
84
|
-
* The selection location from the text editor.
|
|
85
|
-
*/
|
|
86
|
-
get selection(): Location | undefined;
|
|
87
|
-
/**
|
|
88
|
-
* The unique identifier of the language the current editor belongs to.
|
|
89
|
-
*/
|
|
90
|
-
get languageId(): string | undefined;
|
|
91
|
-
/**
|
|
92
|
-
* The text editor.
|
|
93
|
-
*/
|
|
94
|
-
get editor(): TextEditor | undefined;
|
|
95
|
-
/**
|
|
96
|
-
* The editor widget, or `undefined` if not applicable.
|
|
97
|
-
*/
|
|
98
|
-
protected abstract editorWidget(): EditorWidget | undefined;
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Provides direct access to the currently active text editor.
|
|
102
|
-
*/
|
|
103
|
-
export declare class CurrentEditorAccess extends EditorAccess {
|
|
104
|
-
protected editorWidget(): EditorWidget | undefined;
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* Provides access to the active text editor.
|
|
108
|
-
*/
|
|
109
|
-
export declare class ActiveEditorAccess extends EditorAccess {
|
|
110
|
-
protected editorWidget(): EditorWidget | undefined;
|
|
111
|
-
}
|
|
112
|
-
export declare namespace EditorAccess {
|
|
113
|
-
const CURRENT = "current-editor-access";
|
|
114
|
-
const ACTIVE = "active-editor-access";
|
|
115
|
-
}
|
|
1
|
+
import URI from '@theia/core/lib/common/uri';
|
|
2
|
+
import { RecursivePartial, Emitter, Event, MaybePromise, CommandService } from '@theia/core/lib/common';
|
|
3
|
+
import { WidgetOpenerOptions, NavigatableWidgetOpenHandler, NavigatableWidgetOptions, PreferenceService } from '@theia/core/lib/browser';
|
|
4
|
+
import { EditorWidget } from './editor-widget';
|
|
5
|
+
import { Range, Position, Location, TextEditor } from './editor';
|
|
6
|
+
export interface WidgetId {
|
|
7
|
+
id: number;
|
|
8
|
+
uri: string;
|
|
9
|
+
}
|
|
10
|
+
export interface EditorOpenerOptions extends WidgetOpenerOptions {
|
|
11
|
+
selection?: RecursivePartial<Range>;
|
|
12
|
+
preview?: boolean;
|
|
13
|
+
counter?: number;
|
|
14
|
+
}
|
|
15
|
+
export declare class EditorManager extends NavigatableWidgetOpenHandler<EditorWidget> {
|
|
16
|
+
readonly id: string;
|
|
17
|
+
readonly label = "Code Editor";
|
|
18
|
+
protected readonly editorCounters: Map<string, number>;
|
|
19
|
+
protected readonly onActiveEditorChangedEmitter: Emitter<EditorWidget | undefined>;
|
|
20
|
+
/**
|
|
21
|
+
* Emit when the active editor is changed.
|
|
22
|
+
*/
|
|
23
|
+
readonly onActiveEditorChanged: Event<EditorWidget | undefined>;
|
|
24
|
+
protected readonly onCurrentEditorChangedEmitter: Emitter<EditorWidget | undefined>;
|
|
25
|
+
/**
|
|
26
|
+
* Emit when the current editor is changed.
|
|
27
|
+
*/
|
|
28
|
+
readonly onCurrentEditorChanged: Event<EditorWidget | undefined>;
|
|
29
|
+
protected readonly commands: CommandService;
|
|
30
|
+
protected readonly preferenceService: PreferenceService;
|
|
31
|
+
protected init(): void;
|
|
32
|
+
getByUri(uri: URI, options?: EditorOpenerOptions): Promise<EditorWidget | undefined>;
|
|
33
|
+
getOrCreateByUri(uri: URI, options?: EditorOpenerOptions): Promise<EditorWidget>;
|
|
34
|
+
protected tryGetPendingWidget(uri: URI, options?: EditorOpenerOptions): MaybePromise<EditorWidget> | undefined;
|
|
35
|
+
protected getWidget(uri: URI, options?: EditorOpenerOptions): Promise<EditorWidget | undefined>;
|
|
36
|
+
protected getOrCreateWidget(uri: URI, options?: EditorOpenerOptions): Promise<EditorWidget>;
|
|
37
|
+
protected readonly recentlyVisibleIds: string[];
|
|
38
|
+
protected get recentlyVisible(): EditorWidget | undefined;
|
|
39
|
+
protected addRecentlyVisible(widget: EditorWidget): void;
|
|
40
|
+
protected removeRecentlyVisible(widget: EditorWidget): void;
|
|
41
|
+
protected _activeEditor: EditorWidget | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* The active editor.
|
|
44
|
+
* If there is an active editor (one that has focus), active and current are the same.
|
|
45
|
+
*/
|
|
46
|
+
get activeEditor(): EditorWidget | undefined;
|
|
47
|
+
protected setActiveEditor(active: EditorWidget | undefined): void;
|
|
48
|
+
protected updateActiveEditor(): void;
|
|
49
|
+
protected _currentEditor: EditorWidget | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* The most recently activated editor (which might not have the focus anymore, hence it is not active).
|
|
52
|
+
* 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.
|
|
53
|
+
*/
|
|
54
|
+
get currentEditor(): EditorWidget | undefined;
|
|
55
|
+
protected setCurrentEditor(current: EditorWidget | undefined): void;
|
|
56
|
+
protected updateCurrentEditor(): void;
|
|
57
|
+
canHandle(uri: URI, options?: WidgetOpenerOptions): number;
|
|
58
|
+
open(uri: URI, options?: EditorOpenerOptions): Promise<EditorWidget>;
|
|
59
|
+
/**
|
|
60
|
+
* Opens an editor to the side of the current editor. Defaults to opening to the right.
|
|
61
|
+
* To modify direction, pass options with `{widgetOptions: {mode: ...}}`
|
|
62
|
+
*/
|
|
63
|
+
openToSide(uri: URI, options?: EditorOpenerOptions): Promise<EditorWidget>;
|
|
64
|
+
protected revealSelection(widget: EditorWidget, input?: EditorOpenerOptions, uri?: URI): void;
|
|
65
|
+
protected getSelection(widget: EditorWidget, selection: RecursivePartial<Range>): Range | Position | undefined;
|
|
66
|
+
protected removeFromCounter(widget: EditorWidget): void;
|
|
67
|
+
protected extractIdFromWidget(widget: EditorWidget): WidgetId;
|
|
68
|
+
protected checkCounterForWidget(widget: EditorWidget): void;
|
|
69
|
+
protected createCounterForUri(uri: URI): number;
|
|
70
|
+
protected getCounterForUri(uri: URI): number | undefined;
|
|
71
|
+
protected getOrCreateCounterForUri(uri: URI): number;
|
|
72
|
+
protected createWidgetOptions(uri: URI, options?: EditorOpenerOptions): NavigatableWidgetOptions;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Provides direct access to the underlying text editor.
|
|
76
|
+
*/
|
|
77
|
+
export declare abstract class EditorAccess {
|
|
78
|
+
protected readonly editorManager: EditorManager;
|
|
79
|
+
/**
|
|
80
|
+
* The URI of the underlying document from the editor.
|
|
81
|
+
*/
|
|
82
|
+
get uri(): string | undefined;
|
|
83
|
+
/**
|
|
84
|
+
* The selection location from the text editor.
|
|
85
|
+
*/
|
|
86
|
+
get selection(): Location | undefined;
|
|
87
|
+
/**
|
|
88
|
+
* The unique identifier of the language the current editor belongs to.
|
|
89
|
+
*/
|
|
90
|
+
get languageId(): string | undefined;
|
|
91
|
+
/**
|
|
92
|
+
* The text editor.
|
|
93
|
+
*/
|
|
94
|
+
get editor(): TextEditor | undefined;
|
|
95
|
+
/**
|
|
96
|
+
* The editor widget, or `undefined` if not applicable.
|
|
97
|
+
*/
|
|
98
|
+
protected abstract editorWidget(): EditorWidget | undefined;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Provides direct access to the currently active text editor.
|
|
102
|
+
*/
|
|
103
|
+
export declare class CurrentEditorAccess extends EditorAccess {
|
|
104
|
+
protected editorWidget(): EditorWidget | undefined;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Provides access to the active text editor.
|
|
108
|
+
*/
|
|
109
|
+
export declare class ActiveEditorAccess extends EditorAccess {
|
|
110
|
+
protected editorWidget(): EditorWidget | undefined;
|
|
111
|
+
}
|
|
112
|
+
export declare namespace EditorAccess {
|
|
113
|
+
const CURRENT = "current-editor-access";
|
|
114
|
+
const ACTIVE = "active-editor-access";
|
|
115
|
+
}
|
|
116
116
|
//# sourceMappingURL=editor-manager.d.ts.map
|