#75079 Support keybindings resource

This commit is contained in:
Sandeep Somavarapu 2019-06-11 19:26:46 +02:00
parent 65f4b4a159
commit 59c79b84e3
2 changed files with 5 additions and 1 deletions

View file

@ -16,6 +16,7 @@
self.SERVER_APP_ROOT = '{{SERVER_APP_ROOT}}';
self.WINDOW_CONFIGURATION = {
settingsPath: '{{SETTINGS}}',
keybindingsPath: '{{KEYBINDINGS}}',
folderPath: '{{FOLDER}}',
workspacePath: '{{WORKSPACE}}',
}

View file

@ -36,6 +36,7 @@ import { hash } from 'vs/base/common/hash';
interface IWindowConfiguration {
settingsUri: URI;
keybindingsUri: URI;
remoteAuthority: string;
folderUri?: URI;
workspaceUri?: URI;
@ -141,7 +142,7 @@ class CodeRendererMain extends Disposable {
environmentService.args = { _: [] };
environmentService.appSettingsHome = toResource('/web/settings');
environmentService.settingsResource = this.configuration.settingsUri;
environmentService.keybindingsResource = toResource('/web/settings/keybindings.json');
environmentService.keybindingsResource = this.configuration.keybindingsUri;
environmentService.logsPath = '/web/logs';
environmentService.debugExtensionHost = {
port: null,
@ -184,6 +185,7 @@ class CodeRendererMain extends Disposable {
export interface IWindowConfigurationContents {
settingsPath: string;
keybindingsPath: string;
folderPath?: string;
workspacePath?: string;
}
@ -191,6 +193,7 @@ export interface IWindowConfigurationContents {
export function main(windowConfigurationContents: IWindowConfigurationContents): Promise<void> {
const windowConfiguration: IWindowConfiguration = {
settingsUri: toResource(windowConfigurationContents.settingsPath),
keybindingsUri: toResource(windowConfigurationContents.keybindingsPath),
folderUri: windowConfigurationContents.folderPath ? toResource(windowConfigurationContents.folderPath) : undefined,
workspaceUri: windowConfigurationContents.workspacePath ? toResource(windowConfigurationContents.workspacePath) : undefined,
remoteAuthority: document.location.host