@theia/keymaps 1.34.3 → 1.34.4
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/LICENSE +641 -641
- package/README.md +61 -61
- package/lib/browser/index.d.ts +3 -3
- package/lib/browser/index.js +30 -30
- package/lib/browser/keybinding-schema-updater.d.ts +85 -85
- package/lib/browser/keybinding-schema-updater.js +116 -116
- package/lib/browser/keybindings-widget.d.ts +239 -239
- package/lib/browser/keybindings-widget.js +669 -669
- package/lib/browser/keymaps-frontend-contribution.d.ts +24 -24
- package/lib/browser/keymaps-frontend-contribution.js +137 -137
- package/lib/browser/keymaps-frontend-module.d.ts +5 -5
- package/lib/browser/keymaps-frontend-module.js +44 -44
- package/lib/browser/keymaps-monaco-contribution.d.ts +1 -1
- package/lib/browser/keymaps-monaco-contribution.js +27 -27
- package/lib/browser/keymaps-service.d.ts +47 -47
- package/lib/browser/keymaps-service.js +223 -223
- package/lib/package.spec.js +25 -25
- package/package.json +7 -7
- package/src/browser/index.ts +19 -19
- package/src/browser/keybinding-schema-updater.ts +95 -95
- package/src/browser/keybindings-widget.tsx +798 -798
- package/src/browser/keymaps-frontend-contribution.ts +136 -136
- package/src/browser/keymaps-frontend-module.ts +44 -44
- package/src/browser/keymaps-monaco-contribution.ts +26 -26
- package/src/browser/keymaps-service.ts +210 -210
- package/src/browser/style/index.css +171 -171
- package/src/package.spec.ts +28 -28
|
@@ -1,136 +1,136 @@
|
|
|
1
|
-
// *****************************************************************************
|
|
2
|
-
// Copyright (C) 2018 TypeFox and others.
|
|
3
|
-
//
|
|
4
|
-
// This program and the accompanying materials are made available under the
|
|
5
|
-
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
-
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
-
//
|
|
8
|
-
// This Source Code may also be made available under the following Secondary
|
|
9
|
-
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
-
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
-
// with the GNU Classpath Exception which is available at
|
|
12
|
-
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
-
//
|
|
14
|
-
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
-
// *****************************************************************************
|
|
16
|
-
|
|
17
|
-
import { inject, injectable } from '@theia/core/shared/inversify';
|
|
18
|
-
import {
|
|
19
|
-
CommandContribution,
|
|
20
|
-
Command,
|
|
21
|
-
CommandRegistry,
|
|
22
|
-
MenuContribution,
|
|
23
|
-
MenuModelRegistry
|
|
24
|
-
} from '@theia/core/lib/common';
|
|
25
|
-
import { AbstractViewContribution, codicon, Widget } from '@theia/core/lib/browser';
|
|
26
|
-
import { CommonCommands, CommonMenus } from '@theia/core/lib/browser/common-frontend-contribution';
|
|
27
|
-
import { KeymapsService } from './keymaps-service';
|
|
28
|
-
import { KeybindingRegistry } from '@theia/core/lib/browser/keybinding';
|
|
29
|
-
import { KeybindingWidget } from './keybindings-widget';
|
|
30
|
-
import { TabBarToolbarContribution, TabBarToolbarRegistry } from '@theia/core/lib/browser/shell/tab-bar-toolbar';
|
|
31
|
-
import { nls } from '@theia/core/lib/common/nls';
|
|
32
|
-
|
|
33
|
-
export namespace KeymapsCommands {
|
|
34
|
-
export const OPEN_KEYMAPS = Command.toDefaultLocalizedCommand({
|
|
35
|
-
id: 'keymaps:open',
|
|
36
|
-
category: CommonCommands.PREFERENCES_CATEGORY,
|
|
37
|
-
label: 'Open Keyboard Shortcuts',
|
|
38
|
-
});
|
|
39
|
-
export const OPEN_KEYMAPS_JSON = Command.toDefaultLocalizedCommand({
|
|
40
|
-
id: 'keymaps:openJson',
|
|
41
|
-
category: CommonCommands.PREFERENCES_CATEGORY,
|
|
42
|
-
label: 'Open Keyboard Shortcuts (JSON)',
|
|
43
|
-
});
|
|
44
|
-
export const OPEN_KEYMAPS_JSON_TOOLBAR: Command = {
|
|
45
|
-
id: 'keymaps:openJson.toolbar',
|
|
46
|
-
iconClass: codicon('json')
|
|
47
|
-
};
|
|
48
|
-
export const CLEAR_KEYBINDINGS_SEARCH: Command = {
|
|
49
|
-
id: 'keymaps.clearSearch',
|
|
50
|
-
iconClass: codicon('clear-all')
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
@injectable()
|
|
55
|
-
export class KeymapsFrontendContribution extends AbstractViewContribution<KeybindingWidget> implements CommandContribution, MenuContribution, TabBarToolbarContribution {
|
|
56
|
-
|
|
57
|
-
@inject(KeymapsService)
|
|
58
|
-
protected readonly keymaps: KeymapsService;
|
|
59
|
-
|
|
60
|
-
constructor() {
|
|
61
|
-
super({
|
|
62
|
-
widgetId: KeybindingWidget.ID,
|
|
63
|
-
widgetName: KeybindingWidget.LABEL,
|
|
64
|
-
defaultWidgetOptions: {
|
|
65
|
-
area: 'main'
|
|
66
|
-
},
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
override registerCommands(commands: CommandRegistry): void {
|
|
71
|
-
commands.registerCommand(KeymapsCommands.OPEN_KEYMAPS, {
|
|
72
|
-
isEnabled: () => true,
|
|
73
|
-
execute: () => this.openView({ activate: true })
|
|
74
|
-
});
|
|
75
|
-
commands.registerCommand(KeymapsCommands.OPEN_KEYMAPS_JSON, {
|
|
76
|
-
isEnabled: () => true,
|
|
77
|
-
execute: () => this.keymaps.open()
|
|
78
|
-
});
|
|
79
|
-
commands.registerCommand(KeymapsCommands.OPEN_KEYMAPS_JSON_TOOLBAR, {
|
|
80
|
-
isEnabled: w => this.withWidget(w, () => true),
|
|
81
|
-
isVisible: w => this.withWidget(w, () => true),
|
|
82
|
-
execute: w => this.withWidget(w, widget => this.keymaps.open(widget)),
|
|
83
|
-
});
|
|
84
|
-
commands.registerCommand(KeymapsCommands.CLEAR_KEYBINDINGS_SEARCH, {
|
|
85
|
-
isEnabled: w => this.withWidget(w, widget => widget.hasSearch()),
|
|
86
|
-
isVisible: w => this.withWidget(w, () => true),
|
|
87
|
-
execute: w => this.withWidget(w, widget => widget.clearSearch()),
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
override registerMenus(menus: MenuModelRegistry): void {
|
|
92
|
-
menus.registerMenuAction(CommonMenus.FILE_SETTINGS_SUBMENU_OPEN, {
|
|
93
|
-
commandId: KeymapsCommands.OPEN_KEYMAPS.id,
|
|
94
|
-
order: 'a20'
|
|
95
|
-
});
|
|
96
|
-
menus.registerMenuAction(CommonMenus.SETTINGS_OPEN, {
|
|
97
|
-
commandId: KeymapsCommands.OPEN_KEYMAPS.id,
|
|
98
|
-
order: 'a20'
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
override registerKeybindings(keybindings: KeybindingRegistry): void {
|
|
103
|
-
keybindings.registerKeybinding({
|
|
104
|
-
command: KeymapsCommands.OPEN_KEYMAPS.id,
|
|
105
|
-
keybinding: 'ctrl+alt+,'
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
async registerToolbarItems(toolbar: TabBarToolbarRegistry): Promise<void> {
|
|
110
|
-
const widget = await this.widget;
|
|
111
|
-
const onDidChange = widget.onDidUpdate;
|
|
112
|
-
toolbar.registerItem({
|
|
113
|
-
id: KeymapsCommands.OPEN_KEYMAPS_JSON_TOOLBAR.id,
|
|
114
|
-
command: KeymapsCommands.OPEN_KEYMAPS_JSON_TOOLBAR.id,
|
|
115
|
-
tooltip: nls.localizeByDefault('Open Keyboard Shortcuts (JSON)'),
|
|
116
|
-
priority: 0,
|
|
117
|
-
});
|
|
118
|
-
toolbar.registerItem({
|
|
119
|
-
id: KeymapsCommands.CLEAR_KEYBINDINGS_SEARCH.id,
|
|
120
|
-
command: KeymapsCommands.CLEAR_KEYBINDINGS_SEARCH.id,
|
|
121
|
-
tooltip: nls.localizeByDefault('Clear Keybindings Search Input'),
|
|
122
|
-
priority: 1,
|
|
123
|
-
onDidChange,
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* Determine if the current widget is the keybindings widget.
|
|
129
|
-
*/
|
|
130
|
-
protected withWidget<T>(widget: Widget | undefined = this.tryGetWidget(), fn: (widget: KeybindingWidget) => T): T | false {
|
|
131
|
-
if (widget instanceof KeybindingWidget && widget.id === KeybindingWidget.ID) {
|
|
132
|
-
return fn(widget);
|
|
133
|
-
}
|
|
134
|
-
return false;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2018 TypeFox and others.
|
|
3
|
+
//
|
|
4
|
+
// This program and the accompanying materials are made available under the
|
|
5
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
//
|
|
8
|
+
// This Source Code may also be made available under the following Secondary
|
|
9
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
// with the GNU Classpath Exception which is available at
|
|
12
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
//
|
|
14
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
+
// *****************************************************************************
|
|
16
|
+
|
|
17
|
+
import { inject, injectable } from '@theia/core/shared/inversify';
|
|
18
|
+
import {
|
|
19
|
+
CommandContribution,
|
|
20
|
+
Command,
|
|
21
|
+
CommandRegistry,
|
|
22
|
+
MenuContribution,
|
|
23
|
+
MenuModelRegistry
|
|
24
|
+
} from '@theia/core/lib/common';
|
|
25
|
+
import { AbstractViewContribution, codicon, Widget } from '@theia/core/lib/browser';
|
|
26
|
+
import { CommonCommands, CommonMenus } from '@theia/core/lib/browser/common-frontend-contribution';
|
|
27
|
+
import { KeymapsService } from './keymaps-service';
|
|
28
|
+
import { KeybindingRegistry } from '@theia/core/lib/browser/keybinding';
|
|
29
|
+
import { KeybindingWidget } from './keybindings-widget';
|
|
30
|
+
import { TabBarToolbarContribution, TabBarToolbarRegistry } from '@theia/core/lib/browser/shell/tab-bar-toolbar';
|
|
31
|
+
import { nls } from '@theia/core/lib/common/nls';
|
|
32
|
+
|
|
33
|
+
export namespace KeymapsCommands {
|
|
34
|
+
export const OPEN_KEYMAPS = Command.toDefaultLocalizedCommand({
|
|
35
|
+
id: 'keymaps:open',
|
|
36
|
+
category: CommonCommands.PREFERENCES_CATEGORY,
|
|
37
|
+
label: 'Open Keyboard Shortcuts',
|
|
38
|
+
});
|
|
39
|
+
export const OPEN_KEYMAPS_JSON = Command.toDefaultLocalizedCommand({
|
|
40
|
+
id: 'keymaps:openJson',
|
|
41
|
+
category: CommonCommands.PREFERENCES_CATEGORY,
|
|
42
|
+
label: 'Open Keyboard Shortcuts (JSON)',
|
|
43
|
+
});
|
|
44
|
+
export const OPEN_KEYMAPS_JSON_TOOLBAR: Command = {
|
|
45
|
+
id: 'keymaps:openJson.toolbar',
|
|
46
|
+
iconClass: codicon('json')
|
|
47
|
+
};
|
|
48
|
+
export const CLEAR_KEYBINDINGS_SEARCH: Command = {
|
|
49
|
+
id: 'keymaps.clearSearch',
|
|
50
|
+
iconClass: codicon('clear-all')
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@injectable()
|
|
55
|
+
export class KeymapsFrontendContribution extends AbstractViewContribution<KeybindingWidget> implements CommandContribution, MenuContribution, TabBarToolbarContribution {
|
|
56
|
+
|
|
57
|
+
@inject(KeymapsService)
|
|
58
|
+
protected readonly keymaps: KeymapsService;
|
|
59
|
+
|
|
60
|
+
constructor() {
|
|
61
|
+
super({
|
|
62
|
+
widgetId: KeybindingWidget.ID,
|
|
63
|
+
widgetName: KeybindingWidget.LABEL,
|
|
64
|
+
defaultWidgetOptions: {
|
|
65
|
+
area: 'main'
|
|
66
|
+
},
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
override registerCommands(commands: CommandRegistry): void {
|
|
71
|
+
commands.registerCommand(KeymapsCommands.OPEN_KEYMAPS, {
|
|
72
|
+
isEnabled: () => true,
|
|
73
|
+
execute: () => this.openView({ activate: true })
|
|
74
|
+
});
|
|
75
|
+
commands.registerCommand(KeymapsCommands.OPEN_KEYMAPS_JSON, {
|
|
76
|
+
isEnabled: () => true,
|
|
77
|
+
execute: () => this.keymaps.open()
|
|
78
|
+
});
|
|
79
|
+
commands.registerCommand(KeymapsCommands.OPEN_KEYMAPS_JSON_TOOLBAR, {
|
|
80
|
+
isEnabled: w => this.withWidget(w, () => true),
|
|
81
|
+
isVisible: w => this.withWidget(w, () => true),
|
|
82
|
+
execute: w => this.withWidget(w, widget => this.keymaps.open(widget)),
|
|
83
|
+
});
|
|
84
|
+
commands.registerCommand(KeymapsCommands.CLEAR_KEYBINDINGS_SEARCH, {
|
|
85
|
+
isEnabled: w => this.withWidget(w, widget => widget.hasSearch()),
|
|
86
|
+
isVisible: w => this.withWidget(w, () => true),
|
|
87
|
+
execute: w => this.withWidget(w, widget => widget.clearSearch()),
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
override registerMenus(menus: MenuModelRegistry): void {
|
|
92
|
+
menus.registerMenuAction(CommonMenus.FILE_SETTINGS_SUBMENU_OPEN, {
|
|
93
|
+
commandId: KeymapsCommands.OPEN_KEYMAPS.id,
|
|
94
|
+
order: 'a20'
|
|
95
|
+
});
|
|
96
|
+
menus.registerMenuAction(CommonMenus.SETTINGS_OPEN, {
|
|
97
|
+
commandId: KeymapsCommands.OPEN_KEYMAPS.id,
|
|
98
|
+
order: 'a20'
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
override registerKeybindings(keybindings: KeybindingRegistry): void {
|
|
103
|
+
keybindings.registerKeybinding({
|
|
104
|
+
command: KeymapsCommands.OPEN_KEYMAPS.id,
|
|
105
|
+
keybinding: 'ctrl+alt+,'
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
async registerToolbarItems(toolbar: TabBarToolbarRegistry): Promise<void> {
|
|
110
|
+
const widget = await this.widget;
|
|
111
|
+
const onDidChange = widget.onDidUpdate;
|
|
112
|
+
toolbar.registerItem({
|
|
113
|
+
id: KeymapsCommands.OPEN_KEYMAPS_JSON_TOOLBAR.id,
|
|
114
|
+
command: KeymapsCommands.OPEN_KEYMAPS_JSON_TOOLBAR.id,
|
|
115
|
+
tooltip: nls.localizeByDefault('Open Keyboard Shortcuts (JSON)'),
|
|
116
|
+
priority: 0,
|
|
117
|
+
});
|
|
118
|
+
toolbar.registerItem({
|
|
119
|
+
id: KeymapsCommands.CLEAR_KEYBINDINGS_SEARCH.id,
|
|
120
|
+
command: KeymapsCommands.CLEAR_KEYBINDINGS_SEARCH.id,
|
|
121
|
+
tooltip: nls.localizeByDefault('Clear Keybindings Search Input'),
|
|
122
|
+
priority: 1,
|
|
123
|
+
onDidChange,
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Determine if the current widget is the keybindings widget.
|
|
129
|
+
*/
|
|
130
|
+
protected withWidget<T>(widget: Widget | undefined = this.tryGetWidget(), fn: (widget: KeybindingWidget) => T): T | false {
|
|
131
|
+
if (widget instanceof KeybindingWidget && widget.id === KeybindingWidget.ID) {
|
|
132
|
+
return fn(widget);
|
|
133
|
+
}
|
|
134
|
+
return false;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
// *****************************************************************************
|
|
2
|
-
// Copyright (C) 2018 Ericsson and others.
|
|
3
|
-
//
|
|
4
|
-
// This program and the accompanying materials are made available under the
|
|
5
|
-
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
-
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
-
//
|
|
8
|
-
// This Source Code may also be made available under the following Secondary
|
|
9
|
-
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
-
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
-
// with the GNU Classpath Exception which is available at
|
|
12
|
-
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
-
//
|
|
14
|
-
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
-
// *****************************************************************************
|
|
16
|
-
|
|
17
|
-
import './keymaps-monaco-contribution';
|
|
18
|
-
import '../../src/browser/style/index.css';
|
|
19
|
-
import { ContainerModule } from '@theia/core/shared/inversify';
|
|
20
|
-
import { KeymapsService } from './keymaps-service';
|
|
21
|
-
import { KeymapsFrontendContribution } from './keymaps-frontend-contribution';
|
|
22
|
-
import { CommandContribution, MenuContribution } from '@theia/core/lib/common';
|
|
23
|
-
import { KeybindingContribution } from '@theia/core/lib/browser/keybinding';
|
|
24
|
-
import { TabBarToolbarContribution } from '@theia/core/lib/browser/shell/tab-bar-toolbar';
|
|
25
|
-
import { WidgetFactory } from '@theia/core/lib/browser';
|
|
26
|
-
import { KeybindingWidget } from './keybindings-widget';
|
|
27
|
-
import { KeybindingSchemaUpdater } from './keybinding-schema-updater';
|
|
28
|
-
import { JsonSchemaContribution } from '@theia/core/lib/browser/json-schema-store';
|
|
29
|
-
|
|
30
|
-
export default new ContainerModule(bind => {
|
|
31
|
-
bind(KeymapsService).toSelf().inSingletonScope();
|
|
32
|
-
bind(KeymapsFrontendContribution).toSelf().inSingletonScope();
|
|
33
|
-
bind(CommandContribution).toService(KeymapsFrontendContribution);
|
|
34
|
-
bind(KeybindingContribution).toService(KeymapsFrontendContribution);
|
|
35
|
-
bind(MenuContribution).toService(KeymapsFrontendContribution);
|
|
36
|
-
bind(KeybindingWidget).toSelf();
|
|
37
|
-
bind(TabBarToolbarContribution).toService(KeymapsFrontendContribution);
|
|
38
|
-
bind(WidgetFactory).toDynamicValue(context => ({
|
|
39
|
-
id: KeybindingWidget.ID,
|
|
40
|
-
createWidget: () => context.container.get<KeybindingWidget>(KeybindingWidget),
|
|
41
|
-
})).inSingletonScope();
|
|
42
|
-
bind(KeybindingSchemaUpdater).toSelf().inSingletonScope();
|
|
43
|
-
bind(JsonSchemaContribution).toService(KeybindingSchemaUpdater);
|
|
44
|
-
});
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2018 Ericsson and others.
|
|
3
|
+
//
|
|
4
|
+
// This program and the accompanying materials are made available under the
|
|
5
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
//
|
|
8
|
+
// This Source Code may also be made available under the following Secondary
|
|
9
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
// with the GNU Classpath Exception which is available at
|
|
12
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
//
|
|
14
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
+
// *****************************************************************************
|
|
16
|
+
|
|
17
|
+
import './keymaps-monaco-contribution';
|
|
18
|
+
import '../../src/browser/style/index.css';
|
|
19
|
+
import { ContainerModule } from '@theia/core/shared/inversify';
|
|
20
|
+
import { KeymapsService } from './keymaps-service';
|
|
21
|
+
import { KeymapsFrontendContribution } from './keymaps-frontend-contribution';
|
|
22
|
+
import { CommandContribution, MenuContribution } from '@theia/core/lib/common';
|
|
23
|
+
import { KeybindingContribution } from '@theia/core/lib/browser/keybinding';
|
|
24
|
+
import { TabBarToolbarContribution } from '@theia/core/lib/browser/shell/tab-bar-toolbar';
|
|
25
|
+
import { WidgetFactory } from '@theia/core/lib/browser';
|
|
26
|
+
import { KeybindingWidget } from './keybindings-widget';
|
|
27
|
+
import { KeybindingSchemaUpdater } from './keybinding-schema-updater';
|
|
28
|
+
import { JsonSchemaContribution } from '@theia/core/lib/browser/json-schema-store';
|
|
29
|
+
|
|
30
|
+
export default new ContainerModule(bind => {
|
|
31
|
+
bind(KeymapsService).toSelf().inSingletonScope();
|
|
32
|
+
bind(KeymapsFrontendContribution).toSelf().inSingletonScope();
|
|
33
|
+
bind(CommandContribution).toService(KeymapsFrontendContribution);
|
|
34
|
+
bind(KeybindingContribution).toService(KeymapsFrontendContribution);
|
|
35
|
+
bind(MenuContribution).toService(KeymapsFrontendContribution);
|
|
36
|
+
bind(KeybindingWidget).toSelf();
|
|
37
|
+
bind(TabBarToolbarContribution).toService(KeymapsFrontendContribution);
|
|
38
|
+
bind(WidgetFactory).toDynamicValue(context => ({
|
|
39
|
+
id: KeybindingWidget.ID,
|
|
40
|
+
createWidget: () => context.container.get<KeybindingWidget>(KeybindingWidget),
|
|
41
|
+
})).inSingletonScope();
|
|
42
|
+
bind(KeybindingSchemaUpdater).toSelf().inSingletonScope();
|
|
43
|
+
bind(JsonSchemaContribution).toService(KeybindingSchemaUpdater);
|
|
44
|
+
});
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
// *****************************************************************************
|
|
2
|
-
// Copyright (C) 2018 TypeFox and others.
|
|
3
|
-
//
|
|
4
|
-
// This program and the accompanying materials are made available under the
|
|
5
|
-
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
-
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
-
//
|
|
8
|
-
// This Source Code may also be made available under the following Secondary
|
|
9
|
-
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
-
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
-
// with the GNU Classpath Exception which is available at
|
|
12
|
-
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
-
//
|
|
14
|
-
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
-
// *****************************************************************************
|
|
16
|
-
import * as monaco from '@theia/monaco-editor-core';
|
|
17
|
-
|
|
18
|
-
monaco.languages.register({
|
|
19
|
-
id: 'jsonc',
|
|
20
|
-
'aliases': [
|
|
21
|
-
'JSON with Comments'
|
|
22
|
-
],
|
|
23
|
-
'filenames': [
|
|
24
|
-
'keymaps.json'
|
|
25
|
-
]
|
|
26
|
-
});
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2018 TypeFox and others.
|
|
3
|
+
//
|
|
4
|
+
// This program and the accompanying materials are made available under the
|
|
5
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
//
|
|
8
|
+
// This Source Code may also be made available under the following Secondary
|
|
9
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
// with the GNU Classpath Exception which is available at
|
|
12
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
//
|
|
14
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
+
// *****************************************************************************
|
|
16
|
+
import * as monaco from '@theia/monaco-editor-core';
|
|
17
|
+
|
|
18
|
+
monaco.languages.register({
|
|
19
|
+
id: 'jsonc',
|
|
20
|
+
'aliases': [
|
|
21
|
+
'JSON with Comments'
|
|
22
|
+
],
|
|
23
|
+
'filenames': [
|
|
24
|
+
'keymaps.json'
|
|
25
|
+
]
|
|
26
|
+
});
|