|
|
@ -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 () { |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
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) |
|
|
|