@codingame/monaco-vscode-api 21.3.2 → 21.3.3
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/missing-services.js +1 -4
- package/package.json +8 -8
- package/services.js +4 -3
- package/vscode/src/vs/base/browser/domStylesheets.js +1 -8
- package/vscode/src/vs/platform/product/common/product.js +1 -1
- package/vscode/src/vs/workbench/common/editor.js +5 -1
- package/vscode/src/vs/workbench/contrib/dropOrPasteInto/browser/commands.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/dropOrPasteInto/browser/commands.js +41 -0
- package/vscode/src/vs/workbench/contrib/dropOrPasteInto/browser/configurationSchema.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/dropOrPasteInto/browser/configurationSchema.js +153 -0
- package/vscode/src/vs/workbench/contrib/dropOrPasteInto/browser/dropOrPasteInto.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/dropOrPasteInto/browser/dropOrPasteInto.contribution.js +11 -0
- package/vscode/src/vs/workbench/contrib/extensions/common/extensions.js +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/common/searchExtensionsTool.js +4 -4
- package/vscode/src/vs/workbench/contrib/files/browser/fileConstants.js +6 -6
- package/vscode/src/vs/workbench/contrib/folding/browser/folding.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/format/browser/formatActionsMultiple.js +20 -20
- package/vscode/src/vs/workbench/contrib/format/browser/formatActionsNone.js +4 -4
- package/vscode/src/vs/workbench/contrib/format/browser/formatModified.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlayHints/browser/inlayHintsAccessibilty.js +4 -4
- package/vscode/src/vs/workbench/contrib/list/browser/listResizeColumnAction.js +2 -2
- package/vscode/src/vs/workbench/contrib/list/browser/tableColumnResizeQuickPick.js +5 -5
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpTypes.js +4 -4
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetCompletionProvider.js +3 -3
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsFile.js +3 -3
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsService.js +9 -9
- package/vscode/src/vs/workbench/contrib/speech/common/speechService.js +29 -29
- package/vscode/src/vs/workbench/contrib/tasks/common/constants.js +1 -1
- package/vscode/src/vs/workbench/contrib/tasks/common/taskDefinitionRegistry.js +5 -5
- package/vscode/src/vs/workbench/contrib/tasks/common/tasks.js +4 -4
- package/vscode/src/vs/workbench/contrib/testing/common/constants.js +11 -11
- package/vscode/src/vs/workbench/contrib/testing/common/testTypes.js +3 -3
- package/vscode/src/vs/workbench/services/accounts/common/defaultAccount.js +1 -1
- package/vscode/src/vs/workbench/services/configurationResolver/common/variableResolver.js +16 -16
- package/vscode/src/vs/workbench/services/editor/common/editorResolverService.js +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionsRegistry.js +87 -87
- package/vscode/src/vs/workbench/services/language/common/languageService.js +28 -28
- package/vscode/src/vs/workbench/services/log/common/logConstants.js +1 -1
- package/vscode/src/vs/workbench/services/remote/common/remoteExplorerService.js +8 -8
- package/vscode/src/vs/workbench/services/remote/common/tunnelModel.js +6 -6
- package/vscode/src/vs/workbench/services/search/common/queryBuilder.js +1 -1
- package/vscode/src/vs/workbench/services/themes/common/colorExtensionPoint.js +22 -22
- package/vscode/src/vs/workbench/services/themes/common/iconExtensionPoint.js +13 -13
- package/vscode/src/vs/workbench/services/userDataSync/common/userDataSync.js +13 -13
package/missing-services.js
CHANGED
|
@@ -6809,6 +6809,7 @@ class LanguageModelToolsService {
|
|
|
6809
6809
|
this.onDidChangeTools = Event.None;
|
|
6810
6810
|
this.registerToolData = () => Disposable.None;
|
|
6811
6811
|
this.registerToolImplementation = () => Disposable.None;
|
|
6812
|
+
this.registerTool = () => Disposable.None;
|
|
6812
6813
|
this.getTools = () => [];
|
|
6813
6814
|
this.invokeTool = unsupported;
|
|
6814
6815
|
this.cancelToolCallsForRequest = unsupported;
|
|
@@ -6819,7 +6820,6 @@ class LanguageModelToolsService {
|
|
|
6819
6820
|
this.toolSets = constObservable([]);
|
|
6820
6821
|
this.toToolEnablementMap = unsupported;
|
|
6821
6822
|
this.toToolAndToolSetEnablementMap = unsupported;
|
|
6822
|
-
this.registerTool = unsupported;
|
|
6823
6823
|
this.getToolAutoConfirmation = unsupported;
|
|
6824
6824
|
this.getToolSet = () => undefined;
|
|
6825
6825
|
}
|
|
@@ -6845,9 +6845,6 @@ __decorate([
|
|
|
6845
6845
|
__decorate([
|
|
6846
6846
|
Unsupported
|
|
6847
6847
|
], LanguageModelToolsService.prototype, "toToolAndToolSetEnablementMap", void 0);
|
|
6848
|
-
__decorate([
|
|
6849
|
-
Unsupported
|
|
6850
|
-
], LanguageModelToolsService.prototype, "registerTool", void 0);
|
|
6851
6848
|
__decorate([
|
|
6852
6849
|
Unsupported
|
|
6853
6850
|
], LanguageModelToolsService.prototype, "getToolAutoConfirmation", void 0);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-api",
|
|
3
|
-
"version": "21.3.
|
|
3
|
+
"version": "21.3.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-base-service-override": "21.3.
|
|
19
|
-
"@codingame/monaco-vscode-environment-service-override": "21.3.
|
|
20
|
-
"@codingame/monaco-vscode-extensions-service-override": "21.3.
|
|
21
|
-
"@codingame/monaco-vscode-files-service-override": "21.3.
|
|
22
|
-
"@codingame/monaco-vscode-host-service-override": "21.3.
|
|
23
|
-
"@codingame/monaco-vscode-layout-service-override": "21.3.
|
|
24
|
-
"@codingame/monaco-vscode-quickaccess-service-override": "21.3.
|
|
18
|
+
"@codingame/monaco-vscode-base-service-override": "21.3.3",
|
|
19
|
+
"@codingame/monaco-vscode-environment-service-override": "21.3.3",
|
|
20
|
+
"@codingame/monaco-vscode-extensions-service-override": "21.3.3",
|
|
21
|
+
"@codingame/monaco-vscode-files-service-override": "21.3.3",
|
|
22
|
+
"@codingame/monaco-vscode-host-service-override": "21.3.3",
|
|
23
|
+
"@codingame/monaco-vscode-layout-service-override": "21.3.3",
|
|
24
|
+
"@codingame/monaco-vscode-quickaccess-service-override": "21.3.3",
|
|
25
25
|
"@vscode/iconv-lite-umd": "0.7.0",
|
|
26
26
|
"dompurify": "3.2.7",
|
|
27
27
|
"jschardet": "3.1.4",
|
package/services.js
CHANGED
|
@@ -27,6 +27,7 @@ import './vscode/src/vs/workbench/contrib/codeEditor/browser/editorFeatures.js';
|
|
|
27
27
|
import './vscode/src/vs/workbench/contrib/contextmenu/browser/contextmenu.contribution.js';
|
|
28
28
|
import './vscode/src/vs/workbench/browser/actions/textInputActions.js';
|
|
29
29
|
import './vscode/src/vs/workbench/browser/actions/developerActions.js';
|
|
30
|
+
import './vscode/src/vs/workbench/contrib/dropOrPasteInto/browser/dropOrPasteInto.contribution.js';
|
|
30
31
|
import './vscode/src/vs/editor/browser/coreCommands.js';
|
|
31
32
|
import './vscode/src/vs/editor/browser/widget/codeEditor/codeEditorWidget.js';
|
|
32
33
|
import './vscode/src/vs/editor/browser/widget/diffEditor/diffEditor.contribution.js';
|
|
@@ -400,10 +401,10 @@ export { IInlineCompletionsUnificationService } from './vscode/src/vs/workbench/
|
|
|
400
401
|
export { IMcpGalleryManifestService } from './vscode/src/vs/platform/mcp/common/mcpGalleryManifest.service.js';
|
|
401
402
|
export { IDataChannelService } from './vscode/src/vs/platform/dataChannel/common/dataChannel.service.js';
|
|
402
403
|
|
|
403
|
-
if (window.monacoVscodeApiBuildId != null && window.monacoVscodeApiBuildId !== "1.104.2-
|
|
404
|
-
throw new Error(`Another version of monaco-vscode-api has already been loaded. Trying to load ${"1.104.2-
|
|
404
|
+
if (window.monacoVscodeApiBuildId != null && window.monacoVscodeApiBuildId !== "1.104.2-e9db017a-9189-4c2b-8bff-1c94face3606") {
|
|
405
|
+
throw new Error(`Another version of monaco-vscode-api has already been loaded. Trying to load ${"1.104.2-e9db017a-9189-4c2b-8bff-1c94face3606"}, ${window.monacoVscodeApiBuildId} is already loaded`);
|
|
405
406
|
}
|
|
406
|
-
window.monacoVscodeApiBuildId = "1.104.2-
|
|
407
|
+
window.monacoVscodeApiBuildId = "1.104.2-e9db017a-9189-4c2b-8bff-1c94face3606";
|
|
407
408
|
function registerCommands(options) {
|
|
408
409
|
function asMenuId(menu) {
|
|
409
410
|
switch (menu) {
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { toDisposable, DisposableStore } from '../common/lifecycle.js';
|
|
3
3
|
import '../common/observableInternal/index.js';
|
|
4
4
|
import { isShadowRoot, createElement, getWindows, sharedMutationObserver } from './dom.js';
|
|
5
|
-
import { isFirefox } from './browser.js';
|
|
6
5
|
import { mainWindow } from './window.js';
|
|
7
6
|
import { autorun } from '../common/observableInternal/reactions/autorun.js';
|
|
8
7
|
|
|
@@ -86,13 +85,7 @@ function cloneGlobalStyleSheet(globalStylesheet, globalStylesheetClones, windowE
|
|
|
86
85
|
for (const rule of getDynamicStyleSheetRules(globalStylesheet)) {
|
|
87
86
|
clone.sheet?.insertRule(rule.cssText, clone.sheet?.cssRules.length);
|
|
88
87
|
}
|
|
89
|
-
|
|
90
|
-
childList: true
|
|
91
|
-
};
|
|
92
|
-
if (isFirefox) {
|
|
93
|
-
observeInit = { ...observeInit, attributes: true, attributeFilter: ['data-version'] };
|
|
94
|
-
}
|
|
95
|
-
disposables.add(sharedMutationObserver.observe(globalStylesheet, disposables, observeInit)(() => {
|
|
88
|
+
disposables.add(sharedMutationObserver.observe(globalStylesheet, disposables, { childList: true, subtree: true, characterData: true })(() => {
|
|
96
89
|
clone.textContent = globalStylesheet.textContent;
|
|
97
90
|
}));
|
|
98
91
|
globalStylesheetClones.add(clone);
|
|
@@ -41,6 +41,10 @@ function isEditorPaneWithSelection(editorPane) {
|
|
|
41
41
|
const candidate = editorPane;
|
|
42
42
|
return !!candidate && typeof candidate.getSelection === 'function' && !!candidate.onDidChangeSelection;
|
|
43
43
|
}
|
|
44
|
+
function isEditorPaneWithScrolling(editorPane) {
|
|
45
|
+
const candidate = editorPane;
|
|
46
|
+
return !!candidate && typeof candidate.getScrollPosition === 'function' && typeof candidate.setScrollPosition === 'function' && !!candidate.onDidChangeScroll;
|
|
47
|
+
}
|
|
44
48
|
function findViewStateForEditor(input, group, editorService) {
|
|
45
49
|
for (const editorPane of editorService.visibleEditorPanes) {
|
|
46
50
|
if (editorPane.group.id === group && input.matches(editorPane.input)) {
|
|
@@ -464,4 +468,4 @@ function createEditorOpenError(messageOrError, actions, options) {
|
|
|
464
468
|
return error;
|
|
465
469
|
}
|
|
466
470
|
|
|
467
|
-
export { AbstractEditorInput, BINARY_DIFF_EDITOR_ID, CloseDirection, DEFAULT_EDITOR_ASSOCIATION, EditorCloseContext, EditorCloseMethod, EditorExtensions, EditorInputCapabilities, EditorPaneSelectionChangeReason, EditorPaneSelectionCompareResult, EditorResourceAccessor, EditorsOrder, GroupModelChangeKind, SIDE_BY_SIDE_EDITOR_ID, SaveReason, SaveSourceRegistry, SideBySideEditor, TEXT_DIFF_EDITOR_ID, Verbosity, createEditorOpenError, createTooLargeFileError, findViewStateForEditor, isDiffEditorInput, isEditorCommandsContext, isEditorIdentifier, isEditorInput, isEditorInputWithOptions, isEditorInputWithOptionsAndGroup, isEditorOpenError, isEditorPaneWithSelection, isResourceDiffEditorInput, isResourceEditorInput, isResourceMergeEditorInput, isResourceMultiDiffEditorInput, isResourceSideBySideEditorInput, isSideBySideEditorInput, isTextEditorViewState, isUntitledResourceEditorInput, pathsToEditors, preventEditorClose };
|
|
471
|
+
export { AbstractEditorInput, BINARY_DIFF_EDITOR_ID, CloseDirection, DEFAULT_EDITOR_ASSOCIATION, EditorCloseContext, EditorCloseMethod, EditorExtensions, EditorInputCapabilities, EditorPaneSelectionChangeReason, EditorPaneSelectionCompareResult, EditorResourceAccessor, EditorsOrder, GroupModelChangeKind, SIDE_BY_SIDE_EDITOR_ID, SaveReason, SaveSourceRegistry, SideBySideEditor, TEXT_DIFF_EDITOR_ID, Verbosity, createEditorOpenError, createTooLargeFileError, findViewStateForEditor, isDiffEditorInput, isEditorCommandsContext, isEditorIdentifier, isEditorInput, isEditorInputWithOptions, isEditorInputWithOptionsAndGroup, isEditorOpenError, isEditorPaneWithScrolling, isEditorPaneWithSelection, isResourceDiffEditorInput, isResourceEditorInput, isResourceMergeEditorInput, isResourceMultiDiffEditorInput, isResourceSideBySideEditorInput, isSideBySideEditorInput, isTextEditorViewState, isUntitledResourceEditorInput, pathsToEditors, preventEditorClose };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IWorkbenchContribution } from "../../../common/contributions.js";
|
|
2
|
+
import { IPreferencesService } from "../../../services/preferences/common/preferences.service.js";
|
|
3
|
+
export declare class DropOrPasteIntoCommands implements IWorkbenchContribution {
|
|
4
|
+
private readonly _preferencesService;
|
|
5
|
+
static ID: string;
|
|
6
|
+
constructor(_preferencesService: IPreferencesService);
|
|
7
|
+
private configurePreferredPasteAction;
|
|
8
|
+
private configurePreferredDropAction;
|
|
9
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
3
|
+
import { toAction } from '../../../../base/common/actions.js';
|
|
4
|
+
import { CopyPasteController, pasteAsPreferenceConfig } from '../../../../editor/contrib/dropOrPasteInto/browser/copyPasteController.js';
|
|
5
|
+
import { DropIntoEditorController, dropAsPreferenceConfig } from '../../../../editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js';
|
|
6
|
+
import { localize } from '../../../../nls.js';
|
|
7
|
+
import { IPreferencesService } from '../../../services/preferences/common/preferences.service.js';
|
|
8
|
+
|
|
9
|
+
let DropOrPasteIntoCommands = class DropOrPasteIntoCommands {
|
|
10
|
+
static { this.ID = 'workbench.contrib.dropOrPasteInto'; }
|
|
11
|
+
constructor(_preferencesService) {
|
|
12
|
+
this._preferencesService = _preferencesService;
|
|
13
|
+
CopyPasteController.setConfigureDefaultAction(toAction({
|
|
14
|
+
id: 'workbench.action.configurePreferredPasteAction',
|
|
15
|
+
label: ( localize(6675, 'Configure preferred paste action...')),
|
|
16
|
+
run: () => this.configurePreferredPasteAction()
|
|
17
|
+
}));
|
|
18
|
+
DropIntoEditorController.setConfigureDefaultAction(toAction({
|
|
19
|
+
id: 'workbench.action.configurePreferredDropAction',
|
|
20
|
+
label: ( localize(6676, 'Configure preferred drop action...')),
|
|
21
|
+
run: () => this.configurePreferredDropAction()
|
|
22
|
+
}));
|
|
23
|
+
}
|
|
24
|
+
configurePreferredPasteAction() {
|
|
25
|
+
return this._preferencesService.openUserSettings({
|
|
26
|
+
jsonEditor: true,
|
|
27
|
+
revealSetting: { key: pasteAsPreferenceConfig, edit: true }
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
configurePreferredDropAction() {
|
|
31
|
+
return this._preferencesService.openUserSettings({
|
|
32
|
+
jsonEditor: true,
|
|
33
|
+
revealSetting: { key: dropAsPreferenceConfig, edit: true }
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
DropOrPasteIntoCommands = ( __decorate([
|
|
38
|
+
( __param(0, IPreferencesService))
|
|
39
|
+
], DropOrPasteIntoCommands));
|
|
40
|
+
|
|
41
|
+
export { DropOrPasteIntoCommands };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Disposable } from "../../../../base/common/lifecycle.js";
|
|
2
|
+
import { ILanguageFeaturesService } from "../../../../editor/common/services/languageFeatures.service.js";
|
|
3
|
+
import { IConfigurationNode } from "../../../../platform/configuration/common/configurationRegistry.js";
|
|
4
|
+
import { IKeybindingService } from "../../../../platform/keybinding/common/keybinding.service.js";
|
|
5
|
+
import { IWorkbenchContribution } from "../../../common/contributions.js";
|
|
6
|
+
export declare const editorConfiguration: Readonly<IConfigurationNode>;
|
|
7
|
+
export declare class DropOrPasteSchemaContribution extends Disposable implements IWorkbenchContribution {
|
|
8
|
+
private readonly languageFeatures;
|
|
9
|
+
static ID: string;
|
|
10
|
+
private readonly _onDidChangeSchemaContributions;
|
|
11
|
+
private _allProvidedDropKinds;
|
|
12
|
+
private _allProvidedPasteKinds;
|
|
13
|
+
constructor(keybindingService: IKeybindingService, languageFeatures: ILanguageFeaturesService);
|
|
14
|
+
private updateProvidedKinds;
|
|
15
|
+
private updateConfigurationSchema;
|
|
16
|
+
private getKeybindingSchemaAdditions;
|
|
17
|
+
}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
3
|
+
import { Emitter, Event } from '../../../../base/common/event.js';
|
|
4
|
+
import { Disposable } from '../../../../base/common/lifecycle.js';
|
|
5
|
+
import { editorConfigurationBaseNode } from '../../../../editor/common/config/editorConfigurationSchema.js';
|
|
6
|
+
import { ILanguageFeaturesService } from '../../../../editor/common/services/languageFeatures.service.js';
|
|
7
|
+
import { pasteAsCommandId } from '../../../../editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js';
|
|
8
|
+
import { pasteAsPreferenceConfig } from '../../../../editor/contrib/dropOrPasteInto/browser/copyPasteController.js';
|
|
9
|
+
import { dropAsPreferenceConfig } from '../../../../editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js';
|
|
10
|
+
import { localize } from '../../../../nls.js';
|
|
11
|
+
import { ConfigurationScope, Extensions } from '../../../../platform/configuration/common/configurationRegistry.js';
|
|
12
|
+
import { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.service.js';
|
|
13
|
+
import { Registry } from '../../../../platform/registry/common/platform.js';
|
|
14
|
+
|
|
15
|
+
const dropEnumValues = [];
|
|
16
|
+
const dropAsPreferenceSchema = {
|
|
17
|
+
type: 'array',
|
|
18
|
+
scope: ConfigurationScope.LANGUAGE_OVERRIDABLE,
|
|
19
|
+
description: ( localize(
|
|
20
|
+
6677,
|
|
21
|
+
"Configures the preferred type of edit to use when dropping content.\n\nThis is an ordered list of edit kinds. The first available edit of a preferred kind will be used."
|
|
22
|
+
)),
|
|
23
|
+
default: [],
|
|
24
|
+
items: {
|
|
25
|
+
description: ( localize(6678, "The kind identifier of the drop edit.")),
|
|
26
|
+
anyOf: [
|
|
27
|
+
{ type: 'string' },
|
|
28
|
+
{ enum: dropEnumValues }
|
|
29
|
+
],
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
const pasteEnumValues = [];
|
|
33
|
+
const pasteAsPreferenceSchema = {
|
|
34
|
+
type: 'array',
|
|
35
|
+
scope: ConfigurationScope.LANGUAGE_OVERRIDABLE,
|
|
36
|
+
description: ( localize(
|
|
37
|
+
6679,
|
|
38
|
+
"Configures the preferred type of edit to use when pasting content.\n\nThis is an ordered list of edit kinds. The first available edit of a preferred kind will be used."
|
|
39
|
+
)),
|
|
40
|
+
default: [],
|
|
41
|
+
items: {
|
|
42
|
+
description: ( localize(6680, "The kind identifier of the paste edit.")),
|
|
43
|
+
anyOf: [
|
|
44
|
+
{ type: 'string' },
|
|
45
|
+
{ enum: pasteEnumValues }
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
const editorConfiguration = ( Object.freeze({
|
|
50
|
+
...editorConfigurationBaseNode,
|
|
51
|
+
properties: {
|
|
52
|
+
[pasteAsPreferenceConfig]: pasteAsPreferenceSchema,
|
|
53
|
+
[dropAsPreferenceConfig]: dropAsPreferenceSchema,
|
|
54
|
+
}
|
|
55
|
+
}));
|
|
56
|
+
let DropOrPasteSchemaContribution = class DropOrPasteSchemaContribution extends Disposable {
|
|
57
|
+
static { this.ID = 'workbench.contrib.dropOrPasteIntoSchema'; }
|
|
58
|
+
constructor(keybindingService, languageFeatures) {
|
|
59
|
+
super();
|
|
60
|
+
this.languageFeatures = languageFeatures;
|
|
61
|
+
this._onDidChangeSchemaContributions = this._register(( new Emitter()));
|
|
62
|
+
this._allProvidedDropKinds = [];
|
|
63
|
+
this._allProvidedPasteKinds = [];
|
|
64
|
+
this._register(Event.runAndSubscribe(Event.debounce(Event.any(languageFeatures.documentPasteEditProvider.onDidChange, languageFeatures.documentPasteEditProvider.onDidChange), () => { }, 1000), () => {
|
|
65
|
+
this.updateProvidedKinds();
|
|
66
|
+
this.updateConfigurationSchema();
|
|
67
|
+
this._onDidChangeSchemaContributions.fire();
|
|
68
|
+
}));
|
|
69
|
+
this._register(keybindingService.registerSchemaContribution({
|
|
70
|
+
getSchemaAdditions: () => this.getKeybindingSchemaAdditions(),
|
|
71
|
+
onDidChange: this._onDidChangeSchemaContributions.event,
|
|
72
|
+
}));
|
|
73
|
+
}
|
|
74
|
+
updateProvidedKinds() {
|
|
75
|
+
const dropKinds = ( new Map());
|
|
76
|
+
for (const provider of this.languageFeatures.documentDropEditProvider.allNoModel()) {
|
|
77
|
+
for (const kind of provider.providedDropEditKinds ?? []) {
|
|
78
|
+
dropKinds.set(kind.value, kind);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
this._allProvidedDropKinds = Array.from(( dropKinds.values()));
|
|
82
|
+
const pasteKinds = ( new Map());
|
|
83
|
+
for (const provider of this.languageFeatures.documentPasteEditProvider.allNoModel()) {
|
|
84
|
+
for (const kind of provider.providedPasteEditKinds ?? []) {
|
|
85
|
+
pasteKinds.set(kind.value, kind);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
this._allProvidedPasteKinds = Array.from(( pasteKinds.values()));
|
|
89
|
+
}
|
|
90
|
+
updateConfigurationSchema() {
|
|
91
|
+
pasteEnumValues.length = 0;
|
|
92
|
+
for (const codeActionKind of this._allProvidedPasteKinds) {
|
|
93
|
+
pasteEnumValues.push(codeActionKind.value);
|
|
94
|
+
}
|
|
95
|
+
dropEnumValues.length = 0;
|
|
96
|
+
for (const codeActionKind of this._allProvidedDropKinds) {
|
|
97
|
+
dropEnumValues.push(codeActionKind.value);
|
|
98
|
+
}
|
|
99
|
+
( Registry.as(Extensions.Configuration))
|
|
100
|
+
.notifyConfigurationSchemaUpdated(editorConfiguration);
|
|
101
|
+
}
|
|
102
|
+
getKeybindingSchemaAdditions() {
|
|
103
|
+
return [
|
|
104
|
+
{
|
|
105
|
+
if: {
|
|
106
|
+
required: ['command'],
|
|
107
|
+
properties: {
|
|
108
|
+
'command': { const: pasteAsCommandId }
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
then: {
|
|
112
|
+
properties: {
|
|
113
|
+
'args': {
|
|
114
|
+
oneOf: [
|
|
115
|
+
{
|
|
116
|
+
required: ['kind'],
|
|
117
|
+
properties: {
|
|
118
|
+
'kind': {
|
|
119
|
+
anyOf: [
|
|
120
|
+
{ enum: Array.from(( this._allProvidedPasteKinds.map(x => x.value))) },
|
|
121
|
+
{ type: 'string' },
|
|
122
|
+
]
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
required: ['preferences'],
|
|
128
|
+
properties: {
|
|
129
|
+
'preferences': {
|
|
130
|
+
type: 'array',
|
|
131
|
+
items: {
|
|
132
|
+
anyOf: [
|
|
133
|
+
{ enum: Array.from(( this._allProvidedPasteKinds.map(x => x.value))) },
|
|
134
|
+
{ type: 'string' },
|
|
135
|
+
]
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
];
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
DropOrPasteSchemaContribution = ( __decorate([
|
|
149
|
+
( __param(0, IKeybindingService)),
|
|
150
|
+
( __param(1, ILanguageFeaturesService))
|
|
151
|
+
], DropOrPasteSchemaContribution));
|
|
152
|
+
|
|
153
|
+
export { DropOrPasteSchemaContribution, editorConfiguration };
|
package/vscode/src/vs/workbench/contrib/dropOrPasteInto/browser/dropOrPasteInto.contribution.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/vscode/src/vs/workbench/contrib/dropOrPasteInto/browser/dropOrPasteInto.contribution.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
import { Extensions } from '../../../../platform/configuration/common/configurationRegistry.js';
|
|
3
|
+
import { Registry } from '../../../../platform/registry/common/platform.js';
|
|
4
|
+
import { registerWorkbenchContribution2, WorkbenchPhase } from '../../../common/contributions.js';
|
|
5
|
+
import { DropOrPasteIntoCommands } from './commands.js';
|
|
6
|
+
import { DropOrPasteSchemaContribution, editorConfiguration } from './configurationSchema.js';
|
|
7
|
+
|
|
8
|
+
registerWorkbenchContribution2(DropOrPasteIntoCommands.ID, DropOrPasteIntoCommands, WorkbenchPhase.Eventually);
|
|
9
|
+
registerWorkbenchContribution2(DropOrPasteSchemaContribution.ID, DropOrPasteSchemaContribution, WorkbenchPhase.Eventually);
|
|
10
|
+
( Registry.as(Extensions.Configuration))
|
|
11
|
+
.registerConfiguration(editorConfiguration);
|
|
@@ -9,7 +9,7 @@ import { ExtensionGalleryManifestStatus } from '../../../../platform/extensionMa
|
|
|
9
9
|
import { IExtensionsWorkbenchService } from './extensions.service.js';
|
|
10
10
|
|
|
11
11
|
const VIEWLET_ID = 'workbench.view.extensions';
|
|
12
|
-
const EXTENSIONS_CATEGORY = ( localize2(
|
|
12
|
+
const EXTENSIONS_CATEGORY = ( localize2(7362, "Extensions"));
|
|
13
13
|
var ExtensionState;
|
|
14
14
|
(function (ExtensionState) {
|
|
15
15
|
ExtensionState[ExtensionState["Installing"] = 0] = "Installing";
|
|
@@ -15,12 +15,12 @@ const SearchExtensionsToolData = {
|
|
|
15
15
|
toolReferenceName: 'extensions',
|
|
16
16
|
canBeReferencedInPrompt: true,
|
|
17
17
|
icon: ThemeIcon.fromId(Codicon.extensions.id),
|
|
18
|
-
displayName: ( localize(
|
|
18
|
+
displayName: ( localize(7375, 'Search Extensions')),
|
|
19
19
|
modelDescription: ( localize(
|
|
20
|
-
|
|
20
|
+
7376,
|
|
21
21
|
"This is a tool for browsing Visual Studio Code Extensions Marketplace. It allows the model to search for extensions and retrieve detailed information about them. The model should use this tool whenever it needs to discover extensions or resolve information about known ones. To use the tool, the model has to provide the category of the extensions, relevant search keywords, or known extension IDs. Note that search results may include false positives, so reviewing and filtering is recommended."
|
|
22
22
|
)),
|
|
23
|
-
userDescription: ( localize(
|
|
23
|
+
userDescription: ( localize(7377, 'Search for VS Code extensions')),
|
|
24
24
|
source: ToolDataSource.Internal,
|
|
25
25
|
inputSchema: {
|
|
26
26
|
type: 'object',
|
|
@@ -57,7 +57,7 @@ let SearchExtensionsTool = class SearchExtensionsTool {
|
|
|
57
57
|
return {
|
|
58
58
|
content: [{
|
|
59
59
|
kind: 'text',
|
|
60
|
-
value: ( localize(
|
|
60
|
+
value: ( localize(7378, 'Please provide a category or keywords or ids to search for.'))
|
|
61
61
|
}]
|
|
62
62
|
};
|
|
63
63
|
}
|
|
@@ -13,13 +13,13 @@ const COMPARE_WITH_SAVED_COMMAND_ID = 'workbench.files.action.compareWithSaved';
|
|
|
13
13
|
const COPY_PATH_COMMAND_ID = 'copyFilePath';
|
|
14
14
|
const COPY_RELATIVE_PATH_COMMAND_ID = 'copyRelativeFilePath';
|
|
15
15
|
const SAVE_FILE_AS_COMMAND_ID = 'workbench.action.files.saveAs';
|
|
16
|
-
const SAVE_FILE_AS_LABEL = ( localize2(
|
|
16
|
+
const SAVE_FILE_AS_LABEL = ( localize2(7569, "Save As..."));
|
|
17
17
|
const SAVE_FILE_COMMAND_ID = 'workbench.action.files.save';
|
|
18
|
-
const SAVE_FILE_LABEL = ( localize2(
|
|
18
|
+
const SAVE_FILE_LABEL = ( localize2(7570, "Save"));
|
|
19
19
|
const SAVE_FILE_WITHOUT_FORMATTING_COMMAND_ID = 'workbench.action.files.saveWithoutFormatting';
|
|
20
|
-
const SAVE_FILE_WITHOUT_FORMATTING_LABEL = ( localize2(
|
|
20
|
+
const SAVE_FILE_WITHOUT_FORMATTING_LABEL = ( localize2(7571, "Save without Formatting"));
|
|
21
21
|
const SAVE_ALL_COMMAND_ID = 'saveAll';
|
|
22
|
-
const SAVE_ALL_LABEL = ( localize2(
|
|
22
|
+
const SAVE_ALL_LABEL = ( localize2(7572, "Save All"));
|
|
23
23
|
const SAVE_ALL_IN_GROUP_COMMAND_ID = 'workbench.files.action.saveAllInGroup';
|
|
24
24
|
const SAVE_FILES_COMMAND_ID = 'workbench.action.files.saveFiles';
|
|
25
25
|
const OpenEditorsGroupContext = ( new RawContextKey('groupFocusedInOpenEditors', false));
|
|
@@ -28,13 +28,13 @@ const OpenEditorsReadonlyEditorContext = ( new RawContextKey('readonlyEditorFocu
|
|
|
28
28
|
const OpenEditorsSelectedFileOrUntitledContext = ( new RawContextKey('openEditorsSelectedFileOrUntitled', true));
|
|
29
29
|
const ResourceSelectedForCompareContext = ( new RawContextKey('resourceSelectedForCompare', false));
|
|
30
30
|
const REMOVE_ROOT_FOLDER_COMMAND_ID = 'removeRootFolder';
|
|
31
|
-
const REMOVE_ROOT_FOLDER_LABEL = ( localize(
|
|
31
|
+
const REMOVE_ROOT_FOLDER_LABEL = ( localize(7573, "Remove Folder from Workspace"));
|
|
32
32
|
const PREVIOUS_COMPRESSED_FOLDER = 'previousCompressedFolder';
|
|
33
33
|
const NEXT_COMPRESSED_FOLDER = 'nextCompressedFolder';
|
|
34
34
|
const FIRST_COMPRESSED_FOLDER = 'firstCompressedFolder';
|
|
35
35
|
const LAST_COMPRESSED_FOLDER = 'lastCompressedFolder';
|
|
36
36
|
const NEW_UNTITLED_FILE_COMMAND_ID = 'workbench.action.files.newUntitledFile';
|
|
37
|
-
const NEW_UNTITLED_FILE_LABEL = ( localize2(
|
|
37
|
+
const NEW_UNTITLED_FILE_LABEL = ( localize2(7574, "New Untitled Text File"));
|
|
38
38
|
const NEW_FILE_COMMAND_ID = 'workbench.action.files.newFile';
|
|
39
39
|
|
|
40
40
|
export { COMPARE_RESOURCE_COMMAND_ID, COMPARE_SELECTED_COMMAND_ID, COMPARE_WITH_SAVED_COMMAND_ID, COPY_PATH_COMMAND_ID, COPY_RELATIVE_PATH_COMMAND_ID, FIRST_COMPRESSED_FOLDER, LAST_COMPRESSED_FOLDER, NEW_FILE_COMMAND_ID, NEW_UNTITLED_FILE_COMMAND_ID, NEW_UNTITLED_FILE_LABEL, NEXT_COMPRESSED_FOLDER, OPEN_TO_SIDE_COMMAND_ID, OPEN_WITH_EXPLORER_COMMAND_ID, OpenEditorsDirtyEditorContext, OpenEditorsGroupContext, OpenEditorsReadonlyEditorContext, OpenEditorsSelectedFileOrUntitledContext, PREVIOUS_COMPRESSED_FOLDER, REMOVE_ROOT_FOLDER_COMMAND_ID, REMOVE_ROOT_FOLDER_LABEL, REVEAL_IN_EXPLORER_COMMAND_ID, REVERT_FILE_COMMAND_ID, ResourceSelectedForCompareContext, SAVE_ALL_COMMAND_ID, SAVE_ALL_IN_GROUP_COMMAND_ID, SAVE_ALL_LABEL, SAVE_FILES_COMMAND_ID, SAVE_FILE_AS_COMMAND_ID, SAVE_FILE_AS_LABEL, SAVE_FILE_COMMAND_ID, SAVE_FILE_LABEL, SAVE_FILE_WITHOUT_FORMATTING_COMMAND_ID, SAVE_FILE_WITHOUT_FORMATTING_LABEL, SELECT_FOR_COMPARE_COMMAND_ID };
|
|
@@ -32,8 +32,8 @@ let DefaultFoldingRangeProvider = class DefaultFoldingRangeProvider extends Disp
|
|
|
32
32
|
DefaultFoldingRangeProvider_1.extensionItemLabels.length = 0;
|
|
33
33
|
DefaultFoldingRangeProvider_1.extensionDescriptions.length = 0;
|
|
34
34
|
DefaultFoldingRangeProvider_1.extensionIds.push(null);
|
|
35
|
-
DefaultFoldingRangeProvider_1.extensionItemLabels.push(( localize(
|
|
36
|
-
DefaultFoldingRangeProvider_1.extensionDescriptions.push(( localize(
|
|
35
|
+
DefaultFoldingRangeProvider_1.extensionItemLabels.push(( localize(7773, 'All')));
|
|
36
|
+
DefaultFoldingRangeProvider_1.extensionDescriptions.push(( localize(7774, "All active folding range providers")));
|
|
37
37
|
const languageExtensions = [];
|
|
38
38
|
const otherExtensions = [];
|
|
39
39
|
for (const extension of this._extensionService.extensions) {
|
|
@@ -75,7 +75,7 @@ DefaultFoldingRangeProvider = DefaultFoldingRangeProvider_1 = ( __decorate([
|
|
|
75
75
|
properties: {
|
|
76
76
|
[DefaultFoldingRangeProvider.configName]: {
|
|
77
77
|
description: ( localize(
|
|
78
|
-
|
|
78
|
+
7775,
|
|
79
79
|
"Defines a default folding range provider that takes precedence over all other folding range providers. Must be the identifier of an extension contributing a folding range provider."
|
|
80
80
|
)),
|
|
81
81
|
type: ['string', 'null'],
|
|
@@ -80,8 +80,8 @@ let DefaultFormatter = class DefaultFormatter extends Disposable {
|
|
|
80
80
|
DefaultFormatter_1.extensionItemLabels.length = 0;
|
|
81
81
|
DefaultFormatter_1.extensionDescriptions.length = 0;
|
|
82
82
|
DefaultFormatter_1.extensionIds.push(null);
|
|
83
|
-
DefaultFormatter_1.extensionItemLabels.push(( localize(
|
|
84
|
-
DefaultFormatter_1.extensionDescriptions.push(( localize(
|
|
83
|
+
DefaultFormatter_1.extensionItemLabels.push(( localize(7776, 'None')));
|
|
84
|
+
DefaultFormatter_1.extensionDescriptions.push(( localize(7777, "None")));
|
|
85
85
|
for (const extension of extensions) {
|
|
86
86
|
if (extension.main || extension.browser) {
|
|
87
87
|
DefaultFormatter_1.extensionIds.push(extension.identifier.value);
|
|
@@ -108,13 +108,13 @@ let DefaultFormatter = class DefaultFormatter extends Disposable {
|
|
|
108
108
|
const langName = this._languageService.getLanguageName(document.getLanguageId()) || document.getLanguageId();
|
|
109
109
|
const detail = kind === FormattingKind.File
|
|
110
110
|
? ( localize(
|
|
111
|
-
|
|
111
|
+
7778,
|
|
112
112
|
"Extension '{0}' is configured as formatter but it cannot format '{1}'-files",
|
|
113
113
|
extension.displayName || extension.name,
|
|
114
114
|
langName
|
|
115
115
|
))
|
|
116
116
|
: ( localize(
|
|
117
|
-
|
|
117
|
+
7779,
|
|
118
118
|
"Extension '{0}' is configured as formatter but it can only format '{1}'-files as a whole, not selections or parts of it.",
|
|
119
119
|
extension.displayName || extension.name,
|
|
120
120
|
langName
|
|
@@ -128,12 +128,12 @@ let DefaultFormatter = class DefaultFormatter extends Disposable {
|
|
|
128
128
|
const langName = this._languageService.getLanguageName(document.getLanguageId()) || document.getLanguageId();
|
|
129
129
|
const message = !defaultFormatterId
|
|
130
130
|
? ( localize(
|
|
131
|
-
|
|
131
|
+
7780,
|
|
132
132
|
"There are multiple formatters for '{0}' files. One of them should be configured as default formatter.",
|
|
133
133
|
DefaultFormatter_1._maybeQuotes(langName)
|
|
134
134
|
))
|
|
135
135
|
: ( localize(
|
|
136
|
-
|
|
136
|
+
7781,
|
|
137
137
|
"Extension '{0}' is configured as formatter but not available. Select a different default formatter to continue.",
|
|
138
138
|
defaultFormatterId
|
|
139
139
|
));
|
|
@@ -146,16 +146,16 @@ let DefaultFormatter = class DefaultFormatter extends Disposable {
|
|
|
146
146
|
}
|
|
147
147
|
if (mode !== FormattingMode.Silent) {
|
|
148
148
|
const { confirmed } = await this._dialogService.confirm({
|
|
149
|
-
message: ( localize(
|
|
149
|
+
message: ( localize(7782, "Configure Default Formatter")),
|
|
150
150
|
detail: formatterOrMessage,
|
|
151
|
-
primaryButton: ( localize(
|
|
151
|
+
primaryButton: ( localize(7783, "&&Configure..."))
|
|
152
152
|
});
|
|
153
153
|
if (confirmed) {
|
|
154
154
|
return this._pickAndPersistDefaultFormatter(formatter, document);
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
else {
|
|
158
|
-
this._notificationService.prompt(Severity$1.Info, formatterOrMessage, [{ label: ( localize(
|
|
158
|
+
this._notificationService.prompt(Severity$1.Info, formatterOrMessage, [{ label: ( localize(7784, "Configure...")), run: () => this._pickAndPersistDefaultFormatter(formatter, document) }], { priority: NotificationPriority.SILENT });
|
|
159
159
|
}
|
|
160
160
|
return undefined;
|
|
161
161
|
}
|
|
@@ -169,7 +169,7 @@ let DefaultFormatter = class DefaultFormatter extends Disposable {
|
|
|
169
169
|
}));
|
|
170
170
|
const langName = this._languageService.getLanguageName(document.getLanguageId()) || document.getLanguageId();
|
|
171
171
|
const pick = await this._quickInputService.pick(picks, { placeHolder: ( localize(
|
|
172
|
-
|
|
172
|
+
7785,
|
|
173
173
|
"Select a default formatter for '{0}' files",
|
|
174
174
|
DefaultFormatter_1._maybeQuotes(langName)
|
|
175
175
|
)) });
|
|
@@ -202,14 +202,14 @@ let DefaultFormatter = class DefaultFormatter extends Disposable {
|
|
|
202
202
|
if (typeof result !== 'string') {
|
|
203
203
|
return;
|
|
204
204
|
}
|
|
205
|
-
const command = { id: `formatter/configure/dfl/${generateUuid()}`, title: ( localize(
|
|
205
|
+
const command = { id: `formatter/configure/dfl/${generateUuid()}`, title: ( localize(7786, "Configure...")) };
|
|
206
206
|
this._languageStatusStore.add(CommandsRegistry.registerCommand(command.id, () => this._pickAndPersistDefaultFormatter(formatter, document)));
|
|
207
207
|
this._languageStatusStore.add(this._languageStatusService.addStatus({
|
|
208
208
|
id: 'formatter.conflict',
|
|
209
|
-
name: ( localize(
|
|
209
|
+
name: ( localize(7787, "Formatter Conflicts")),
|
|
210
210
|
selector: { language: document.getLanguageId(), pattern: document.uri.fsPath },
|
|
211
211
|
severity: Severity$1.Error,
|
|
212
|
-
label: ( localize(
|
|
212
|
+
label: ( localize(7788, "Formatting")),
|
|
213
213
|
detail: result,
|
|
214
214
|
busy: false,
|
|
215
215
|
source: '',
|
|
@@ -237,7 +237,7 @@ DefaultFormatter = DefaultFormatter_1 = ( __decorate([
|
|
|
237
237
|
properties: {
|
|
238
238
|
[DefaultFormatter.configName]: {
|
|
239
239
|
description: ( localize(
|
|
240
|
-
|
|
240
|
+
7789,
|
|
241
241
|
"Defines a default formatter which takes precedence over all other formatter settings. Must be the identifier of an extension contributing a formatter."
|
|
242
242
|
)),
|
|
243
243
|
type: ['string', 'null'],
|
|
@@ -260,7 +260,7 @@ async function showFormatterPick(accessor, model, formatters) {
|
|
|
260
260
|
const pick = {
|
|
261
261
|
index,
|
|
262
262
|
label: provider.displayName || '',
|
|
263
|
-
description: isDefault ? ( localize(
|
|
263
|
+
description: isDefault ? ( localize(7790, "(default)")) : undefined,
|
|
264
264
|
};
|
|
265
265
|
if (isDefault) {
|
|
266
266
|
defaultFormatterPick = pick;
|
|
@@ -268,10 +268,10 @@ async function showFormatterPick(accessor, model, formatters) {
|
|
|
268
268
|
return pick;
|
|
269
269
|
}));
|
|
270
270
|
const configurePick = {
|
|
271
|
-
label: ( localize(
|
|
271
|
+
label: ( localize(7791, "Configure Default Formatter..."))
|
|
272
272
|
};
|
|
273
273
|
const pick = await quickPickService.pick([...picks, { type: 'separator' }, configurePick], {
|
|
274
|
-
placeHolder: ( localize(
|
|
274
|
+
placeHolder: ( localize(7792, "Select a formatter")),
|
|
275
275
|
activeItem: defaultFormatterPick
|
|
276
276
|
});
|
|
277
277
|
if (!pick) {
|
|
@@ -280,7 +280,7 @@ async function showFormatterPick(accessor, model, formatters) {
|
|
|
280
280
|
else if (pick === configurePick) {
|
|
281
281
|
const langName = languageService.getLanguageName(model.getLanguageId()) || model.getLanguageId();
|
|
282
282
|
const pick = await quickPickService.pick(picks, { placeHolder: ( localize(
|
|
283
|
-
|
|
283
|
+
7785,
|
|
284
284
|
"Select a default formatter for '{0}' files",
|
|
285
285
|
DefaultFormatter._maybeQuotes(langName)
|
|
286
286
|
)) });
|
|
@@ -297,7 +297,7 @@ registerEditorAction(class FormatDocumentMultipleAction extends EditorAction {
|
|
|
297
297
|
constructor() {
|
|
298
298
|
super({
|
|
299
299
|
id: 'editor.action.formatDocument.multiple',
|
|
300
|
-
label: ( localize(
|
|
300
|
+
label: ( localize(7793, "Format Document With...")),
|
|
301
301
|
alias: 'Format Document...',
|
|
302
302
|
precondition: ( ContextKeyExpr.and(
|
|
303
303
|
EditorContextKeys.writable,
|
|
@@ -327,7 +327,7 @@ registerEditorAction(class FormatSelectionMultipleAction extends EditorAction {
|
|
|
327
327
|
constructor() {
|
|
328
328
|
super({
|
|
329
329
|
id: 'editor.action.formatSelection.multiple',
|
|
330
|
-
label: ( localize(
|
|
330
|
+
label: ( localize(7794, "Format Selection With...")),
|
|
331
331
|
alias: 'Format Code...',
|
|
332
332
|
precondition: ( ContextKeyExpr.and(( ContextKeyExpr.and(EditorContextKeys.writable)), EditorContextKeys.hasMultipleDocumentSelectionFormattingProvider)),
|
|
333
333
|
contextMenuOpts: {
|
|
@@ -15,7 +15,7 @@ registerEditorAction(class FormatDocumentMultipleAction extends EditorAction {
|
|
|
15
15
|
constructor() {
|
|
16
16
|
super({
|
|
17
17
|
id: 'editor.action.formatDocument.none',
|
|
18
|
-
label: ( localize2(
|
|
18
|
+
label: ( localize2(7795, "Format Document")),
|
|
19
19
|
precondition: ( ContextKeyExpr.and(EditorContextKeys.writable, ( EditorContextKeys.hasDocumentFormattingProvider.toNegated()))),
|
|
20
20
|
kbOpts: {
|
|
21
21
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -43,14 +43,14 @@ registerEditorAction(class FormatDocumentMultipleAction extends EditorAction {
|
|
|
43
43
|
return commandService.executeCommand('editor.action.formatDocument');
|
|
44
44
|
}
|
|
45
45
|
else if (model.isTooLargeForSyncing()) {
|
|
46
|
-
notificationService.warn(( localize(
|
|
46
|
+
notificationService.warn(( localize(7796, "This file cannot be formatted because it is too large")));
|
|
47
47
|
}
|
|
48
48
|
else {
|
|
49
49
|
const langName = model.getLanguageId();
|
|
50
|
-
const message = ( localize(
|
|
50
|
+
const message = ( localize(7797, "There is no formatter for '{0}' files installed.", langName));
|
|
51
51
|
const { confirmed } = await dialogService.confirm({
|
|
52
52
|
message,
|
|
53
|
-
primaryButton: ( localize(
|
|
53
|
+
primaryButton: ( localize(7798, "&&Install Formatter..."))
|
|
54
54
|
});
|
|
55
55
|
if (confirmed) {
|
|
56
56
|
extensionsWorkbenchService.openSearch(`category:formatters ${langName}`);
|