@codingame/monaco-vscode-api 23.0.4 → 23.1.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.
- package/package.json +8 -8
- package/services.d.ts +1 -1
- package/services.js +3 -4
- package/vscode/src/vs/base/browser/dom.d.ts +6 -0
- package/vscode/src/vs/base/browser/dom.js +12 -3
- package/vscode/src/vs/platform/languagePacks/common/languagePacks.service.d.ts +1 -1
- package/vscode/src/vs/platform/policy/common/policy.js +27 -4
- package/vscode/src/vs/platform/product/common/product.js +1 -1
- package/vscode/src/vs/workbench/common/configuration.js +9 -9
- package/vscode/src/vs/workbench/common/contextkeys.js +73 -73
- package/vscode/src/vs/workbench/common/editor/diffEditorInput.js +1 -1
- package/vscode/src/vs/workbench/common/editor/sideBySideEditorInput.js +1 -1
- package/vscode/src/vs/workbench/common/editor/textEditorModel.js +1 -1
- package/vscode/src/vs/workbench/common/editor.d.ts +1 -1
- package/vscode/src/vs/workbench/common/editor.js +4 -4
- package/vscode/src/vs/workbench/common/theme.js +160 -160
- package/vscode/src/vs/workbench/common/views.js +4 -4
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.js +159 -159
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleViewActions.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContextPickService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorContextKeys.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/common/chatContextKeys.js +50 -50
- package/vscode/src/vs/workbench/contrib/chat/common/chatEditingService.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatVariableEntries.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/languageModelToolsService.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/languageModels.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/common/modelPicker/modelPickerWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/tools/manageTodoListTool.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/common/tools/runSubagentTool.js +2 -2
- package/vscode/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.js +13 -13
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/dictation/editorDictation.js +4 -4
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorAccessibilityHelp.js +5 -5
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.js +3 -3
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/largeFileOptimizations.js +3 -3
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/saveParticipants.js +4 -4
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMinimap.js +2 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier.js +4 -4
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderControlCharacter.js +2 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderWhitespace.js +2 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.js +5 -5
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsAccessibility.js +12 -12
- package/vscode/src/vs/workbench/contrib/comments/common/commentContextKeys.js +11 -11
- package/vscode/src/vs/workbench/contrib/debug/common/abstractDebugAdapter.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/common/debug.js +65 -65
- package/vscode/src/vs/workbench/contrib/dropOrPasteInto/browser/commands.js +2 -2
- package/vscode/src/vs/workbench/contrib/dropOrPasteInto/browser/configurationSchema.js +4 -4
- 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/files/browser/files.service.d.ts +2 -2
- 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/notebook/common/notebookCommon.d.ts +1 -1
- 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/contrib/webview/browser/webview.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewWorkbenchService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/services/accounts/common/defaultAccount.js +1 -1
- package/vscode/src/vs/workbench/services/chat/common/chatEntitlementService.js +9 -9
- package/vscode/src/vs/workbench/services/configurationResolver/common/variableResolver.js +16 -16
- package/vscode/src/vs/workbench/services/editor/common/editorGroupsService.d.ts +1 -1
- package/vscode/src/vs/workbench/services/editor/common/editorResolverService.js +1 -1
- package/vscode/src/vs/workbench/services/editor/common/editorService.d.ts +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionsRegistry.js +87 -87
- package/vscode/src/vs/workbench/services/filesConfiguration/common/filesConfigurationService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/services/host/browser/host.service.d.ts +1 -1
- package/vscode/src/vs/workbench/services/language/common/languageService.js +28 -28
- package/vscode/src/vs/workbench/services/localization/common/locale.service.d.ts +1 -1
- package/vscode/src/vs/workbench/services/log/common/logConstants.js +1 -1
- package/vscode/src/vs/workbench/services/outline/browser/outline.service.d.ts +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/textfile/common/textfiles.d.ts +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/vscode/src/vs/workbench/services/workingCopy/common/workingCopyBackup.d.ts +1 -1
- package/vscode/src/vs/workbench/services/workingCopy/common/workingCopyBackup.service.d.ts +1 -1
- package/vscode/src/vs/workbench/services/workingCopy/common/workingCopyEditorService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/services/workingCopy/common/workingCopyFileService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/services/workingCopy/common/workingCopyService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/browser/actions/textInputActions.d.ts +0 -19
- package/vscode/src/vs/workbench/browser/actions/textInputActions.js +0 -95
|
@@ -8,16 +8,16 @@ import { Categories } from '../../../../platform/action/common/actionCommonCateg
|
|
|
8
8
|
|
|
9
9
|
function getSyncAreaLabel(source) {
|
|
10
10
|
switch (source) {
|
|
11
|
-
case SyncResource.Settings: return localize(
|
|
12
|
-
case SyncResource.Keybindings: return localize(
|
|
13
|
-
case SyncResource.Snippets: return localize(
|
|
14
|
-
case SyncResource.Prompts: return localize(
|
|
15
|
-
case SyncResource.Tasks: return localize(
|
|
16
|
-
case SyncResource.Mcp: return localize(
|
|
17
|
-
case SyncResource.Extensions: return localize(
|
|
18
|
-
case SyncResource.GlobalState: return localize(
|
|
19
|
-
case SyncResource.Profiles: return localize(
|
|
20
|
-
case SyncResource.WorkspaceState: return localize(
|
|
11
|
+
case SyncResource.Settings: return localize(14398, "Settings");
|
|
12
|
+
case SyncResource.Keybindings: return localize(14399, "Keyboard Shortcuts");
|
|
13
|
+
case SyncResource.Snippets: return localize(14400, "Snippets");
|
|
14
|
+
case SyncResource.Prompts: return localize(14401, "Prompts and Instructions");
|
|
15
|
+
case SyncResource.Tasks: return localize(14402, "Tasks");
|
|
16
|
+
case SyncResource.Mcp: return localize(14403, "MCP Servers");
|
|
17
|
+
case SyncResource.Extensions: return localize(14404, "Extensions");
|
|
18
|
+
case SyncResource.GlobalState: return localize(14405, "UI State");
|
|
19
|
+
case SyncResource.Profiles: return localize(14406, "Profiles");
|
|
20
|
+
case SyncResource.WorkspaceState: return localize(14407, "Workspace State");
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
var AccountStatus;
|
|
@@ -26,8 +26,8 @@ var AccountStatus;
|
|
|
26
26
|
AccountStatus["Unavailable"] = "unavailable";
|
|
27
27
|
AccountStatus["Available"] = "available";
|
|
28
28
|
})(AccountStatus || (AccountStatus = {}));
|
|
29
|
-
const SYNC_TITLE = ( localize2(
|
|
30
|
-
const SYNC_VIEW_ICON = registerIcon('settings-sync-view-icon', Codicon.sync, ( localize(
|
|
29
|
+
const SYNC_TITLE = ( localize2(14408, "Settings Sync"));
|
|
30
|
+
const SYNC_VIEW_ICON = registerIcon('settings-sync-view-icon', Codicon.sync, ( localize(14409, 'View icon of the Settings Sync view.')));
|
|
31
31
|
const CONTEXT_SYNC_STATE = ( new RawContextKey('syncStatus', SyncStatus.Uninitialized));
|
|
32
32
|
const CONTEXT_SYNC_ENABLEMENT = ( new RawContextKey('syncEnabled', false));
|
|
33
33
|
const CONTEXT_ACCOUNT_STATE = ( new RawContextKey('userDataSyncAccountStatus', AccountStatus.Uninitialized));
|
|
@@ -40,7 +40,7 @@ const SYNC_VIEW_CONTAINER_ID = 'workbench.view.sync';
|
|
|
40
40
|
const SYNC_CONFLICTS_VIEW_ID = 'workbench.views.sync.conflicts';
|
|
41
41
|
const DOWNLOAD_ACTIVITY_ACTION_DESCRIPTOR = {
|
|
42
42
|
id: 'workbench.userDataSync.actions.downloadSyncActivity',
|
|
43
|
-
title: ( localize2(
|
|
43
|
+
title: ( localize2(14410, "Download Settings Sync Activity")),
|
|
44
44
|
category: Categories.Developer,
|
|
45
45
|
f1: true,
|
|
46
46
|
precondition: ( ContextKeyExpr.and(( CONTEXT_ACCOUNT_STATE.isEqualTo(AccountStatus.Available)), ( CONTEXT_SYNC_STATE.notEqualsTo(SyncStatus.Uninitialized))))
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VSBufferReadableStream } from "../../../../base/common/buffer.js";
|
|
2
|
-
import { IWorkingCopyBackupMeta } from "@codingame/monaco-vscode-
|
|
2
|
+
import { IWorkingCopyBackupMeta } from "@codingame/monaco-vscode-1f37b5fb-f500-54d2-b98a-d12d100cafca-common/vscode/vs/workbench/services/workingCopy/common/workingCopy";
|
|
3
3
|
/**
|
|
4
4
|
* A resolved working copy backup carries the backup value
|
|
5
5
|
* as well as associated metadata with it.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VSBufferReadable, VSBufferReadableStream } from "../../../../base/common/buffer.js";
|
|
2
2
|
import { CancellationToken } from "../../../../base/common/cancellation.js";
|
|
3
|
-
import { IWorkingCopyIdentifier, IWorkingCopyBackupMeta } from "@codingame/monaco-vscode-
|
|
3
|
+
import { IWorkingCopyIdentifier, IWorkingCopyBackupMeta } from "@codingame/monaco-vscode-1f37b5fb-f500-54d2-b98a-d12d100cafca-common/vscode/vs/workbench/services/workingCopy/common/workingCopy";
|
|
4
4
|
import { IResolvedWorkingCopyBackup } from "./workingCopyBackup.js";
|
|
5
5
|
export declare const IWorkingCopyBackupService: import("../../../../platform/instantiation/common/instantiation.js").ServiceIdentifier<IWorkingCopyBackupService>;
|
|
6
6
|
/**
|
package/vscode/src/vs/workbench/services/workingCopy/common/workingCopyEditorService.service.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Event } from "../../../../base/common/event.js";
|
|
2
2
|
import { IDisposable } from "../../../../base/common/lifecycle.js";
|
|
3
3
|
import { IEditorIdentifier } from "../../../common/editor.js";
|
|
4
|
-
import { IWorkingCopy } from "@codingame/monaco-vscode-
|
|
4
|
+
import { IWorkingCopy } from "@codingame/monaco-vscode-1f37b5fb-f500-54d2-b98a-d12d100cafca-common/vscode/vs/workbench/services/workingCopy/common/workingCopy";
|
|
5
5
|
import { IWorkingCopyEditorHandler } from "@codingame/monaco-vscode-working-copy-service-override/vscode/vs/workbench/services/workingCopy/common/workingCopyEditorService";
|
|
6
6
|
export declare const IWorkingCopyEditorService: import("../../../../platform/instantiation/common/instantiation.js").ServiceIdentifier<IWorkingCopyEditorService>;
|
|
7
7
|
export interface IWorkingCopyEditorService {
|
package/vscode/src/vs/workbench/services/workingCopy/common/workingCopyFileService.service.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { URI } from "../../../../base/common/uri.js";
|
|
|
5
5
|
import { IFileStatWithMetadata } from "../../../../platform/files/common/files.js";
|
|
6
6
|
import { IProgress, IProgressStep } from "../../../../platform/progress/common/progress.js";
|
|
7
7
|
import { IStoredFileWorkingCopy, IStoredFileWorkingCopyModel } from "@codingame/monaco-vscode-6f931a91-88ea-5232-897f-a17ec3929ba5-common/vscode/vs/workbench/services/workingCopy/common/storedFileWorkingCopy";
|
|
8
|
-
import { IWorkingCopy } from "@codingame/monaco-vscode-
|
|
8
|
+
import { IWorkingCopy } from "@codingame/monaco-vscode-1f37b5fb-f500-54d2-b98a-d12d100cafca-common/vscode/vs/workbench/services/workingCopy/common/workingCopy";
|
|
9
9
|
import { WorkingCopyFileEvent, IWorkingCopyFileOperationParticipant, IStoredFileWorkingCopySaveParticipant, IStoredFileWorkingCopySaveParticipantContext, ICreateFileOperation, IFileOperationUndoRedoInfo, ICreateOperation, IMoveOperation, ICopyOperation, IDeleteOperation, WorkingCopyProvider } from "@codingame/monaco-vscode-base-service-override/vscode/vs/workbench/services/workingCopy/common/workingCopyFileService";
|
|
10
10
|
export declare const IWorkingCopyFileService: import("../../../../platform/instantiation/common/instantiation.js").ServiceIdentifier<IWorkingCopyFileService>;
|
|
11
11
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Event } from "../../../../base/common/event.js";
|
|
2
2
|
import { IDisposable } from "../../../../base/common/lifecycle.js";
|
|
3
3
|
import { URI } from "../../../../base/common/uri.js";
|
|
4
|
-
import { IWorkingCopy, IWorkingCopyIdentifier } from "@codingame/monaco-vscode-
|
|
4
|
+
import { IWorkingCopy, IWorkingCopyIdentifier } from "@codingame/monaco-vscode-1f37b5fb-f500-54d2-b98a-d12d100cafca-common/vscode/vs/workbench/services/workingCopy/common/workingCopy";
|
|
5
5
|
import { IWorkingCopySaveEvent } from "@codingame/monaco-vscode-working-copy-service-override/vscode/vs/workbench/services/workingCopy/common/workingCopyService";
|
|
6
6
|
export declare const IWorkingCopyService: import("../../../../platform/instantiation/common/instantiation.js").ServiceIdentifier<IWorkingCopyService>;
|
|
7
7
|
export interface IWorkingCopyService {
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { IAction } from "../../../base/common/actions.js";
|
|
2
|
-
import { IWorkbenchLayoutService } from "../../services/layout/browser/layoutService.service.js";
|
|
3
|
-
import { IContextMenuService } from "../../../platform/contextview/browser/contextView.service.js";
|
|
4
|
-
import { Disposable } from "../../../base/common/lifecycle.js";
|
|
5
|
-
import { IWorkbenchContribution } from "../../common/contributions.js";
|
|
6
|
-
import { IClipboardService } from "../../../platform/clipboard/common/clipboardService.service.js";
|
|
7
|
-
import { ILogService } from "../../../platform/log/common/log.service.js";
|
|
8
|
-
export declare function createTextInputActions(clipboardService: IClipboardService, logService: ILogService): IAction[];
|
|
9
|
-
export declare class TextInputActionsProvider extends Disposable implements IWorkbenchContribution {
|
|
10
|
-
private readonly layoutService;
|
|
11
|
-
private readonly contextMenuService;
|
|
12
|
-
private readonly clipboardService;
|
|
13
|
-
private readonly logService;
|
|
14
|
-
static readonly ID = "workbench.contrib.textInputActionsProvider";
|
|
15
|
-
private readonly textInputActions;
|
|
16
|
-
constructor(layoutService: IWorkbenchLayoutService, contextMenuService: IContextMenuService, clipboardService: IClipboardService, logService: ILogService);
|
|
17
|
-
private registerListeners;
|
|
18
|
-
private onContextMenu;
|
|
19
|
-
}
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { __decorate, __param } from '../../../../../../external/tslib/tslib.es6.js';
|
|
3
|
-
import { toAction, Separator } from '../../../base/common/actions.js';
|
|
4
|
-
import { localize } from '../../../nls.js';
|
|
5
|
-
import { IWorkbenchLayoutService } from '../../services/layout/browser/layoutService.service.js';
|
|
6
|
-
import { IContextMenuService } from '../../../platform/contextview/browser/contextView.service.js';
|
|
7
|
-
import { Disposable } from '../../../base/common/lifecycle.js';
|
|
8
|
-
import { getActiveDocument, isHTMLTextAreaElement, isHTMLInputElement, addDisposableListener, getWindow, EventHelper } from '../../../base/browser/dom.js';
|
|
9
|
-
import { registerWorkbenchContribution2, WorkbenchPhase } from '../../common/contributions.js';
|
|
10
|
-
import { IClipboardService } from '../../../platform/clipboard/common/clipboardService.service.js';
|
|
11
|
-
import { StandardMouseEvent } from '../../../base/browser/mouseEvent.js';
|
|
12
|
-
import { Event as Event$1 } from '../../../base/common/event.js';
|
|
13
|
-
import { Lazy } from '../../../base/common/lazy.js';
|
|
14
|
-
import { ILogService } from '../../../platform/log/common/log.service.js';
|
|
15
|
-
|
|
16
|
-
function createTextInputActions(clipboardService, logService) {
|
|
17
|
-
return [
|
|
18
|
-
toAction({ id: 'undo', label: ( localize(2863, "Undo")), run: () => getActiveDocument().execCommand('undo') }),
|
|
19
|
-
toAction({ id: 'redo', label: ( localize(2864, "Redo")), run: () => getActiveDocument().execCommand('redo') }),
|
|
20
|
-
( new Separator()),
|
|
21
|
-
toAction({
|
|
22
|
-
id: 'editor.action.clipboardCutAction', label: ( localize(2865, "Cut")), run: () => {
|
|
23
|
-
logService.trace('TextInputActionsProvider#cut');
|
|
24
|
-
getActiveDocument().execCommand('cut');
|
|
25
|
-
}
|
|
26
|
-
}),
|
|
27
|
-
toAction({
|
|
28
|
-
id: 'editor.action.clipboardCopyAction', label: ( localize(2866, "Copy")), run: () => {
|
|
29
|
-
logService.trace('TextInputActionsProvider#copy');
|
|
30
|
-
getActiveDocument().execCommand('copy');
|
|
31
|
-
}
|
|
32
|
-
}),
|
|
33
|
-
toAction({
|
|
34
|
-
id: 'editor.action.clipboardPasteAction',
|
|
35
|
-
label: ( localize(2867, "Paste")),
|
|
36
|
-
run: async (element) => {
|
|
37
|
-
logService.trace('TextInputActionsProvider#paste');
|
|
38
|
-
const clipboardText = await clipboardService.readText();
|
|
39
|
-
if (isHTMLTextAreaElement(element) || isHTMLInputElement(element)) {
|
|
40
|
-
const selectionStart = element.selectionStart || 0;
|
|
41
|
-
const selectionEnd = element.selectionEnd || 0;
|
|
42
|
-
element.value = `${element.value.substring(0, selectionStart)}${clipboardText}${element.value.substring(selectionEnd, element.value.length)}`;
|
|
43
|
-
element.selectionStart = selectionStart + clipboardText.length;
|
|
44
|
-
element.selectionEnd = element.selectionStart;
|
|
45
|
-
element.dispatchEvent(( new Event('input', { bubbles: true, cancelable: true })));
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}),
|
|
49
|
-
( new Separator()),
|
|
50
|
-
toAction({ id: 'editor.action.selectAll', label: ( localize(2868, "Select All")), run: () => getActiveDocument().execCommand('selectAll') })
|
|
51
|
-
];
|
|
52
|
-
}
|
|
53
|
-
let TextInputActionsProvider = class TextInputActionsProvider extends Disposable {
|
|
54
|
-
static { this.ID = 'workbench.contrib.textInputActionsProvider'; }
|
|
55
|
-
constructor(layoutService, contextMenuService, clipboardService, logService) {
|
|
56
|
-
super();
|
|
57
|
-
this.layoutService = layoutService;
|
|
58
|
-
this.contextMenuService = contextMenuService;
|
|
59
|
-
this.clipboardService = clipboardService;
|
|
60
|
-
this.logService = logService;
|
|
61
|
-
this.textInputActions = ( new Lazy(() => createTextInputActions(this.clipboardService, this.logService)));
|
|
62
|
-
this.registerListeners();
|
|
63
|
-
}
|
|
64
|
-
registerListeners() {
|
|
65
|
-
this._register(Event$1.runAndSubscribe(this.layoutService.onDidAddContainer, ({ container, disposables }) => {
|
|
66
|
-
disposables.add(addDisposableListener(container, 'contextmenu', e => this.onContextMenu(getWindow(container), e)));
|
|
67
|
-
}, { container: this.layoutService.mainContainer, disposables: this._store }));
|
|
68
|
-
}
|
|
69
|
-
onContextMenu(targetWindow, e) {
|
|
70
|
-
if (e.defaultPrevented) {
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
const target = e.target;
|
|
74
|
-
if (!isHTMLTextAreaElement(target) && !isHTMLInputElement(target)) {
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
EventHelper.stop(e, true);
|
|
78
|
-
const event = ( new StandardMouseEvent(targetWindow, e));
|
|
79
|
-
this.contextMenuService.showContextMenu({
|
|
80
|
-
getAnchor: () => event,
|
|
81
|
-
getActions: () => this.textInputActions.value,
|
|
82
|
-
getActionsContext: () => target,
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
TextInputActionsProvider = ( __decorate([
|
|
87
|
-
( __param(0, IWorkbenchLayoutService)),
|
|
88
|
-
( __param(1, IContextMenuService)),
|
|
89
|
-
( __param(2, IClipboardService)),
|
|
90
|
-
( __param(3, ILogService))
|
|
91
|
-
], TextInputActionsProvider));
|
|
92
|
-
registerWorkbenchContribution2(TextInputActionsProvider.ID, TextInputActionsProvider, WorkbenchPhase.BlockRestore
|
|
93
|
-
);
|
|
94
|
-
|
|
95
|
-
export { TextInputActionsProvider, createTextInputActions };
|