🔥 Remove uninstallAutocompletePlus and migrateSublimeTabsSettings

This commit is contained in:
Thomas Johansen
2015-09-05 15:22:54 +02:00
committed by Nathan Sobo
parent 38b8332c0b
commit b5c4f0c2ad
3 changed files with 0 additions and 101 deletions

View File

@@ -327,14 +327,7 @@ class PackageManager
# of the first package isn't skewed by being the first to require atom
require '../exports/atom'
# TODO: remove after a few atom versions.
@uninstallAutocompletePlus()
packagePaths = @getAvailablePackagePaths()
# TODO: remove after a few atom versions.
@migrateSublimeTabsSettings(packagePaths)
packagePaths = packagePaths.filter (packagePath) => not @isPackageDisabled(path.basename(packagePath))
packagePaths = _.uniq packagePaths, (packagePath) -> path.basename(packagePath)
@loadPackage(packagePath) for packagePath in packagePaths
@@ -455,35 +448,6 @@ class PackageManager
message = "Failed to load the #{path.basename(packagePath)} package"
atom.notifications.addError(message, {stack, detail, dismissable: true})
# TODO: remove these autocomplete-plus specific helpers after a few versions.
uninstallAutocompletePlus: ->
packageDir = null
devDir = path.join("dev", "packages")
for packageDirPath in @packageDirPaths
if not packageDirPath.endsWith(devDir)
packageDir = packageDirPath
break
if packageDir?
dirsToRemove = [
path.join(packageDir, 'autocomplete-plus')
path.join(packageDir, 'autocomplete-atom-api')
path.join(packageDir, 'autocomplete-css')
path.join(packageDir, 'autocomplete-html')
path.join(packageDir, 'autocomplete-snippets')
]
for dirToRemove in dirsToRemove
@uninstallDirectory(dirToRemove)
return
# TODO: remove this after a few versions
migrateSublimeTabsSettings: (packagePaths) ->
return if Grim.includeDeprecatedAPIs
for packagePath in packagePaths when path.basename(packagePath) is 'sublime-tabs'
atom.config.removeAtKeyPath('core.disabledPackages', 'tree-view')
atom.config.removeAtKeyPath('core.disabledPackages', 'tabs')
return
uninstallDirectory: (directory) ->
symlinkPromise = new Promise (resolve) ->
fs.isSymbolicLink directory, (isSymLink) -> resolve(isSymLink)