Commit 82a0441f authored by lianahus's avatar lianahus

activate solidity if not active for SUT SSA

parent 00c12168
......@@ -40,6 +40,10 @@ class AnalysisTab extends ViewPlugin {
}
onActivation () {
const isSolidityActive = await this.call('manager', 'isActive', 'solidity')
if (!isSolidityActive) {
await this.call('manager', 'activatePlugin', 'solidity')
}
this.renderComponent()
}
......
......@@ -74,6 +74,13 @@ module.exports = class TestTab extends ViewPlugin {
}
}
async activate () {
const isSolidityActive = await this.call('manager', 'isActive', 'solidity')
If (!isSolidityActive) {
await this.call('manager', 'activatePlugin', 'solidity')
}
}
onDeactivation () {
this.off('filePanel', 'newTestFileCreated')
this.off('filePanel', 'setWorkspace')
......@@ -618,7 +625,7 @@ module.exports = class TestTab extends ViewPlugin {
return this.generateFileActionElement
}
updateRunAction (currentFile) {
async updateRunAction (currentFile) {
const el = yo`
<button id="runTestsTabRunAction" title="Run tests" data-id="testTabRunTestsTabRunAction" class="w-50 btn btn-primary" onclick="${() => this.runTests()}">
<span class="fas fa-play ml-2"></span>
......@@ -632,7 +639,7 @@ module.exports = class TestTab extends ViewPlugin {
el.setAttribute('title', 'No solidity file selected')
} else {
el.setAttribute('title', 'The "Solidity Plugin" should be activated')
// @todo(#2747) we can activate the plugin here
await this.call('manager', 'activatePlugin', 'solidity')
}
}
if (!this.runActionElement) {
......
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