Set platform based on server (#32)

* Set platform based on server

Had to refactor a bit to ensure our values get set before VS Code tries
to use them.

* Pave the way for mnemonics on all platforms

* Fix context menus on Mac

* Fix a bunch of things on Mac including menu bar

* Set keybindings based on client's OS
This commit is contained in:
Asher
2019-02-26 12:01:14 -06:00
committed by GitHub
parent 0c2c957312
commit 14da71499f
18 changed files with 976 additions and 444 deletions

View File

@@ -9,6 +9,7 @@ import { IRecentlyOpened } from "vs/platform/history/common/history";
import { ISerializableCommandAction } from "vs/platform/actions/common/actions";
import { client } from "../client";
import { showOpenDialog } from "../dialog";
import { workbench } from "../workbench";
/**
* Instead of going to the shared process, we'll directly run these methods on
@@ -79,7 +80,7 @@ class WindowsService implements IWindowsService {
openDirectory: true,
},
}).then((path) => {
client.workspace = URI.file(path);
workbench.workspace = URI.file(path);
}).catch((ex) => {
//
});
@@ -150,12 +151,12 @@ class WindowsService implements IWindowsService {
public enterWorkspace(_windowId: number, _path: URI): Promise<IEnterWorkspaceResult> {
if (_path.path.endsWith(".json")) {
client.workspace = {
workbench.workspace = {
id: "Untitled",
configPath: _path.path,
};
} else {
client.workspace = _path;
workbench.workspace = _path;
}
return undefined!;