@theia/editor 1.47.0-next.0 → 1.47.1

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 (56) hide show
  1. package/lib/browser/decorations/editor-decorator.js +2 -7
  2. package/lib/browser/decorations/editor-decorator.js.map +1 -1
  3. package/lib/browser/decorations/index.js +4 -13
  4. package/lib/browser/decorations/index.js.map +1 -1
  5. package/lib/browser/diff-navigator.d.ts +0 -1
  6. package/lib/browser/diff-navigator.d.ts.map +1 -1
  7. package/lib/browser/diff-navigator.js.map +1 -1
  8. package/lib/browser/editor-command.js +24 -32
  9. package/lib/browser/editor-command.js.map +1 -1
  10. package/lib/browser/editor-contribution.js +14 -22
  11. package/lib/browser/editor-contribution.js.map +1 -1
  12. package/lib/browser/editor-generated-preference-schema.d.ts +38 -5
  13. package/lib/browser/editor-generated-preference-schema.d.ts.map +1 -1
  14. package/lib/browser/editor-generated-preference-schema.js +413 -278
  15. package/lib/browser/editor-generated-preference-schema.js.map +1 -1
  16. package/lib/browser/editor-keybinding.js +2 -7
  17. package/lib/browser/editor-keybinding.js.map +1 -1
  18. package/lib/browser/editor-linenumber-contribution.d.ts.map +1 -1
  19. package/lib/browser/editor-linenumber-contribution.js +9 -18
  20. package/lib/browser/editor-linenumber-contribution.js.map +1 -1
  21. package/lib/browser/editor-manager.js +15 -23
  22. package/lib/browser/editor-manager.js.map +1 -1
  23. package/lib/browser/editor-menu.js +2 -7
  24. package/lib/browser/editor-menu.js.map +1 -1
  25. package/lib/browser/editor-navigation-contribution.js +18 -26
  26. package/lib/browser/editor-navigation-contribution.js.map +1 -1
  27. package/lib/browser/editor-variable-contribution.js +4 -12
  28. package/lib/browser/editor-variable-contribution.js.map +1 -1
  29. package/lib/browser/editor-widget-factory.js +8 -16
  30. package/lib/browser/editor-widget-factory.js.map +1 -1
  31. package/lib/browser/editor-widget.d.ts.map +1 -1
  32. package/lib/browser/editor-widget.js +8 -0
  33. package/lib/browser/editor-widget.js.map +1 -1
  34. package/lib/browser/editor.d.ts +3 -1
  35. package/lib/browser/editor.d.ts.map +1 -1
  36. package/lib/browser/editor.js.map +1 -1
  37. package/lib/browser/index.js +11 -20
  38. package/lib/browser/index.js.map +1 -1
  39. package/lib/browser/language-status/editor-language-status-service.js +12 -20
  40. package/lib/browser/language-status/editor-language-status-service.js.map +1 -1
  41. package/lib/browser/navigation/navigation-location-service.js +10 -18
  42. package/lib/browser/navigation/navigation-location-service.js.map +1 -1
  43. package/lib/browser/navigation/navigation-location-similarity.js +2 -7
  44. package/lib/browser/navigation/navigation-location-similarity.js.map +1 -1
  45. package/lib/browser/navigation/navigation-location-updater.js +2 -7
  46. package/lib/browser/navigation/navigation-location-updater.js.map +1 -1
  47. package/lib/browser/quick-editor-service.js +8 -16
  48. package/lib/browser/quick-editor-service.js.map +1 -1
  49. package/lib/browser/undo-redo-service.js +2 -7
  50. package/lib/browser/undo-redo-service.js.map +1 -1
  51. package/package.json +6 -5
  52. package/src/browser/diff-navigator.ts +0 -1
  53. package/src/browser/editor-generated-preference-schema.ts +451 -283
  54. package/src/browser/editor-linenumber-contribution.ts +1 -2
  55. package/src/browser/editor-widget.ts +8 -1
  56. 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;
@@ -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