mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
ScopeChainForScopeDescriptor
This commit is contained in:
@@ -847,11 +847,7 @@ class Config
|
||||
@emitter.emit 'did-change'
|
||||
|
||||
getRawScopedValue: (scopeDescriptor, keyPath) ->
|
||||
scopeChain = scopeDescriptor
|
||||
.map (scope) ->
|
||||
scope = ".#{scope}" unless scope[0] is '.'
|
||||
scope
|
||||
.join(' ')
|
||||
scopeChain = @scopeChainForScopeDescriptor(scopeDescriptor)
|
||||
@scopedSettingsStore.getPropertyValue(scopeChain, keyPath)
|
||||
|
||||
observeScopedKeyPath: (scopeDescriptor, keyPath, callback) ->
|
||||
@@ -886,6 +882,13 @@ class Config
|
||||
.join(' ')
|
||||
@scopedSettingsStore.getProperties(scopeChain, keyPath)
|
||||
|
||||
scopeChainForScopeDescriptor: (scopeDescriptor) ->
|
||||
scopeDescriptor
|
||||
.map (scope) ->
|
||||
scope = ".#{scope}" unless scope[0] is '.'
|
||||
scope
|
||||
.join(' ')
|
||||
|
||||
# Base schema enforcers. These will coerce raw input into the specified type,
|
||||
# and will throw an error when the value cannot be coerced. Throwing the error
|
||||
# will indicate that the value should not be set.
|
||||
|
||||
Reference in New Issue
Block a user