use `events` instead of `event` for EventEmitter

pull/1/head
Grandschtroumpf 6 years ago committed by yann300
parent 43c260d235
commit 5c86a00ad8
  1. 4
      src/app/components/plugin-manager-proxy.js
  2. 6
      src/app/files/fileManager.js
  3. 4
      src/app/tabs/compile-tab.js

@ -16,12 +16,12 @@ class PluginManagerProxy {
registry.get('compilersartefacts').api['__last'] = new CompilerAbstract(languageVersion, data, source)
event.trigger('sendCompilationResult', [file, source, languageVersion, data])
}
instance.event.on('compilationFinished', this._listener)
instance.events.on('compilationFinished', this._listener)
}
unregister (instance) {
if (!this._listener) {
instance.event.on('compilationFinished', this._listener)
instance.events.on('compilationFinished', this._listener)
}
}

@ -1,6 +1,6 @@
'use strict'
var EventEmitter = require('events')
const EventEmitter = require('events')
var EventManager = require('../../lib/events')
var globalRegistry = require('../../global/registry')
var CompilerImport = require('../compiler/compiler-imports')
@ -14,7 +14,7 @@ class FileManager {
constructor (localRegistry) {
this.openedFiles = {} // list all opened files
this.event = new EventManager()
this.nodeEvent = new EventEmitter()
this.events = new EventEmitter()
this._components = {}
this._components.compilerImport = new CompilerImport()
this._components.registry = localRegistry || globalRegistry
@ -44,7 +44,7 @@ class FileManager {
self._deps.localhostExplorer.event.register('closed', (event) => { this.removeTabsOf(self._deps.localhostExplorer) })
self.event.register('currentFileChanged', (file, provider) => {
this.nodeEvent.emit('currentFileChanged', file)
this.events.emit('currentFileChanged', file)
})
}

@ -20,7 +20,7 @@ const CompilerContainer = require('./compileTab/compilerContainer.js')
class CompileTab {
constructor (registry) {
this.event = new EventEmitter()
this.events = new EventEmitter()
this._view = {
el: null,
warnCompilationSlow: null,
@ -81,7 +81,7 @@ class CompileTab {
this.compiler.event.register('compilationFinished', (success, data, source) => {
if (success) {
// forwarding the event to the appManager infra
this.event.emit('compilationFinished', source.target, source, this.data.selectedVersion, data)
this.events.emit('compilationFinished', source.target, source, this.data.selectedVersion, data)
// Store the contracts
this.data.contractsDetails = {}
this.compiler.visitContracts((contract) => {

Loading…
Cancel
Save