   currentGrammar: null
   currentProject: null
   buttonTypes: []
-  watchList: []
+  configWatcher: null
+  projectConfigwatcher: null
   functionConditions: []
   functionPoll: null
   pollTimeout: 0
-  reloadToolBarNotification: false
 
   config:
     persistentProjectToolBar:

      default: 300

  activate: ->
    require('atom-package-deps').install('flex-tool-bar')

    return unless @resolveConfigPath()

    @subscriptions = new CompositeDisposable
    @watcherList = []

    @resolveProjectConfigPath()
    @storeProject()


  loadConfig: ->
    ext = path.extname @configFilePath
    @removeCache(@configFilePath)

    switch ext
      when '.js', '.json', '.coffee'
        config = require @configFilePath

      when '.json5'
        require 'json5/lib/require'
        config = require @configFilePath

      when '.cson'
        CSON = require 'cson'
        config = CSON.requireCSONFile @configFilePath

    if @projectConfigFilePath
      ext = path.extname @projectConfigFilePath
      @removeCache(@projectConfigFilePath)

      switch ext
        when '.js', '.json', '.coffee'
          projConfig = require @projectConfigFilePath

        when '.json5'
          require 'json5/lib/require'
          projConfig = require @projectConfigFilePath

        when '.cson'
          CSON = require 'cson'
          projConfig = CSON.requireCSONFile @projectConfigFilePath

      for i of projConfig
        config.push projConfig[i]
