diff --git a/.vscodeignore b/.vscodeignore new file mode 100644 index 0000000..df96e54 --- /dev/null +++ b/.vscodeignore @@ -0,0 +1,5 @@ +.gitignore +.gradle/** +build/** +*.gradle + diff --git a/src/commands/generators.ts b/src/commands/generators.ts index d5ad764..8e4c60a 100644 --- a/src/commands/generators.ts +++ b/src/commands/generators.ts @@ -69,9 +69,9 @@ export function generateContextMap(): CommandType { await generateFunction(); // preview png if it was generated - var inputFileName = currentDocument.uri.toString().substring(currentDocument.uri.toString().lastIndexOf(path.sep) + 1, currentDocument.uri.toString().length - 4); + var inputFileName = currentDocument.uri.toString().substring(currentDocument.uri.toString().lastIndexOf("/") + 1, currentDocument.uri.toString().length - 4); var pngUri = Uri.file(workspace.rootPath + "/src-gen/" + inputFileName + "_ContextMap.png"); - if (fs.existsSync(pngUri.toString().replace("file://", ""))) + if (fs.existsSync(pngUri.fsPath)) await commands.executeCommand('vscode.open', pngUri, { viewColumn: ViewColumn.Two }); } };