Help - can't open source member programmatically #2990
-
|
Hi, The block of code I have to open the source member is essentially as follows - it's pretty much the example from here: https://codefori.github.io/docs/dev/examples/#get-members-and-streamfiles but with the uri creation decoupled from the openTextDocument method so I can debug the URI and log it out.. When this executes, the source member indicated does not open. The URI is logged out correctly and if I ctrl-click the URI in the output window, it then opens.. but not when the code above executes.. is there something obvious I'm doing wrong here? I can see that the source member has been copied to a temporary IFS file but it does not open in VS Code.. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
@StuBramley The naming of the const doc = await vscode.workspace.openTextDocument(uri);
await vscode.window.showTextDocument(doc); |
Beta Was this translation helpful? Give feedback.
@StuBramley The naming of the
openTextDocumentAPI can be a bit misleading. All that one does is loads the document and gives you access to it as aTextDocument. There is another API to actually show it in the editor: