@theia/editor 1.56.0 → 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.
- package/README.md +2 -1
- package/lib/browser/editor-contribution.d.ts +2 -1
- package/lib/browser/editor-contribution.d.ts.map +1 -1
- package/lib/browser/editor-contribution.js +14 -0
- package/lib/browser/editor-contribution.js.map +1 -1
- package/lib/browser/editor-generated-preference-schema.d.ts +40 -21
- package/lib/browser/editor-generated-preference-schema.d.ts.map +1 -1
- package/lib/browser/editor-generated-preference-schema.js +275 -41
- package/lib/browser/editor-generated-preference-schema.js.map +1 -1
- package/lib/browser/editor-language-quick-pick-service.d.ts.map +1 -1
- package/lib/browser/editor-language-quick-pick-service.js +4 -2
- package/lib/browser/editor-language-quick-pick-service.js.map +1 -1
- package/lib/browser/editor-manager.d.ts +1 -2
- package/lib/browser/editor-manager.d.ts.map +1 -1
- package/lib/browser/editor-manager.js +0 -14
- package/lib/browser/editor-manager.js.map +1 -1
- package/lib/browser/editor-preferences.js +8 -8
- package/lib/browser/editor-preferences.js.map +1 -1
- package/package.json +5 -5
- package/src/browser/editor-contribution.ts +13 -1
- package/src/browser/editor-generated-preference-schema.ts +315 -58
- package/src/browser/editor-language-quick-pick-service.ts +5 -2
- package/src/browser/editor-manager.ts +2 -12
- package/src/browser/editor-preferences.ts +8 -8
|
@@ -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
|
|
46
|
-
|
|
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,
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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.
|
|
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.
|
|
113
|
-
nls.
|
|
114
|
-
nls.
|
|
115
|
-
nls.
|
|
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.
|
|
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',
|