Skip to content

Commit

Permalink
fix #80 before adding isfs folder, check vscode-objectscript extensio…
Browse files Browse the repository at this point in the history
…n is available
  • Loading branch information
gjsjohnmurray committed Apr 21, 2021
1 parent a667dd6 commit aa36bb5
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,22 @@ export function activate(context: vscode.ExtensionContext) {
const namespace = pathParts[3];
const serverSpec = await getServerSpec(serverName, undefined, undefined, true);
if (serverSpec) {
const ISFS_ID = 'intersystems-community.vscode-objectscript';
const isfsExtension = vscode.extensions.getExtension(ISFS_ID);
if (isfsExtension) {
if (!isfsExtension.isActive) {
await isfsExtension.activate();
if (!isfsExtension.isActive) {
vscode.window.showErrorMessage(`${ISFS_ID} could not be activated.`, "Close")
return;
}
}
}
else {
vscode.window.showErrorMessage(`${ISFS_ID} is not installed.`, "Close")
return;
}

const uri = vscode.Uri.parse(`isfs${readonly ? "-readonly" : ""}://${serverName}:${namespace}/${serverSpec.webServer.pathPrefix || ''}`);
const label = `${serverName}:${namespace}${readonly ? " (read-only)" : ""}`;
const added = vscode.workspace.updateWorkspaceFolders(
Expand Down

0 comments on commit aa36bb5

Please sign in to comment.