@codingame/monaco-vscode-keybindings-service-override 3.2.2 → 4.0.0
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-keybindings-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
"module": "index.js",
|
|
19
19
|
"types": "index.d.ts",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"vscode": "npm:@codingame/monaco-vscode-api@
|
|
22
|
-
"@codingame/monaco-vscode-files-service-override": "
|
|
23
|
-
"@codingame/monaco-vscode-quickaccess-service-override": "
|
|
24
|
-
"@codingame/monaco-vscode-extensions-service-override": "
|
|
25
|
-
"@codingame/monaco-vscode-environment-service-override": "
|
|
26
|
-
"@codingame/monaco-vscode-layout-service-override": "
|
|
27
|
-
"@codingame/monaco-vscode-host-service-override": "
|
|
28
|
-
"@codingame/monaco-vscode-base-service-override": "
|
|
21
|
+
"vscode": "npm:@codingame/monaco-vscode-api@4.0.0",
|
|
22
|
+
"@codingame/monaco-vscode-files-service-override": "4.0.0",
|
|
23
|
+
"@codingame/monaco-vscode-quickaccess-service-override": "4.0.0",
|
|
24
|
+
"@codingame/monaco-vscode-extensions-service-override": "4.0.0",
|
|
25
|
+
"@codingame/monaco-vscode-environment-service-override": "4.0.0",
|
|
26
|
+
"@codingame/monaco-vscode-layout-service-override": "4.0.0",
|
|
27
|
+
"@codingame/monaco-vscode-host-service-override": "4.0.0",
|
|
28
|
+
"@codingame/monaco-vscode-base-service-override": "4.0.0"
|
|
29
29
|
}
|
|
30
30
|
}
|
|
@@ -3,7 +3,7 @@ import { Event } from 'vscode/vscode/vs/base/common/event';
|
|
|
3
3
|
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
4
4
|
import { setConstant, IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
5
5
|
import { IsMacContext, IsLinuxContext, IsWindowsContext, IsWebContext, IsMacNativeContext, IsIOSContext, IsMobileContext, IsDevelopmentContext, ProductQualityContext, InputFocusedContext } from 'vscode/vscode/vs/platform/contextkey/common/contextkeys';
|
|
6
|
-
import { RemoteNameContext, VirtualWorkspaceContext, TemporaryWorkspaceContext, HasWebFileSystemAccess, EmbedderIdentifierContext, ActiveEditorContext, ActiveEditorReadonlyContext,
|
|
6
|
+
import { RemoteNameContext, VirtualWorkspaceContext, TemporaryWorkspaceContext, HasWebFileSystemAccess, EmbedderIdentifierContext, ActiveEditorContext, ActiveEditorReadonlyContext, ActiveCompareEditorCanSwapContext, ActiveEditorCanToggleReadonlyContext, ActiveEditorCanRevertContext, ActiveEditorCanSplitInGroupContext, ActiveEditorAvailableEditorIdsContext, EditorsVisibleContext, TextCompareEditorVisibleContext, TextCompareEditorActiveContext, SideBySideEditorActiveContext, ActiveEditorGroupEmptyContext, ActiveEditorGroupIndexContext, ActiveEditorGroupLastContext, ActiveEditorGroupLockedContext, MultipleEditorGroupsContext, DirtyWorkingCopiesContext, WorkbenchStateContext, WorkspaceFolderCountContext, OpenFolderWorkspaceSupportContext, EmptyWorkspaceSupportContext, EnterMultiRootWorkspaceSupportContext, SplitEditorsVertically, IsMainWindowFullscreenContext, IsAuxiliaryWindowFocusedContext, InEditorZenModeContext, IsMainEditorCenteredLayoutContext, MainEditorAreaVisibleContext, EditorTabsVisibleContext, SideBarVisibleContext, TitleBarVisibleContext, TitleBarStyleContext, PanelPositionContext, PanelVisibleContext, PanelMaximizedContext, PanelAlignmentContext, AuxiliaryBarVisibleContext, applyAvailableEditorIds } from 'vscode/vscode/vs/workbench/common/contextkeys';
|
|
7
7
|
import { TEXT_DIFF_EDITOR_ID, SIDE_BY_SIDE_EDITOR_ID, EditorResourceAccessor, SideBySideEditor } from 'vscode/vscode/vs/workbench/common/editor';
|
|
8
8
|
import { onDidRegisterWindow, addDisposableListener, EventType, trackFocus, getActiveWindow } from 'vscode/vscode/vs/base/browser/dom';
|
|
9
9
|
import { preferredSideBySideGroupDirection, IEditorGroupsService } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService';
|
|
@@ -25,6 +25,7 @@ import { getTitleBarStyle } from 'vscode/vscode/vs/platform/window/common/window
|
|
|
25
25
|
import { mainWindow } from 'vscode/vscode/vs/base/browser/window';
|
|
26
26
|
import { DiffEditorInput } from 'vscode/vscode/vs/workbench/common/editor/diffEditorInput';
|
|
27
27
|
import { onDidChangeFullscreen, isFullscreen } from 'vscode/vscode/vs/base/browser/browser';
|
|
28
|
+
import { Schemas } from 'vscode/vscode/vs/base/common/network';
|
|
28
29
|
|
|
29
30
|
let WorkbenchContextKeysHandler = class WorkbenchContextKeysHandler extends Disposable {
|
|
30
31
|
constructor(contextKeyService, contextService, configurationService, environmentService, productService, editorService, editorResolverService, editorGroupService, layoutService, paneCompositeService, workingCopyService, fileService) {
|
|
@@ -60,7 +61,7 @@ let WorkbenchContextKeysHandler = class WorkbenchContextKeysHandler extends Disp
|
|
|
60
61
|
EmbedderIdentifierContext.bindTo(this.contextKeyService).set(productService.embedderIdentifier);
|
|
61
62
|
this.activeEditorContext = ActiveEditorContext.bindTo(this.contextKeyService);
|
|
62
63
|
this.activeEditorIsReadonly = ActiveEditorReadonlyContext.bindTo(this.contextKeyService);
|
|
63
|
-
this.
|
|
64
|
+
this.activeCompareEditorCanSwap = ActiveCompareEditorCanSwapContext.bindTo(this.contextKeyService);
|
|
64
65
|
this.activeEditorCanToggleReadonly = ActiveEditorCanToggleReadonlyContext.bindTo(this.contextKeyService);
|
|
65
66
|
this.activeEditorCanRevert = ActiveEditorCanRevertContext.bindTo(this.contextKeyService);
|
|
66
67
|
this.activeEditorCanSplitInGroup = ActiveEditorCanSplitInGroupContext.bindTo(this.contextKeyService);
|
|
@@ -184,14 +185,15 @@ let WorkbenchContextKeysHandler = class WorkbenchContextKeysHandler extends Disp
|
|
|
184
185
|
this.activeEditorCanSplitInGroup.set(activeEditorPane.input.hasCapability(32 ));
|
|
185
186
|
applyAvailableEditorIds(this.activeEditorAvailableEditorIds, activeEditorPane.input, this.editorResolverService);
|
|
186
187
|
this.activeEditorIsReadonly.set(!!activeEditorPane.input.isReadonly());
|
|
187
|
-
this.activeCompareEditorOriginalWritable.set(activeEditorPane.input instanceof DiffEditorInput && !activeEditorPane.input.original.isReadonly());
|
|
188
188
|
const primaryEditorResource = EditorResourceAccessor.getOriginalUri(activeEditorPane.input, { supportSideBySide: SideBySideEditor.PRIMARY });
|
|
189
|
+
const secondaryEditorResource = EditorResourceAccessor.getOriginalUri(activeEditorPane.input, { supportSideBySide: SideBySideEditor.SECONDARY });
|
|
190
|
+
this.activeCompareEditorCanSwap.set(activeEditorPane.input instanceof DiffEditorInput && !activeEditorPane.input.original.isReadonly() && !!primaryEditorResource && (this.fileService.hasProvider(primaryEditorResource) || primaryEditorResource.scheme === Schemas.untitled) && !!secondaryEditorResource && (this.fileService.hasProvider(secondaryEditorResource) || secondaryEditorResource.scheme === Schemas.untitled));
|
|
189
191
|
this.activeEditorCanToggleReadonly.set(!!primaryEditorResource && this.fileService.hasProvider(primaryEditorResource) && !this.fileService.hasCapability(primaryEditorResource, 2048 ));
|
|
190
192
|
}
|
|
191
193
|
else {
|
|
192
194
|
this.activeEditorContext.reset();
|
|
193
195
|
this.activeEditorIsReadonly.reset();
|
|
194
|
-
this.
|
|
196
|
+
this.activeCompareEditorCanSwap.reset();
|
|
195
197
|
this.activeEditorCanToggleReadonly.reset();
|
|
196
198
|
this.activeEditorCanRevert.reset();
|
|
197
199
|
this.activeEditorCanSplitInGroup.reset();
|
|
@@ -456,6 +456,16 @@ const apiMenus = [
|
|
|
456
456
|
)),
|
|
457
457
|
proposed: 'contribCommentPeekContext'
|
|
458
458
|
},
|
|
459
|
+
{
|
|
460
|
+
key: 'commentsView/commentThread/context',
|
|
461
|
+
id: MenuId.CommentsViewThreadActions,
|
|
462
|
+
description: ( localizeWithPath(
|
|
463
|
+
'vs/workbench/services/actions/common/menusExtensionPoint',
|
|
464
|
+
'commentsView.threadActions',
|
|
465
|
+
"The contributed comment thread context menu in the comments view"
|
|
466
|
+
)),
|
|
467
|
+
proposed: 'contribCommentsViewThreadMenus'
|
|
468
|
+
},
|
|
459
469
|
{
|
|
460
470
|
key: 'notebook/toolbar',
|
|
461
471
|
id: MenuId.NotebookToolbar,
|
|
@@ -539,6 +549,15 @@ const apiMenus = [
|
|
|
539
549
|
"The menu for a gutter decoration for a test item"
|
|
540
550
|
)),
|
|
541
551
|
},
|
|
552
|
+
{
|
|
553
|
+
key: 'testing/item/result',
|
|
554
|
+
id: MenuId.TestPeekElement,
|
|
555
|
+
description: ( localizeWithPath(
|
|
556
|
+
'vs/workbench/services/actions/common/menusExtensionPoint',
|
|
557
|
+
'testing.item.result.title',
|
|
558
|
+
"The menu for an item in the Test Results view or peek."
|
|
559
|
+
)),
|
|
560
|
+
},
|
|
542
561
|
{
|
|
543
562
|
key: 'testing/message/context',
|
|
544
563
|
id: MenuId.TestMessageContext,
|
|
@@ -700,6 +719,26 @@ const apiMenus = [
|
|
|
700
719
|
"The resource toolbar in the multi diff editor"
|
|
701
720
|
)),
|
|
702
721
|
proposed: 'contribMultiDiffEditorMenus'
|
|
722
|
+
},
|
|
723
|
+
{
|
|
724
|
+
key: 'diffEditor/gutter/hunk',
|
|
725
|
+
id: MenuId.DiffEditorHunkToolbar,
|
|
726
|
+
description: ( localizeWithPath(
|
|
727
|
+
'vs/workbench/services/actions/common/menusExtensionPoint',
|
|
728
|
+
'menus.diffEditorGutterToolBarMenus',
|
|
729
|
+
"The gutter toolbar in the diff editor"
|
|
730
|
+
)),
|
|
731
|
+
proposed: 'contribDiffEditorGutterToolBarMenus'
|
|
732
|
+
},
|
|
733
|
+
{
|
|
734
|
+
key: 'diffEditor/gutter/selection',
|
|
735
|
+
id: MenuId.DiffEditorSelectionToolbar,
|
|
736
|
+
description: ( localizeWithPath(
|
|
737
|
+
'vs/workbench/services/actions/common/menusExtensionPoint',
|
|
738
|
+
'menus.diffEditorGutterToolBarMenus',
|
|
739
|
+
"The gutter toolbar in the diff editor"
|
|
740
|
+
)),
|
|
741
|
+
proposed: 'contribDiffEditorGutterToolBarMenus'
|
|
703
742
|
}
|
|
704
743
|
];
|
|
705
744
|
var schema;
|
|
@@ -22,6 +22,7 @@ import { ContextKeyExpr, IContextKeyService } from 'vscode/vscode/vs/platform/co
|
|
|
22
22
|
import { IFileService } from 'vscode/vscode/vs/platform/files/common/files';
|
|
23
23
|
import { Extensions } from 'vscode/vscode/vs/platform/jsonschemas/common/jsonContributionRegistry';
|
|
24
24
|
import { AbstractKeybindingService } from 'vscode/vscode/vs/platform/keybinding/common/abstractKeybindingService';
|
|
25
|
+
import 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
25
26
|
import { KeybindingResolver } from 'vscode/vscode/vs/platform/keybinding/common/keybindingResolver';
|
|
26
27
|
import { KeybindingsRegistry } from 'vscode/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
27
28
|
import { ResolvedKeybindingItem } from 'vscode/vscode/vs/platform/keybinding/common/resolvedKeybindingItem';
|
|
@@ -223,10 +224,10 @@ let WorkbenchKeybindingService = WorkbenchKeybindingService_1 = class WorkbenchK
|
|
|
223
224
|
this.kbsJsonSchema = ( new KeybindingsJsonSchema());
|
|
224
225
|
this.updateKeybindingsJsonSchema();
|
|
225
226
|
this._keyboardMapper = this.keyboardLayoutService.getKeyboardMapper();
|
|
226
|
-
this.keyboardLayoutService.onDidChangeKeyboardLayout(() => {
|
|
227
|
+
this._register(this.keyboardLayoutService.onDidChangeKeyboardLayout(() => {
|
|
227
228
|
this._keyboardMapper = this.keyboardLayoutService.getKeyboardMapper();
|
|
228
229
|
this.updateResolver();
|
|
229
|
-
});
|
|
230
|
+
}));
|
|
230
231
|
this._keybindingHoldMode = null;
|
|
231
232
|
this._cachedResolver = null;
|
|
232
233
|
this.userKeybindings = this._register(( new UserKeybindings(userDataProfileService, uriIdentityService, fileService, logService)));
|