Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion out/extension.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion out/extension.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion out/test/suite/extension.test.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion out/test/suite/extension.test.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
"onCommand:protein-viewer.start",
"onCommand:protein-viewer.activateFromFiles",
"onCommand:protein-viewer.activateFromFolder",
"onCommand:protein-viewer.ESMFold"
"onCommand:protein-viewer.ESMFold",
"onCommand:protein-viewer.viewCurrentPDB"
],
"main": "./out/extension.js",
"contributes": {
Expand All @@ -68,6 +69,10 @@
{
"command": "protein-viewer.ESMFold",
"title": "ESMFold Sequence"
},
{
"command": "protein-viewer.viewCurrentPDB",
"title": "View structure in Protein Viewer"
}
],
"menus": {
Expand Down
10 changes: 9 additions & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,15 @@ export async function activate(context: vscode.ExtensionContext) {

});
});
context.subscriptions.push(helloCommand, activateFromFiles, activateFromFolder, ESMFold);

const viewCurrentPDB = vscode.commands.registerCommand("protein-viewer.viewCurrentPDB", () => {
const activeEditor = vscode.window.activeTextEditor?.document.uri;
if (activeEditor) {
ProteinViewerPanel.renderFromFiles(context.extensionUri, [activeEditor]);
}
});

context.subscriptions.push(helloCommand, activateFromFiles, activateFromFolder, ESMFold, viewCurrentPDB);
}

// this method is called when your extension is deactivated
Expand Down
Loading
Loading