Commit 5c86a00a authored by Grandschtroumpf's avatar Grandschtroumpf Committed by yann300

use `events` instead of `event` for EventEmitter

parent 43c260d2
......@@ -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)
}
}
......
'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) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment