Commit c77be8e6 authored by yann300's avatar yann300

only compile sol file

parent 15aec1f3
...@@ -693,22 +693,26 @@ function run () { ...@@ -693,22 +693,26 @@ function run () {
if (transactionDebugger.isActive) return if (transactionDebugger.isActive) return
fileManager.saveCurrentFile() fileManager.saveCurrentFile()
editor.clearAnnotations()
var currentFile = config.get('currentFile') var currentFile = config.get('currentFile')
if (currentFile) { if (currentFile) {
var target = currentFile if (/.(.sol)$/.exec(currentFile)) {
var sources = {} // only compile *.sol file.
var provider = fileManager.fileProviderOf(currentFile) var target = currentFile
if (provider) { var sources = {}
provider.get(target, (error, content) => { var provider = fileManager.fileProviderOf(currentFile)
if (error) { if (provider) {
console.log(error) provider.get(target, (error, content) => {
} else { if (error) {
sources[target] = { content } console.log(error)
compiler.compile(sources, target) } else {
} sources[target] = { content }
}) compiler.compile(sources, target)
} else { }
console.log('cannot compile ' + currentFile + '. Does not belong to any explorer') })
} else {
console.log('cannot compile ' + currentFile + '. Does not belong to any explorer')
}
} }
} }
} }
...@@ -764,10 +768,6 @@ function run () { ...@@ -764,10 +768,6 @@ function run () {
} }
}) })
compiler.event.register('compilationStarted', this, function () {
editor.clearAnnotations()
})
function startdebugging (txHash) { function startdebugging (txHash) {
self.event.trigger('debuggingRequested', []) self.event.trigger('debuggingRequested', [])
transactionDebugger.debug(txHash) transactionDebugger.debug(txHash)
......
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