move clear annotations to compiler plugin

pull/5370/head
lianahus 4 years ago committed by Liana Husikyan
parent e3c80d5d9a
commit 35eea3fa52
  1. 14
      apps/remix-ide/src/app/tabs/compile-tab.js
  2. 2
      apps/remix-ide/src/app/tabs/compileTab/compileTab.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

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

Loading…
Cancel
Save