       clearTimeout @functionPoll
       @pollTimeout = value
       @pollFunctions()
-
-    atom.config.observe 'flex-tool-bar.reloadToolBarNotification', (value) =>
-      @reloadToolBarNotification = value
 
   resolveConfigPath: ->
     @configFilePath = atom.config.get 'flex-tool-bar.toolBarConfigurationFilePath'

    @toolBar?.removeItems()

  deactivate: ->
    @watcherList.forEach (watcher) ->
      watcher.close()
    @watcherList = null
    @subscriptions.dispose()
    @subscriptions = null
    @removeButtons()



  registerWatch: ->
    return unless atom.config.get('flex-tool-bar.reloadToolBarWhenEditConfigFile') and @configFilePath

    @configWatcher?.close()
    @configWatcher = chokidar.watch @configFilePath
      .on 'change', =>
        @reloadToolbar(atom.config.get 'flex-tool-bar.reloadToolBarNotification')

  registerProjectWatch: ->
    return unless atom.config.get('flex-tool-bar.reloadToolBarWhenEditConfigFile') and @projectConfigFilePath

    @projectConfigWatcher?.close()
    @projectConfigWatcher = chokidar.watch @projectConfigFilePath
      .on 'change', =>
        @reloadToolbar(atom.config.get 'flex-tool-bar.reloadToolBarNotification')

  registerTypes: ->
    typeFiles = fs.listSync path.join __dirname, '../types'
