VS Code: Deep Linking Extensions - visual-studio-code

I'm working on a VS code extension and would like to create a deep link which opens a file side-by-side with an extension. Let's take the JSON editor extension as an example. Is it possible to create a link which opens a JSON file side-by-side with the editor window?
I'm aware of the following deep link pattern:
vscode://file/Users/d070350/test.process.json
Can I extend it somehow to open the JSON editor alongside the file?

Related

Is there any API in NatTable examples which shows source code upon clicking view source link?

I just wanted to know how View Source link is working which opens source code of a particular example NatTable class upon clicking. Same kind of requirement is there. So just wanted to know whether is there any built in API which fetches source code of a class.
No there is no such open source API. For the examples we simply include the sources in the examples jar file and have a mechanism that loads the .java file from the jar and opens it in a new Shell.

Visual Studio Code extension that includes offline HTML

Is it possible for a VSCode extension to include HTML that are written to disk somewhere (doesn't matter where) when the extension is installed, so that I can then open that HTML from links?
E.g. I want a link to the offline documentation for a function in its tooltip.
Yes, your extension can use the standard node apis to download the files. Then you can:
Use the standard VS Code apis to open the file as a text document
Use the markdown.showPreview command to open the file as a html preview in VS Code:
import * as vscode from 'vscode';
vscode.commands.executeCommand('markdown.showPreview', vscode.Uri.parse('file:///Users/you/path/to/file.html'));
Use node apis to open the file in the user's standard web browser (again using the file: uri)

Is it possible to write a binary file import extension for vs code?

I want to display some informations of a binary file in vs code.
Is it possible to write an extension for vs code, such that when selecting that file in the Explorer (or opening it directly) you see some text extracted from the binary file by that extension?
So the core functionality of that extension would be (simplified) a binary to text converter.
Any suggestions?
The VS Code team member has confirmed they do not have support for registering content providers for binary files in my issue.
I've inspected the workspace.onDidOpenTextDocument and window.onDidChangeActiveTextEditor APIs, but neither seems to be called when opening binary files.
Is there a way to display fallback content using registerTextDocumentContentProvider (or otherwise) for binary files?
That's why these types all carry Text in their names, TextEditor, TextDocument, etc. They can only handle textual, not binary data ;-)
No explanation as to why this works for PDFs, probably special-cased.

What is the correct way to import/require "vscode" inside the developer tools inside VS Code? [duplicate]

Is there any way to use variable vscode to get editor content just like Atom without writing Extension.
After getting editor content, I can do more things like:
Use Javascript to modify text literally
Custom format
vscode image
atom image
No. This is not supported.
You can use the extension API to extend VS Code. This API lets you get and modify editor contents

How to use variable vscode in Developer tools?

Is there any way to use variable vscode to get editor content just like Atom without writing Extension.
After getting editor content, I can do more things like:
Use Javascript to modify text literally
Custom format
vscode image
atom image
No. This is not supported.
You can use the extension API to extend VS Code. This API lets you get and modify editor contents