@theia/editor 1.55.1 → 1.57.0-next.112

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.
@@ -42,8 +42,11 @@ export class EditorLanguageQuickPickService {
42
42
 
43
43
  protected toQuickPickLanguage(value: Language, current: string): QuickPickValue<Language> {
44
44
  const languageUri = this.toLanguageUri(value);
45
- const icon = this.labelProvider.getIcon(languageUri);
46
- const iconClasses = icon !== '' ? [icon + ' file-icon'] : undefined;
45
+ const iconClasses = this.labelProvider.getIcon(languageUri).split(' ').filter(v => v.length > 0);
46
+ if (iconClasses.length > 0) {
47
+ iconClasses.push('file-icon');
48
+ }
49
+
47
50
  const configured = current === value.id;
48
51
  return {
49
52
  value,
@@ -18,7 +18,7 @@ import { injectable, postConstruct, inject } from '@theia/core/shared/inversify'
18
18
  import URI from '@theia/core/lib/common/uri';
19
19
  import { RecursivePartial, Emitter, Event, MaybePromise, CommandService, nls } from '@theia/core/lib/common';
20
20
  import {
21
- WidgetOpenerOptions, NavigatableWidgetOpenHandler, NavigatableWidgetOptions, Widget, PreferenceService, CommonCommands, OpenWithService, getDefaultHandler,
21
+ WidgetOpenerOptions, NavigatableWidgetOpenHandler, NavigatableWidgetOptions, Widget, PreferenceService, CommonCommands, getDefaultHandler,
22
22
  defaultHandlerPriority
23
23
  } from '@theia/core/lib/browser';
24
24
  import { EditorWidget } from './editor-widget';
@@ -59,7 +59,6 @@ export class EditorManager extends NavigatableWidgetOpenHandler<EditorWidget> {
59
59
 
60
60
  @inject(CommandService) protected readonly commands: CommandService;
61
61
  @inject(PreferenceService) protected readonly preferenceService: PreferenceService;
62
- @inject(OpenWithService) protected readonly openWithService: OpenWithService;
63
62
 
64
63
  @postConstruct()
65
64
  protected override init(): void {
@@ -88,16 +87,7 @@ export class EditorManager extends NavigatableWidgetOpenHandler<EditorWidget> {
88
87
  this.addRecentlyVisible(widget);
89
88
  }
90
89
  }
91
- this.openWithService.registerHandler({
92
- id: 'default',
93
- label: this.label,
94
- providerName: nls.localizeByDefault('Built-in'),
95
- canHandle: () => 100,
96
- // Higher priority than any other handler
97
- // so that the text editor always appears first in the quick pick
98
- getOrder: () => 10000,
99
- open: uri => this.open(uri)
100
- });
90
+
101
91
  this.updateCurrentEditor();
102
92
  }
103
93
 
@@ -29,7 +29,7 @@ import { nls } from '@theia/core/lib/common/nls';
29
29
  import { environment } from '@theia/core';
30
30
  import { editorGeneratedPreferenceProperties, GeneratedEditorPreferences } from './editor-generated-preference-schema';
31
31
 
32
- /* eslint-disable @theia/localization-check,max-len,no-null/no-null */
32
+ /* eslint-disable max-len,no-null/no-null */
33
33
  // #region src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.ts
34
34
 
35
35
  const codeActionsContributionSchema: PreferenceSchema['properties'] = {
@@ -53,7 +53,7 @@ const codeActionsContributionSchema: PreferenceSchema['properties'] = {
53
53
  }
54
54
  ],
55
55
  default: {},
56
- description: nls.localizeByDefault('Code action kinds to be run on save.'),
56
+ markdownDescription: nls.localizeByDefault('Run Code Actions for the editor on save. Code Actions must be specified and the editor must not be shutting down. Example: `"source.organizeImports": "explicit" `'),
57
57
  scope: 'language-overridable',
58
58
  }
59
59
  };
@@ -82,7 +82,7 @@ const fileContributionSchema: PreferenceSchema['properties'] = {
82
82
  'enumDescriptions': [
83
83
  nls.localizeByDefault('Format the whole file.'),
84
84
  nls.localizeByDefault('Format modifications (requires source control).'),
85
- nls.localize('theia/editor/editor.formatOnSaveMode.modificationsIfAvailable', "Will attempt to format modifications only (requires source control). If source control can't be used, then the whole file will be formatted."),
85
+ nls.localizeByDefault("Will attempt to format modifications only (requires source control). If source control can't be used, then the whole file will be formatted."),
86
86
  ],
87
87
  'markdownDescription': nls.localizeByDefault('Controls if format on save formats the whole file or only modifications. Only applies when `#editor.formatOnSave#` is enabled.'),
88
88
  'scope': PreferenceScope.fromString('language-overridable'),
@@ -109,13 +109,13 @@ const fileContributionSchema: PreferenceSchema['properties'] = {
109
109
  'type': 'string',
110
110
  'enum': ['off', 'afterDelay', 'onFocusChange', 'onWindowChange'],
111
111
  'markdownEnumDescriptions': [
112
- nls.localize('theia/editor/files.autoSave.off', 'An editor with changes is never automatically saved.'),
113
- nls.localize('theia/editor/files.autoSave.afterDelay', 'An editor with changes is automatically saved after the configured `#files.autoSaveDelay#`.'),
114
- nls.localize('theia/editor/files.autoSave.onFocusChange', 'An editor with changes is automatically saved when the editor loses focus.'),
115
- nls.localize('theia/editor/files.autoSave.onWindowChange', 'An editor with changes is automatically saved when the window loses focus.')
112
+ nls.localizeByDefault('An editor with changes is never automatically saved.'),
113
+ nls.localizeByDefault('An editor with changes is automatically saved after the configured `#files.autoSaveDelay#`.'),
114
+ nls.localizeByDefault('An editor with changes is automatically saved when the editor loses focus.'),
115
+ nls.localizeByDefault('An editor with changes is automatically saved when the window loses focus.')
116
116
  ],
117
117
  'default': environment.electron.is() ? 'off' : 'afterDelay',
118
- 'markdownDescription': nls.localize('theia/editor/files.autoSave', 'Controls [auto save](https://code.visualstudio.com/docs/editor/codebasics#_save-auto-save) of editors that have unsaved changes.', 'off', 'afterDelay', 'onFocusChange', 'onWindowChange', 'afterDelay')
118
+ 'markdownDescription': nls.localizeByDefault('Controls [auto save](https://code.visualstudio.com/docs/editor/codebasics#_save-auto-save) of editors that have unsaved changes.')
119
119
  },
120
120
  'files.autoSaveDelay': {
121
121
  'type': 'number',