pull/2872/head
filip mertens 2 years ago
parent 78dadd968e
commit ea37c88661
  1. 18
      apps/remix-ide/src/app/plugins/parser/code-parser.tsx

@ -87,6 +87,18 @@ export class CodeParser extends Plugin {
}
}
async handleChangeEvents() {
const completionSettings = await this.call('config', 'getAppParameter', 'auto-completion')
if (completionSettings) {
await this.antlrService.getCurrentFileAST()
}
const showGasSettings = await this.call('config', 'getAppParameter', 'show-gas')
const showErrorSettings = await this.call('config', 'getAppParameter', 'display-errors')
if(showGasSettings || showErrorSettings) {
await this.compilerService.compile()
}
}
async onActivation() {
this.gasService = new CodeParserGasService(this)
@ -102,8 +114,7 @@ export class CodeParser extends Plugin {
this.on('editor', 'didChangeFile', async (file) => {
await this.call('editor', 'discardLineTexts')
await this.antlrService.getCurrentFileAST()
await this.compilerService.compile()
await this.handleChangeEvents()
})
this.on('filePanel', 'setWorkspace', async () => {
@ -113,8 +124,7 @@ export class CodeParser extends Plugin {
this.on('fileManager', 'currentFileChanged', async () => {
await this.call('editor', 'discardLineTexts')
await this.antlrService.getCurrentFileAST()
await this.compilerService.compile()
await this.handleChangeEvents()
})
this.on('solidity', 'loadingCompiler', async (url) => {

Loading…
Cancel
Save