|
|
@ -48,6 +48,7 @@ module.exports = class TestTab extends ViewPlugin { |
|
|
|
|
|
|
|
|
|
|
|
appManager.event.on('activate', (name) => { |
|
|
|
appManager.event.on('activate', (name) => { |
|
|
|
if (name === 'solidity') this.updateRunAction() |
|
|
|
if (name === 'solidity') this.updateRunAction() |
|
|
|
|
|
|
|
console.log('solidity is activated') |
|
|
|
}) |
|
|
|
}) |
|
|
|
appManager.event.on('deactivate', (name) => { |
|
|
|
appManager.event.on('deactivate', (name) => { |
|
|
|
if (name === 'solidity') this.updateRunAction() |
|
|
|
if (name === 'solidity') this.updateRunAction() |
|
|
@ -74,6 +75,14 @@ module.exports = class TestTab extends ViewPlugin { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async onActivation () { |
|
|
|
|
|
|
|
const isSolidityActive = await this.call('manager', 'isActive', 'solidity') |
|
|
|
|
|
|
|
if (!isSolidityActive) { |
|
|
|
|
|
|
|
await this.call('manager', 'activatePlugin', 'solidity') |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.updateRunAction() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
onDeactivation () { |
|
|
|
onDeactivation () { |
|
|
|
this.off('filePanel', 'newTestFileCreated') |
|
|
|
this.off('filePanel', 'newTestFileCreated') |
|
|
|
this.off('filePanel', 'setWorkspace') |
|
|
|
this.off('filePanel', 'setWorkspace') |
|
|
@ -637,7 +646,6 @@ module.exports = class TestTab extends ViewPlugin { |
|
|
|
el.setAttribute('title', 'No solidity file selected') |
|
|
|
el.setAttribute('title', 'No solidity file selected') |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
el.setAttribute('title', 'The "Solidity Plugin" should be activated') |
|
|
|
el.setAttribute('title', 'The "Solidity Plugin" should be activated') |
|
|
|
// @todo(#2747) we can activate the plugin here
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (!this.runActionElement) { |
|
|
|
if (!this.runActionElement) { |
|
|
|