mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
🔥 Remove deprecations from GrammarRegistry
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
_ = require 'underscore-plus'
|
||||
{Emitter} = require 'event-kit'
|
||||
{includeDeprecatedAPIs, deprecate} = require 'grim'
|
||||
FirstMate = require 'first-mate'
|
||||
Token = require './token'
|
||||
fs = require 'fs-plus'
|
||||
@@ -138,35 +137,3 @@ class GrammarRegistry extends FirstMate.GrammarRegistry
|
||||
clearObservers: ->
|
||||
@off() if includeDeprecatedAPIs
|
||||
@emitter = new Emitter
|
||||
|
||||
if includeDeprecatedAPIs
|
||||
PropertyAccessors = require 'property-accessors'
|
||||
PropertyAccessors.includeInto(GrammarRegistry)
|
||||
|
||||
{Subscriber} = require 'emissary'
|
||||
Subscriber.includeInto(GrammarRegistry)
|
||||
|
||||
# Support old serialization
|
||||
atom.deserializers.add(name: 'Syntax', deserialize: GrammarRegistry.deserialize)
|
||||
|
||||
# Deprecated: Used by settings-view to display snippets for packages
|
||||
GrammarRegistry::accessor 'propertyStore', ->
|
||||
deprecate("Do not use this. Use a public method on Config")
|
||||
atom.config.scopedSettingsStore
|
||||
|
||||
GrammarRegistry::addProperties = (args...) ->
|
||||
args.unshift(null) if args.length is 2
|
||||
deprecate 'Consider using atom.config.set() instead. A direct (but private) replacement is available at atom.config.addScopedSettings().'
|
||||
atom.config.addScopedSettings(args...)
|
||||
|
||||
GrammarRegistry::removeProperties = (name) ->
|
||||
deprecate 'atom.config.addScopedSettings() now returns a disposable you can call .dispose() on'
|
||||
atom.config.scopedSettingsStore.removeProperties(name)
|
||||
|
||||
GrammarRegistry::getProperty = (scope, keyPath) ->
|
||||
deprecate 'A direct (but private) replacement is available at atom.config.getRawScopedValue().'
|
||||
atom.config.getRawScopedValue(scope, keyPath)
|
||||
|
||||
GrammarRegistry::propertiesForScope = (scope, keyPath) ->
|
||||
deprecate 'Use atom.config.getAll instead.'
|
||||
atom.config.settingsForScopeDescriptor(scope, keyPath)
|
||||
|
||||
Reference in New Issue
Block a user