From 991ce9fe246eb73904fa4115d707c5563164551d Mon Sep 17 00:00:00 2001 From: Tim Etchells Date: Tue, 15 Jan 2019 14:13:31 -0500 Subject: [PATCH] Fix default connection not reporting success --- dev/src/command/CommandUtil.ts | 2 +- dev/src/command/NewConnectionCmd.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/dev/src/command/CommandUtil.ts b/dev/src/command/CommandUtil.ts index 84a68c3..dbca05b 100644 --- a/dev/src/command/CommandUtil.ts +++ b/dev/src/command/CommandUtil.ts @@ -48,7 +48,7 @@ export function createCommands(): vscode.Disposable[] { // - or the user's selected TreeView object (if run from the context menu) -> IE either a Project or Connection return [ vscode.commands.registerCommand(Commands.NEW_CONNECTION, () => NewConnectionCmd.newConnectionCmd()), - vscode.commands.registerCommand(Commands.NEW_DEFAULT_CONNECTION, () => NewConnectionCmd.tryAddConnection(NewConnectionCmd.DEFAULT_CONNINFO)), + vscode.commands.registerCommand(Commands.NEW_DEFAULT_CONNECTION, () => NewConnectionCmd.newConnectionCmd(NewConnectionCmd.DEFAULT_CONNINFO)), vscode.commands.registerCommand(Commands.REMOVE_CONNECTION, (selection) => removeConnectionCmd(selection)), vscode.commands.registerCommand(Commands.REFRESH_CONNECTION, (selection) => refreshConnectionCmd(selection)), diff --git a/dev/src/command/NewConnectionCmd.ts b/dev/src/command/NewConnectionCmd.ts index d878a84..a5d41cd 100644 --- a/dev/src/command/NewConnectionCmd.ts +++ b/dev/src/command/NewConnectionCmd.ts @@ -103,6 +103,8 @@ async function getConnectInfo(): Promise { } async function offerToOpenWorkspace(connection: Connection): Promise { + Log.d(`offerToOpenWorkspace ${connection.mcUri} workspace=${connection.workspacePath}`); + let inMcWorkspace = false; // See if the user has this connection's workspace open const wsFolders = vscode.workspace.workspaceFolders;