activate solidity if not active for SUT SSA

pull/1634/head
lianahus 3 years ago
parent 00c12168bc
commit 82a0441fe3
  1. 4
      apps/remix-ide/src/app/tabs/analysis-tab.js
  2. 11
      apps/remix-ide/src/app/tabs/test-tab.js

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

Loading…
Cancel
Save