mirror of
https://github.com/atom/atom.git
synced 2026-02-17 10:01:25 -05:00
Assign config schema on Atom environment construction
This commit is contained in:
@@ -160,6 +160,7 @@ class Atom extends Model
|
||||
|
||||
Config = require './config'
|
||||
@config = new Config({configDirPath, resourcePath, notificationManager: @notifications})
|
||||
@setConfigSchema()
|
||||
|
||||
KeymapManager = require './keymap-extensions'
|
||||
@keymaps = new KeymapManager({configDirPath, resourcePath, notificationManager: @notifications})
|
||||
@@ -204,6 +205,9 @@ class Atom extends Model
|
||||
registerDefaultCommands = require './register-default-commands'
|
||||
registerDefaultCommands(@commands)
|
||||
|
||||
setConfigSchema: ->
|
||||
@config.setSchema null, {type: 'object', properties: _.clone(require('./config-schema'))}
|
||||
|
||||
registerDeserializersAndViewProviders: ->
|
||||
Workspace = require './workspace'
|
||||
PaneContainer = require './pane-container'
|
||||
@@ -240,6 +244,7 @@ class Atom extends Model
|
||||
|
||||
reset: ->
|
||||
@config.reset()
|
||||
@setConfigSchema()
|
||||
|
||||
# Sets up the basic services that should be available in all modes
|
||||
# (both spec and application).
|
||||
@@ -566,7 +571,8 @@ class Atom extends Model
|
||||
commandInstaller.installApmCommand false, (error) ->
|
||||
console.warn error.message if error?
|
||||
|
||||
@loadConfig()
|
||||
@config.load()
|
||||
|
||||
@themes.loadBaseStylesheets()
|
||||
|
||||
@setBodyPlatformClass()
|
||||
@@ -747,10 +753,6 @@ class Atom extends Model
|
||||
@deserializeProject()
|
||||
@deserializeWorkspace()
|
||||
|
||||
loadConfig: ->
|
||||
@config.setSchema null, {type: 'object', properties: _.clone(require('./config-schema'))}
|
||||
@config.load()
|
||||
|
||||
loadThemes: ->
|
||||
@themes.load()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user