diff --git a/apps/remix-ide/src/app/tabs/compile-tab.js b/apps/remix-ide/src/app/tabs/compile-tab.js index 8bb5b48575..cb0773b2b0 100644 --- a/apps/remix-ide/src/app/tabs/compile-tab.js +++ b/apps/remix-ide/src/app/tabs/compile-tab.js @@ -65,7 +65,14 @@ class CompileTab extends ViewPlugin { eventHandlers: {}, loading: false } - this.compileTabLogic = new CompileTabLogic(this.queryParams, this.fileManager, this.editor, this.config, this.fileProvider, this.contentImport) + this.compileTabLogic = new CompileTabLogic( + this.queryParams, + this.fileManager, + this.editor, + this.config, + this.fileProvider, + this.contentImport + ) } onActivationInternal () { @@ -126,9 +133,14 @@ class CompileTab extends ViewPlugin { this.emit('statusChanged', { key: 'loading', title: 'compiling...', type: 'info' }) } + this.data.eventHandlers.onRemoveAnnotations = () => { + this.call('editor', 'clearAnnotations') + } + this.on('filePanel', 'setWorkspace', () => this.resetResults()) this.compileTabLogic.event.on('startingCompilation', this.data.eventHandlers.onStartingCompilation) + this.compileTabLogic.event.on('removeAnnotations', this.data.eventHandlers.onRemoveAnnotations) this.data.eventHandlers.onCurrentFileChanged = (name) => { this.compilerContainer.currentFile = name diff --git a/apps/remix-ide/src/app/tabs/compileTab/compileTab.js b/apps/remix-ide/src/app/tabs/compileTab/compileTab.js index 33deec9dc7..b357f8a8aa 100644 --- a/apps/remix-ide/src/app/tabs/compileTab/compileTab.js +++ b/apps/remix-ide/src/app/tabs/compileTab/compileTab.js @@ -118,7 +118,7 @@ class CompileTab extends Plugin { } } this.fileManager.saveCurrentFile() - this.call('editor', 'clearAnnotations') + this.event.emit('removeAnnotations') var currentFile = this.config.get('currentFile') return this.compileFile(currentFile) } catch (err) {