Unverified Commit fd3686b8 authored by yann300's avatar yann300 Committed by GitHub

Add solidity compile custom action (#1356)

It doesn't necessarily need to be merged now. I've put some comment regarding the QA document regarding that. Co-authored-by: 's avatarbunsenstraat <bunsenstraat@gmail.com>
parent b0ac2324
...@@ -33,7 +33,7 @@ const profile = { ...@@ -33,7 +33,7 @@ const profile = {
location: 'sidePanel', location: 'sidePanel',
documentation: 'https://remix-ide.readthedocs.io/en/latest/solidity_editor.html', documentation: 'https://remix-ide.readthedocs.io/en/latest/solidity_editor.html',
version: packageJson.version, version: packageJson.version,
methods: ['getCompilationResult', 'compile', 'compileWithParameters', 'setCompilerConfig'] methods: ['getCompilationResult', 'compile', 'compileWithParameters', 'setCompilerConfig', 'compileFile']
} }
...@@ -508,6 +508,21 @@ class CompileTab extends ViewPlugin { ...@@ -508,6 +508,21 @@ class CompileTab extends ViewPlugin {
onActivation () { onActivation () {
this.call('manager', 'activatePlugin', 'solidity-logic') this.call('manager', 'activatePlugin', 'solidity-logic')
this.listenToEvents() this.listenToEvents()
this.call('filePanel', 'registerContextMenuItem', {
id: 'solidity',
name: 'compileFile',
label: 'Compile',
type: [],
extension: ['.sol'],
path: [],
pattern: []
})
}
compileFile (event) {
if (event.path.length > 0) {
this.compileTabLogic.compileFile(event.path[0])
}
} }
onDeactivation () { onDeactivation () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment