Skip to content

Commit d20cbad

Browse files
Merge pull request #268 from gjsjohnmurray/fix-256
fix #256 reload file explorer after connection
2 parents 0915638 + 05e7233 commit d20cbad

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@
556556
"properties": {
557557
"active": {
558558
"type": "boolean",
559-
"description": "This connection is active.",
559+
"description": "Whether the connection is active.",
560560
"default": false
561561
},
562562
"server": {

src/extension.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ export function checkConnection(clearCookies = false, uri?: vscode.Uri): void {
196196
outputChannel.appendLine(
197197
`Something is wrong with your docker-compose connection settings, or your service is not running.`
198198
);
199+
outputChannel.show(true);
199200
panel.text = `${packageJson.displayName} - ERROR`;
200201
return;
201202
}
@@ -222,6 +223,7 @@ export function checkConnection(clearCookies = false, uri?: vscode.Uri): void {
222223
if (!api.config.host || !api.config.port || !api.config.ns) {
223224
const message = "host, port and ns must be specified.";
224225
outputChannel.appendLine(message);
226+
outputChannel.show(true);
225227
panel.text = `${packageJson.displayName} - ERROR`;
226228
panel.tooltip = message;
227229
return;
@@ -281,9 +283,11 @@ export function checkConnection(clearCookies = false, uri?: vscode.Uri): void {
281283
outputChannel.appendLine(
282284
`Authorization error: Check your credentials in Settings, and that you have sufficient privileges on the /api/atelier web application on ${connInfo}`
283285
);
286+
outputChannel.show(true);
284287
} else {
285-
outputChannel.appendLine(`Error: ${message}`);
288+
outputChannel.appendLine(message);
286289
outputChannel.appendLine(`Check your server details in Settings (${connInfo}).`);
290+
outputChannel.show(true);
287291
}
288292
console.error(error);
289293
panel.text = `${connInfo} - ERROR`;
@@ -292,6 +296,9 @@ export function checkConnection(clearCookies = false, uri?: vscode.Uri): void {
292296
})
293297
.finally(() => {
294298
explorerProvider.refresh();
299+
if (schemes.includes(uri.scheme)) {
300+
vscode.commands.executeCommand("workbench.files.action.refreshFilesExplorer");
301+
}
295302
});
296303
}
297304

0 commit comments

Comments
 (0)