use specific instance of CompilerImport in FileManager

pull/1/head
yann300 6 years ago
parent 62ec1bdfc9
commit fd7ddd1446
  1. 5
      src/app/files/fileManager.js

@ -4,6 +4,7 @@ var $ = require('jquery')
var yo = require('yo-yo')
var EventManager = require('../../lib/events')
var globalRegistry = require('../../global/registry')
var CompilerImport = require('../compiler/compiler-imports')
/*
attach to files event (removed renamed)
@ -15,13 +16,13 @@ class FileManager {
this.tabbedFiles = {}
this.event = new EventManager()
this._components = {}
this._components.compilerImport = new CompilerImport()
this._components.registry = localRegistry || globalRegistry
}
init () {
var self = this
self._deps = {
compilerImport: self._components.registry.get('compilerimport').api,
editor: self._components.registry.get('editor').api,
config: self._components.registry.get('config').api,
browserExplorer: self._components.registry.get('fileproviders/browser').api,
@ -182,7 +183,7 @@ class FileManager {
if (provider !== null && this._deps.filesProviders[provider[0]]) {
return this._deps.filesProviders[provider[0]]
} else {
for (var handler of this._deps.compilerImport.handlers()) {
for (var handler of this._components.compilerImport.handlers()) {
if (handler.match.exec(file)) {
return this._deps.filesProviders[handler.type]
}

Loading…
Cancel
Save