From 82a0441fe3cf929c0a4d3a161bdd8a42d1bdb06d Mon Sep 17 00:00:00 2001 From: lianahus Date: Tue, 28 Sep 2021 13:30:57 +0200 Subject: [PATCH] activate solidity if not active for SUT SSA --- apps/remix-ide/src/app/tabs/analysis-tab.js | 4 ++++ apps/remix-ide/src/app/tabs/test-tab.js | 11 +++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/apps/remix-ide/src/app/tabs/analysis-tab.js b/apps/remix-ide/src/app/tabs/analysis-tab.js index e9efe9f302..085960351b 100644 --- a/apps/remix-ide/src/app/tabs/analysis-tab.js +++ b/apps/remix-ide/src/app/tabs/analysis-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() } diff --git a/apps/remix-ide/src/app/tabs/test-tab.js b/apps/remix-ide/src/app/tabs/test-tab.js index 277abab11d..992b722ac3 100644 --- a/apps/remix-ide/src/app/tabs/test-tab.js +++ b/apps/remix-ide/src/app/tabs/test-tab.js @@ -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`