@@ -3,8 +3,6 @@ let settingsView = null
33
44let statusView = null
55
6- const { CompositeDisposable} = require ( 'atom' )
7-
86const PackageManager = require ( './package-manager' )
97let packageManager = null
108
@@ -44,9 +42,7 @@ module.exports = {
4442 } ,
4543
4644 activate ( ) {
47- this . disposables = new CompositeDisposable ( )
48-
49- this . disposables . add ( atom . workspace . addOpener ( uri => {
45+ atom . workspace . addOpener ( uri => {
5046 if ( uri . startsWith ( CONFIG_URI ) ) {
5147 if ( settingsView == null || settingsView . destroyed ) {
5248 settingsView = this . createSettingsView ( { uri} )
@@ -60,9 +56,9 @@ module.exports = {
6056 }
6157 return settingsView
6258 }
63- } ) )
59+ } )
6460
65- this . disposables . add ( atom . commands . add ( 'atom-workspace' , {
61+ atom . commands . add ( 'atom-workspace' , {
6662 'settings-view:open' ( ) { atom . workspace . open ( CONFIG_URI ) } ,
6763 'settings-view:core' ( ) { atom . workspace . open ( `${ CONFIG_URI } /core` ) } ,
6864 'settings-view:editor' ( ) { atom . workspace . open ( `${ CONFIG_URI } /editor` ) } ,
@@ -74,10 +70,10 @@ module.exports = {
7470 'settings-view:view-installed-packages' ( ) { atom . workspace . open ( `${ CONFIG_URI } /packages` ) } ,
7571 'settings-view:uninstall-packages' ( ) { atom . workspace . open ( `${ CONFIG_URI } /packages` ) } ,
7672 'settings-view:check-for-package-updates' ( ) { atom . workspace . open ( `${ CONFIG_URI } /updates` ) }
77- } ) )
73+ } )
7874
7975 if ( process . platform === 'win32' && require ( 'atom' ) . WinShell != null ) {
80- this . disposables . add ( atom . commands . add ( 'atom-workspace' , { 'settings-view:system' ( ) { atom . workspace . open ( `${ CONFIG_URI } /system` ) } } ) )
76+ atom . commands . add ( 'atom-workspace' , { 'settings-view:system' ( ) { atom . workspace . open ( `${ CONFIG_URI } /system` ) } } )
8177 }
8278
8379 if ( ! localStorage . getItem ( 'hasSeenDeprecatedNotification' ) ) {
@@ -89,11 +85,8 @@ module.exports = {
8985 } ,
9086
9187 deactivate ( ) {
92- if ( this . disposables ) this . disposables . dispose ( )
9388 if ( settingsView ) settingsView . destroy ( )
94- if ( packageManager ) packageManager . destroy ( )
9589 if ( statusView ) statusView . destroy ( )
96- this . disposables = null
9790 settingsView = null
9891 packageManager = null
9992 statusView = null
0 commit comments