@theia/editor 1.46.1 → 1.47.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/decorations/editor-decorator.js +2 -7
- package/lib/browser/decorations/editor-decorator.js.map +1 -1
- package/lib/browser/decorations/index.js +4 -13
- package/lib/browser/decorations/index.js.map +1 -1
- package/lib/browser/diff-navigator.d.ts +0 -1
- package/lib/browser/diff-navigator.d.ts.map +1 -1
- package/lib/browser/diff-navigator.js.map +1 -1
- package/lib/browser/editor-command.js +24 -32
- package/lib/browser/editor-command.js.map +1 -1
- package/lib/browser/editor-contribution.js +14 -22
- package/lib/browser/editor-contribution.js.map +1 -1
- package/lib/browser/editor-generated-preference-schema.d.ts +38 -5
- package/lib/browser/editor-generated-preference-schema.d.ts.map +1 -1
- package/lib/browser/editor-generated-preference-schema.js +413 -278
- package/lib/browser/editor-generated-preference-schema.js.map +1 -1
- package/lib/browser/editor-keybinding.js +2 -7
- package/lib/browser/editor-keybinding.js.map +1 -1
- package/lib/browser/editor-linenumber-contribution.d.ts.map +1 -1
- package/lib/browser/editor-linenumber-contribution.js +9 -18
- package/lib/browser/editor-linenumber-contribution.js.map +1 -1
- package/lib/browser/editor-manager.js +15 -23
- package/lib/browser/editor-manager.js.map +1 -1
- package/lib/browser/editor-menu.js +2 -7
- package/lib/browser/editor-menu.js.map +1 -1
- package/lib/browser/editor-navigation-contribution.js +18 -26
- package/lib/browser/editor-navigation-contribution.js.map +1 -1
- package/lib/browser/editor-variable-contribution.js +4 -12
- package/lib/browser/editor-variable-contribution.js.map +1 -1
- package/lib/browser/editor-widget-factory.js +8 -16
- package/lib/browser/editor-widget-factory.js.map +1 -1
- package/lib/browser/editor-widget.d.ts.map +1 -1
- package/lib/browser/editor-widget.js +8 -0
- package/lib/browser/editor-widget.js.map +1 -1
- package/lib/browser/editor.d.ts +3 -1
- package/lib/browser/editor.d.ts.map +1 -1
- package/lib/browser/editor.js.map +1 -1
- package/lib/browser/index.js +11 -20
- package/lib/browser/index.js.map +1 -1
- package/lib/browser/language-status/editor-language-status-service.js +12 -20
- package/lib/browser/language-status/editor-language-status-service.js.map +1 -1
- package/lib/browser/navigation/navigation-location-service.js +10 -18
- package/lib/browser/navigation/navigation-location-service.js.map +1 -1
- package/lib/browser/navigation/navigation-location-similarity.js +2 -7
- package/lib/browser/navigation/navigation-location-similarity.js.map +1 -1
- package/lib/browser/navigation/navigation-location-updater.js +2 -7
- package/lib/browser/navigation/navigation-location-updater.js.map +1 -1
- package/lib/browser/quick-editor-service.js +8 -16
- package/lib/browser/quick-editor-service.js.map +1 -1
- package/lib/browser/undo-redo-service.js +2 -7
- package/lib/browser/undo-redo-service.js.map +1 -1
- package/package.json +6 -5
- package/src/browser/diff-navigator.ts +0 -1
- package/src/browser/editor-generated-preference-schema.ts +451 -283
- package/src/browser/editor-linenumber-contribution.ts +1 -2
- package/src/browser/editor-widget.ts +8 -1
- package/src/browser/editor.ts +3 -1
|
@@ -69,8 +69,7 @@ export class EditorLineNumberContribution implements FrontendApplicationContribu
|
|
|
69
69
|
menuPath: EDITOR_LINENUMBER_CONTEXT_MENU,
|
|
70
70
|
anchor: event.event,
|
|
71
71
|
args,
|
|
72
|
-
contextKeyService
|
|
73
|
-
onHide: () => contextKeyService.dispose()
|
|
72
|
+
contextKeyService
|
|
74
73
|
});
|
|
75
74
|
});
|
|
76
75
|
}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
17
|
import { Disposable, SelectionService, Event, UNTITLED_SCHEME, DisposableCollection } from '@theia/core/lib/common';
|
|
18
|
-
import { Widget, BaseWidget, Message, Saveable, SaveableSource, Navigatable, StatefulWidget, lock, TabBar, DockPanel } from '@theia/core/lib/browser';
|
|
18
|
+
import { Widget, BaseWidget, Message, Saveable, SaveableSource, Navigatable, StatefulWidget, lock, TabBar, DockPanel, unlock } from '@theia/core/lib/browser';
|
|
19
19
|
import URI from '@theia/core/lib/common/uri';
|
|
20
20
|
import { find } from '@theia/core/shared/@phosphor/algorithm';
|
|
21
21
|
import { TextEditor } from './editor';
|
|
@@ -38,6 +38,13 @@ export class EditorWidget extends BaseWidget implements SaveableSource, Navigata
|
|
|
38
38
|
this.toDispose.push(this.toDisposeOnTabbarChange);
|
|
39
39
|
this.toDispose.push(this.editor.onSelectionChanged(() => this.setSelection()));
|
|
40
40
|
this.toDispose.push(this.editor.onFocusChanged(() => this.setSelection()));
|
|
41
|
+
this.toDispose.push(this.editor.onDidChangeReadOnly(isReadonly => {
|
|
42
|
+
if (isReadonly) {
|
|
43
|
+
lock(this.title);
|
|
44
|
+
} else {
|
|
45
|
+
unlock(this.title);
|
|
46
|
+
}
|
|
47
|
+
}));
|
|
41
48
|
this.toDispose.push(Disposable.create(() => {
|
|
42
49
|
if (this.selectionService.selection === this.editor) {
|
|
43
50
|
this.selectionService.selection = undefined;
|
package/src/browser/editor.ts
CHANGED
|
@@ -20,6 +20,7 @@ import URI from '@theia/core/lib/common/uri';
|
|
|
20
20
|
import { Event, Disposable, TextDocumentContentChangeDelta, Reference, isObject } from '@theia/core/lib/common';
|
|
21
21
|
import { Saveable, Navigatable, Widget } from '@theia/core/lib/browser';
|
|
22
22
|
import { EditorDecoration } from './decorations/editor-decoration';
|
|
23
|
+
import { MarkdownString } from '@theia/core/lib/common/markdown-rendering';
|
|
23
24
|
|
|
24
25
|
export { Position, Range, Location };
|
|
25
26
|
|
|
@@ -207,7 +208,8 @@ export interface TextEditor extends Disposable, TextEditorSelection, Navigatable
|
|
|
207
208
|
readonly node: HTMLElement;
|
|
208
209
|
|
|
209
210
|
readonly uri: URI;
|
|
210
|
-
readonly isReadonly: boolean;
|
|
211
|
+
readonly isReadonly: boolean | MarkdownString;
|
|
212
|
+
readonly onDidChangeReadOnly: Event<boolean | MarkdownString>;
|
|
211
213
|
readonly document: TextEditorDocument;
|
|
212
214
|
readonly onDocumentContentChanged: Event<TextDocumentChangeEvent>;
|
|
213
215
|
|