mirror of
https://github.com/atom/atom.git
synced 2026-01-22 13:28:01 -05:00
ScopeDescriptor::create -> fromObject
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
# for more information.
|
||||
module.exports =
|
||||
class ScopeDescriptor
|
||||
@create: (descriptor) ->
|
||||
@fromObject: (descriptor) ->
|
||||
if descriptor instanceof ScopeDescriptor
|
||||
descriptor
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user