@theia/editor 1.53.0-next.5 → 1.53.0-next.55

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.
Files changed (48) hide show
  1. package/README.md +30 -30
  2. package/lib/browser/editor-manager.d.ts.map +1 -1
  3. package/lib/browser/editor-manager.js +11 -4
  4. package/lib/browser/editor-manager.js.map +1 -1
  5. package/lib/browser/editor-variable-contribution.d.ts.map +1 -1
  6. package/lib/browser/editor-variable-contribution.js +9 -1
  7. package/lib/browser/editor-variable-contribution.js.map +1 -1
  8. package/lib/browser/editor.d.ts +5 -2
  9. package/lib/browser/editor.d.ts.map +1 -1
  10. package/lib/browser/editor.js.map +1 -1
  11. package/lib/browser/navigation/navigation-location-service.js +3 -3
  12. package/package.json +5 -5
  13. package/src/browser/decorations/editor-decoration-style.ts +41 -41
  14. package/src/browser/decorations/editor-decoration.ts +127 -127
  15. package/src/browser/decorations/editor-decorator.ts +36 -36
  16. package/src/browser/decorations/index.ts +19 -19
  17. package/src/browser/diff-navigator.ts +27 -27
  18. package/src/browser/editor-command.ts +393 -393
  19. package/src/browser/editor-contribution.ts +185 -185
  20. package/src/browser/editor-frontend-module.ts +90 -90
  21. package/src/browser/editor-generated-preference-schema.ts +2956 -2956
  22. package/src/browser/editor-keybinding.ts +55 -55
  23. package/src/browser/editor-language-quick-pick-service.ts +68 -68
  24. package/src/browser/editor-linenumber-contribution.ts +88 -88
  25. package/src/browser/editor-manager.ts +462 -452
  26. package/src/browser/editor-menu.ts +224 -224
  27. package/src/browser/editor-navigation-contribution.ts +343 -343
  28. package/src/browser/editor-preferences.ts +226 -226
  29. package/src/browser/editor-variable-contribution.ts +62 -54
  30. package/src/browser/editor-widget-factory.ts +82 -82
  31. package/src/browser/editor-widget.ts +139 -139
  32. package/src/browser/editor.ts +366 -362
  33. package/src/browser/index.ts +26 -26
  34. package/src/browser/language-status/editor-language-status-service.ts +271 -271
  35. package/src/browser/language-status/editor-language-status.css +101 -101
  36. package/src/browser/navigation/navigation-location-service.spec.ts +245 -245
  37. package/src/browser/navigation/navigation-location-service.ts +284 -284
  38. package/src/browser/navigation/navigation-location-similarity.spec.ts +46 -46
  39. package/src/browser/navigation/navigation-location-similarity.ts +58 -58
  40. package/src/browser/navigation/navigation-location-updater.spec.ts +197 -197
  41. package/src/browser/navigation/navigation-location-updater.ts +220 -220
  42. package/src/browser/navigation/navigation-location.ts +418 -418
  43. package/src/browser/navigation/test/mock-navigation-location-updater.ts +41 -41
  44. package/src/browser/quick-editor-service.ts +94 -94
  45. package/src/browser/style/index.css +19 -19
  46. package/src/browser/undo-redo-service.ts +120 -120
  47. package/src/common/language-selector.ts +104 -104
  48. package/src/package.spec.ts +28 -28
@@ -1,127 +1,127 @@
1
- // *****************************************************************************
2
- // Copyright (C) 2018 TypeFox and others.
3
- //
4
- // This program and the accompanying materials are made available under the
5
- // terms of the Eclipse Public License v. 2.0 which is available at
6
- // http://www.eclipse.org/legal/epl-2.0.
7
- //
8
- // This Source Code may also be made available under the following Secondary
9
- // Licenses when the conditions for such availability set forth in the Eclipse
10
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
- // with the GNU Classpath Exception which is available at
12
- // https://www.gnu.org/software/classpath/license.html.
13
- //
14
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
- // *****************************************************************************
16
-
17
- import { Range } from '@theia/core/shared/vscode-languageserver-protocol';
18
-
19
- export interface EditorDecoration {
20
- /**
21
- * range to which this decoration instance is applied.
22
- */
23
- range: Range;
24
- /**
25
- * options to be applied with this decoration.
26
- */
27
- options: EditorDecorationOptions
28
- }
29
-
30
- export interface EditorDecorationOptions {
31
- /**
32
- * behavior of decorations when typing/editing near their edges.
33
- */
34
- stickiness?: TrackedRangeStickiness;
35
- /**
36
- * CSS class name of this decoration.
37
- */
38
- className?: string;
39
- /**
40
- * hover message for this decoration.
41
- */
42
- hoverMessage?: string;
43
- /**
44
- * the decoration will be rendered in the glyph margin with this class name.
45
- */
46
- glyphMarginClassName?: string;
47
- /**
48
- * hover message for the glyph margin of this decoration.
49
- */
50
- glyphMarginHoverMessage?: string;
51
- /**
52
- * should the decoration be rendered for the whole line.
53
- */
54
- isWholeLine?: boolean;
55
- /**
56
- * the decoration will be rendered in the lines decorations with this class name.
57
- */
58
- linesDecorationsClassName?: string;
59
- /**
60
- * the decoration will be rendered in the margin in full width with this class name.
61
- */
62
- marginClassName?: string;
63
- /**
64
- * the decoration will be rendered inline with this class name.
65
- * to be used only to change text, otherwise use `className`.
66
- */
67
- inlineClassName?: string;
68
- /**
69
- * the decoration will be rendered before the text with this class name.
70
- */
71
- beforeContentClassName?: string;
72
- /**
73
- * the decoration will be rendered after the text with this class name.
74
- */
75
- afterContentClassName?: string;
76
- /**
77
- * render this decoration in the overview ruler.
78
- */
79
- overviewRuler?: DecorationOverviewRulerOptions;
80
- /**
81
- * If set, render this decoration in the minimap.
82
- */
83
- minimap?: DecorationMinimapOptions;
84
- }
85
-
86
- export interface DecorationOptions {
87
- /**
88
- * color of the decoration in the overview ruler.
89
- * use `rgba` values to play well with other decorations.
90
- */
91
- color: string | { id: string } | undefined;
92
-
93
- /**
94
- * The color to use in dark themes. Will be favored over `color` except in light themes.
95
- */
96
- darkColor?: string | { id: string };
97
- }
98
-
99
- export enum MinimapPosition {
100
- Inline = 1,
101
- Gutter = 2
102
- }
103
-
104
- export interface DecorationMinimapOptions extends DecorationOptions {
105
- position: MinimapPosition;
106
- }
107
-
108
- export interface DecorationOverviewRulerOptions extends DecorationOptions {
109
- /**
110
- * position in the overview ruler.
111
- */
112
- position: OverviewRulerLane;
113
- }
114
-
115
- export enum OverviewRulerLane {
116
- Left = 1,
117
- Center = 2,
118
- Right = 4,
119
- Full = 7
120
- }
121
-
122
- export enum TrackedRangeStickiness {
123
- AlwaysGrowsWhenTypingAtEdges = 0,
124
- NeverGrowsWhenTypingAtEdges = 1,
125
- GrowsOnlyWhenTypingBefore = 2,
126
- GrowsOnlyWhenTypingAfter = 3,
127
- }
1
+ // *****************************************************************************
2
+ // Copyright (C) 2018 TypeFox and others.
3
+ //
4
+ // This program and the accompanying materials are made available under the
5
+ // terms of the Eclipse Public License v. 2.0 which is available at
6
+ // http://www.eclipse.org/legal/epl-2.0.
7
+ //
8
+ // This Source Code may also be made available under the following Secondary
9
+ // Licenses when the conditions for such availability set forth in the Eclipse
10
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ // with the GNU Classpath Exception which is available at
12
+ // https://www.gnu.org/software/classpath/license.html.
13
+ //
14
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
+ // *****************************************************************************
16
+
17
+ import { Range } from '@theia/core/shared/vscode-languageserver-protocol';
18
+
19
+ export interface EditorDecoration {
20
+ /**
21
+ * range to which this decoration instance is applied.
22
+ */
23
+ range: Range;
24
+ /**
25
+ * options to be applied with this decoration.
26
+ */
27
+ options: EditorDecorationOptions
28
+ }
29
+
30
+ export interface EditorDecorationOptions {
31
+ /**
32
+ * behavior of decorations when typing/editing near their edges.
33
+ */
34
+ stickiness?: TrackedRangeStickiness;
35
+ /**
36
+ * CSS class name of this decoration.
37
+ */
38
+ className?: string;
39
+ /**
40
+ * hover message for this decoration.
41
+ */
42
+ hoverMessage?: string;
43
+ /**
44
+ * the decoration will be rendered in the glyph margin with this class name.
45
+ */
46
+ glyphMarginClassName?: string;
47
+ /**
48
+ * hover message for the glyph margin of this decoration.
49
+ */
50
+ glyphMarginHoverMessage?: string;
51
+ /**
52
+ * should the decoration be rendered for the whole line.
53
+ */
54
+ isWholeLine?: boolean;
55
+ /**
56
+ * the decoration will be rendered in the lines decorations with this class name.
57
+ */
58
+ linesDecorationsClassName?: string;
59
+ /**
60
+ * the decoration will be rendered in the margin in full width with this class name.
61
+ */
62
+ marginClassName?: string;
63
+ /**
64
+ * the decoration will be rendered inline with this class name.
65
+ * to be used only to change text, otherwise use `className`.
66
+ */
67
+ inlineClassName?: string;
68
+ /**
69
+ * the decoration will be rendered before the text with this class name.
70
+ */
71
+ beforeContentClassName?: string;
72
+ /**
73
+ * the decoration will be rendered after the text with this class name.
74
+ */
75
+ afterContentClassName?: string;
76
+ /**
77
+ * render this decoration in the overview ruler.
78
+ */
79
+ overviewRuler?: DecorationOverviewRulerOptions;
80
+ /**
81
+ * If set, render this decoration in the minimap.
82
+ */
83
+ minimap?: DecorationMinimapOptions;
84
+ }
85
+
86
+ export interface DecorationOptions {
87
+ /**
88
+ * color of the decoration in the overview ruler.
89
+ * use `rgba` values to play well with other decorations.
90
+ */
91
+ color: string | { id: string } | undefined;
92
+
93
+ /**
94
+ * The color to use in dark themes. Will be favored over `color` except in light themes.
95
+ */
96
+ darkColor?: string | { id: string };
97
+ }
98
+
99
+ export enum MinimapPosition {
100
+ Inline = 1,
101
+ Gutter = 2
102
+ }
103
+
104
+ export interface DecorationMinimapOptions extends DecorationOptions {
105
+ position: MinimapPosition;
106
+ }
107
+
108
+ export interface DecorationOverviewRulerOptions extends DecorationOptions {
109
+ /**
110
+ * position in the overview ruler.
111
+ */
112
+ position: OverviewRulerLane;
113
+ }
114
+
115
+ export enum OverviewRulerLane {
116
+ Left = 1,
117
+ Center = 2,
118
+ Right = 4,
119
+ Full = 7
120
+ }
121
+
122
+ export enum TrackedRangeStickiness {
123
+ AlwaysGrowsWhenTypingAtEdges = 0,
124
+ NeverGrowsWhenTypingAtEdges = 1,
125
+ GrowsOnlyWhenTypingBefore = 2,
126
+ GrowsOnlyWhenTypingAfter = 3,
127
+ }
@@ -1,36 +1,36 @@
1
- // *****************************************************************************
2
- // Copyright (C) 2018 TypeFox and others.
3
- //
4
- // This program and the accompanying materials are made available under the
5
- // terms of the Eclipse Public License v. 2.0 which is available at
6
- // http://www.eclipse.org/legal/epl-2.0.
7
- //
8
- // This Source Code may also be made available under the following Secondary
9
- // Licenses when the conditions for such availability set forth in the Eclipse
10
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
- // with the GNU Classpath Exception which is available at
12
- // https://www.gnu.org/software/classpath/license.html.
13
- //
14
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
- // *****************************************************************************
16
-
17
- import { injectable } from '@theia/core/shared/inversify';
18
- import { TextEditor } from '../editor';
19
- import { EditorDecoration } from './editor-decoration';
20
-
21
- @injectable()
22
- export abstract class EditorDecorator {
23
-
24
- protected readonly appliedDecorations = new Map<string, string[]>();
25
-
26
- protected setDecorations(editor: TextEditor, newDecorations: EditorDecoration[]): void {
27
- const uri = editor.uri.toString();
28
- const oldDecorations = this.appliedDecorations.get(uri) || [];
29
- if (oldDecorations.length === 0 && newDecorations.length === 0) {
30
- return;
31
- }
32
- const decorationIds = editor.deltaDecorations({ oldDecorations, newDecorations });
33
- this.appliedDecorations.set(uri, decorationIds);
34
- }
35
-
36
- }
1
+ // *****************************************************************************
2
+ // Copyright (C) 2018 TypeFox and others.
3
+ //
4
+ // This program and the accompanying materials are made available under the
5
+ // terms of the Eclipse Public License v. 2.0 which is available at
6
+ // http://www.eclipse.org/legal/epl-2.0.
7
+ //
8
+ // This Source Code may also be made available under the following Secondary
9
+ // Licenses when the conditions for such availability set forth in the Eclipse
10
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ // with the GNU Classpath Exception which is available at
12
+ // https://www.gnu.org/software/classpath/license.html.
13
+ //
14
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
+ // *****************************************************************************
16
+
17
+ import { injectable } from '@theia/core/shared/inversify';
18
+ import { TextEditor } from '../editor';
19
+ import { EditorDecoration } from './editor-decoration';
20
+
21
+ @injectable()
22
+ export abstract class EditorDecorator {
23
+
24
+ protected readonly appliedDecorations = new Map<string, string[]>();
25
+
26
+ protected setDecorations(editor: TextEditor, newDecorations: EditorDecoration[]): void {
27
+ const uri = editor.uri.toString();
28
+ const oldDecorations = this.appliedDecorations.get(uri) || [];
29
+ if (oldDecorations.length === 0 && newDecorations.length === 0) {
30
+ return;
31
+ }
32
+ const decorationIds = editor.deltaDecorations({ oldDecorations, newDecorations });
33
+ this.appliedDecorations.set(uri, decorationIds);
34
+ }
35
+
36
+ }
@@ -1,19 +1,19 @@
1
- // *****************************************************************************
2
- // Copyright (C) 2018 TypeFox and others.
3
- //
4
- // This program and the accompanying materials are made available under the
5
- // terms of the Eclipse Public License v. 2.0 which is available at
6
- // http://www.eclipse.org/legal/epl-2.0.
7
- //
8
- // This Source Code may also be made available under the following Secondary
9
- // Licenses when the conditions for such availability set forth in the Eclipse
10
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
- // with the GNU Classpath Exception which is available at
12
- // https://www.gnu.org/software/classpath/license.html.
13
- //
14
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
- // *****************************************************************************
16
-
17
- export * from './editor-decoration';
18
- export * from './editor-decoration-style';
19
- export * from './editor-decorator';
1
+ // *****************************************************************************
2
+ // Copyright (C) 2018 TypeFox and others.
3
+ //
4
+ // This program and the accompanying materials are made available under the
5
+ // terms of the Eclipse Public License v. 2.0 which is available at
6
+ // http://www.eclipse.org/legal/epl-2.0.
7
+ //
8
+ // This Source Code may also be made available under the following Secondary
9
+ // Licenses when the conditions for such availability set forth in the Eclipse
10
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ // with the GNU Classpath Exception which is available at
12
+ // https://www.gnu.org/software/classpath/license.html.
13
+ //
14
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
+ // *****************************************************************************
16
+
17
+ export * from './editor-decoration';
18
+ export * from './editor-decoration-style';
19
+ export * from './editor-decorator';
@@ -1,27 +1,27 @@
1
- // *****************************************************************************
2
- // Copyright (C) 2018 TypeFox and others.
3
- //
4
- // This program and the accompanying materials are made available under the
5
- // terms of the Eclipse Public License v. 2.0 which is available at
6
- // http://www.eclipse.org/legal/epl-2.0.
7
- //
8
- // This Source Code may also be made available under the following Secondary
9
- // Licenses when the conditions for such availability set forth in the Eclipse
10
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
- // with the GNU Classpath Exception which is available at
12
- // https://www.gnu.org/software/classpath/license.html.
13
- //
14
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
- // *****************************************************************************
16
-
17
- import { TextEditor } from './editor';
18
-
19
- export interface DiffNavigator {
20
- hasNext(): boolean;
21
- hasPrevious(): boolean;
22
- next(): void;
23
- previous(): void;
24
- }
25
-
26
- export const DiffNavigatorProvider = Symbol('DiffNavigatorProvider');
27
- export type DiffNavigatorProvider = (editor: TextEditor) => DiffNavigator;
1
+ // *****************************************************************************
2
+ // Copyright (C) 2018 TypeFox and others.
3
+ //
4
+ // This program and the accompanying materials are made available under the
5
+ // terms of the Eclipse Public License v. 2.0 which is available at
6
+ // http://www.eclipse.org/legal/epl-2.0.
7
+ //
8
+ // This Source Code may also be made available under the following Secondary
9
+ // Licenses when the conditions for such availability set forth in the Eclipse
10
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ // with the GNU Classpath Exception which is available at
12
+ // https://www.gnu.org/software/classpath/license.html.
13
+ //
14
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
+ // *****************************************************************************
16
+
17
+ import { TextEditor } from './editor';
18
+
19
+ export interface DiffNavigator {
20
+ hasNext(): boolean;
21
+ hasPrevious(): boolean;
22
+ next(): void;
23
+ previous(): void;
24
+ }
25
+
26
+ export const DiffNavigatorProvider = Symbol('DiffNavigatorProvider');
27
+ export type DiffNavigatorProvider = (editor: TextEditor) => DiffNavigator;