       'flex-tool-bar:edit-config-file': =>
         atom.workspace.open @configFilePath if @configFilePath
 
-  registerEvent: ->
+  registerEvents: ->
+    @subscriptions.add atom.packages.onDidActivateInitialPackages  =>
+      @reloadToolbar()
+
+      @subscriptions.add atom.packages.onDidActivatePackage =>
+        @reloadToolbar()
+
+      @subscriptions.add atom.packages.onDidDeactivatePackage =>
+        @reloadToolbar()
+
     @subscriptions.add atom.workspace.onDidChangeActivePaneItem (item) =>
 
       if @storeProject()

    @toolBar.toolBarView || @toolBar.toolBar

  reloadToolbar: (withNotification=false) ->
    return unless @toolBar?
    try
      @fixToolBarHeight()

    @storeGrammar()
    @registerTypes()
    @registerCommand()
    @registerEvents()
    @registerWatch()
    @registerProjectWatch()

