--- a/src/Tools/VSCode/extension/src/extension.ts Mon Jan 02 14:44:14 2017 +0100
+++ b/src/Tools/VSCode/extension/src/extension.ts Mon Jan 02 15:00:55 2017 +0100
@@ -12,23 +12,26 @@
let isabelle_home = vscode.workspace.getConfiguration("isabelle").get<string>("home");
let isabelle_args = vscode.workspace.getConfiguration("isabelle").get<Array<string>>("args");
- let run = {
- command: path.join(isabelle_home, "bin", "isabelle"),
- args: ["vscode_server"].concat(isabelle_args)
- };
- let server_options: ServerOptions =
- {
- run: run,
- debug: {
- command: run.command,
- args: run.args.concat(["-L", path.join(context.extensionPath, "protocol.log")]) }
- };
- let client_options: LanguageClientOptions = {
- documentSelector: ["isabelle", "isabelle-ml"]
- };
+ if (isabelle_home == "") vscode.window.showErrorMessage("Missing isabelle.home settings")
+ else {
+ let run = {
+ command: path.join(isabelle_home, "bin", "isabelle"),
+ args: ["vscode_server"].concat(isabelle_args)
+ };
+ let server_options: ServerOptions =
+ {
+ run: run,
+ debug: {
+ command: run.command,
+ args: run.args.concat(["-L", path.join(context.extensionPath, "protocol.log")]) }
+ };
+ let client_options: LanguageClientOptions = {
+ documentSelector: ["isabelle", "isabelle-ml"]
+ };
- let disposable = new LanguageClient("Isabelle", server_options, client_options, false).start();
- context.subscriptions.push(disposable);
+ let disposable = new LanguageClient("Isabelle", server_options, client_options, false).start();
+ context.subscriptions.push(disposable);
+ }
}
export function deactivate() { }