     @projectConfigWatcher?.close()
     @projectConfigWatcher = null
 
-  registerProjectWatch: ->
-    return unless atom.config.get('flex-tool-bar.reloadToolBarWhenEditConfigFile') and @projectConfigFilePath
+  registerProjectWatch: (shouldWatch = atom.config.get('flex-tool-bar.reloadToolBarWhenEditConfigFile')) ->
+    return unless shouldWatch and @projectConfigFilePath
 
     @projectConfigWatcher?.close()
     @projectConfigWatcher = chokidar.watch @projectConfigFilePath

      @unregisterWatch()
      @unregisterProjectWatch()
      if newValue
        @registerWatch()
        @registerProjectWatch()

    @subscriptions.add atom.config.onDidChange 'flex-tool-bar.toolBarConfigurationFilePath', ({newValue}) =>
      @unregisterWatch()
      @resolveConfigPath(newValue, false)
      @registerWatch()
      @reloadToolbar()

    @subscriptions.add atom.config.onDidChange 'flex-tool-bar.toolBarProjectConfigurationFilePath', ({newValue}) =>
      @unregisterProjectWatch()
      @resolveProjectConfigPath(newValue)
      @registerProjectWatch()
      @reloadToolbar()

  resolveConfigPath: (configFilePath = atom.config.get('flex-tool-bar.toolBarConfigurationFilePath'), createIfNotFound = true) ->

  observeConfig: ->
    @subscriptions.add atom.config.onDidChange 'flex-tool-bar.persistentProjectToolBar', ({newValue}) =>
      @unregisterProjectWatch()
      if @resolveProjectConfigPath(undefined, newValue)
        @registerProjectWatch()
      @reloadToolbar()

    @subscriptions.add atom.config.onDidChange 'flex-tool-bar.pollFunctionConditionsToReloadWhenChanged', ({oldValue, newValue}) =>
