Add grammar registry as an injected dependency of Project

This commit is contained in:
Max Brunsfeld
2017-11-02 12:24:11 -07:00
parent 1a7ea3322e
commit 0d6c746572
5 changed files with 75 additions and 14 deletions

View File

@@ -167,7 +167,10 @@ class AtomEnvironment extends Model
@packages.setContextMenuManager(@contextMenu)
@packages.setThemeManager(@themes)
@project = new Project({notificationManager: @notifications, packageManager: @packages, @config, @applicationDelegate})
@project = new Project({
notificationManager: @notifications, packageManager: @packages, grammarRegistry: @grammars
@config, @applicationDelegate
})
@commandInstaller = new CommandInstaller(@applicationDelegate)
@protocolHandlerInstaller = new ProtocolHandlerInstaller()

View File

@@ -19,10 +19,11 @@ class Project extends Model {
Section: Construction and Destruction
*/
constructor ({notificationManager, packageManager, config, applicationDelegate}) {
constructor ({notificationManager, packageManager, config, applicationDelegate, grammarRegistry}) {
super()
this.notificationManager = notificationManager
this.applicationDelegate = applicationDelegate
this.grammarRegistry = grammarRegistry
this.emitter = new Emitter()
this.buffers = []
this.rootDirectories = []