ScopeDescriptor::create -> fromObject

This commit is contained in:
Ben Ogle
2014-10-20 17:59:28 -07:00
parent 08f35531ba
commit 3a70b98ae1
2 changed files with 3 additions and 3 deletions

View File

@@ -878,7 +878,7 @@ class Config
@emitter.emit 'did-change'
getRawScopedValue: (scopeDescriptor, keyPath) ->
scopeDescriptor = ScopeDescriptor.create(scopeDescriptor)
scopeDescriptor = ScopeDescriptor.fromObject(scopeDescriptor)
@scopedSettingsStore.getPropertyValue(scopeDescriptor.getScopeChain(), keyPath)
observeScopedKeyPath: (scopeDescriptor, keyPath, callback) ->
@@ -906,7 +906,7 @@ class Config
# * language mode uses it for one thing.
# * autocomplete uses it for editor.completions
settingsForScopeDescriptor: (scopeDescriptor, keyPath) ->
scopeDescriptor = ScopeDescriptor.create(scopeDescriptor)
scopeDescriptor = ScopeDescriptor.fromObject(scopeDescriptor)
@scopedSettingsStore.getProperties(scopeDescriptor.getScopeChain(), keyPath)
# Base schema enforcers. These will coerce raw input into the specified type,

View File

@@ -16,7 +16,7 @@
# for more information.
module.exports =
class ScopeDescriptor
@create: (descriptor) ->
@fromObject: (descriptor) ->
if descriptor instanceof ScopeDescriptor
descriptor
else