Skip to content

Commit

Permalink
add command open remix-ide in external browser window
Browse files Browse the repository at this point in the history
  • Loading branch information
tintinweb committed Apr 11, 2019
1 parent 1ac19c7 commit 540e80f
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ All notable changes to the "solidity-visual-auditor" extension will be documente
![vscode-auditor-flaterra](https://user-images.githubusercontent.com/2865694/55907553-5db8d000-5bd7-11e9-8a11-8cef3964e284.gif)
- feature: command - list all function signatures (human readable or json format)
![vscode-auditor-funcsigs](https://user-images.githubusercontent.com/2865694/55907153-3f9ea000-5bd6-11e9-8a47-e69a762963e9.gif)
- feature: command - open remix in external browser


- Note: to enable graphviz dot previews install one of the following vscode extensions: [graphviz-preview](https://marketplace.visualstudio.com/items?itemName=EFanZh.graphviz-preview) or [vscode-graphviz](https://marketplace.visualstudio.com/items?itemName=joaompinto.vscode-graphviz)
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ Code fragments are highlighted to draw your attention to <span style="color:gree
* [Sūrya](https://github.com/ConsenSys/surya/) integration
* command: suggest top level contracts / find most derived contracts
* command: flatten most derived contracts
* command: list function sighashes
* command: calculate function signature hashes
* command: open Remix-IDE in external browser window
* onHover ASM instruction signatures
* onHover Security Notes for certain keywords
* onHover StateVar declaration information, including the line of declaration
Expand Down Expand Up @@ -248,7 +249,7 @@ Scroll down and take the tour.
![vscode-auditor-flaterra](https://user-images.githubusercontent.com/2865694/55907553-5db8d000-5bd7-11e9-8a11-8cef3964e284.gif)
- feature: command - list all function signatures (human readable or json format)
![vscode-auditor-funcsigs](https://user-images.githubusercontent.com/2865694/55907153-3f9ea000-5bd6-11e9-8a47-e69a762963e9.gif)

- feature: command - open remix in external browser

- Note: to enable graphviz dot previews install one of the following vscode extensions: [graphviz-preview](https://marketplace.visualstudio.com/items?itemName=EFanZh.graphviz-preview) or [vscode-graphviz](https://marketplace.visualstudio.com/items?itemName=joaompinto.vscode-graphviz)
- Note: to enable markdown previews install the following extension [markdown-preview-enhanced](https://marketplace.visualstudio.com/items?itemName=shd101wyy.markdown-preview-enhanced)
Expand Down
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,13 @@
"command": "solidity-va.tools.function.signatures.json",
"title": "Tools - list function signatures (json)",
"category": "Solidity Visual Auditor"
},
{
"command": "solidity-va.tools.remix.openExternal",
"title": "Tools - launch Remix-IDE",
"category": "Solidity Visual Auditor"
}

],
"configuration": {
"type": "object",
Expand Down
9 changes: 9 additions & 0 deletions src/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,15 @@ function onActivate(context) {
)
)

context.subscriptions.push(
vscode.commands.registerCommand(
'solidity-va.tools.remix.openExternal',
function () {
vscode.env.openExternal(vscode.Uri.parse("https://remix.ethereum.org"))
}
)
)

/** event setup */
/***** DidChange */
vscode.window.onDidChangeActiveTextEditor(editor => {
Expand Down

0 comments on commit 540e80f

Please sign in to comment.