     git.setProjectIndex @lifeCycle.indexOfProject()
     return git.unpushedCommits()
 
+  statusCheck: () ->
+    console.log "statusCheck ->"
+    q.all [@checkUncommittedChanges(), @checkUnpublishedChanges()]
+      .then (results) =>
+        console.log results
+        if results[0]
+          @lifeCycle.statusStarted()
+        else if results[1].length > 0
+          @lifeCycle.statusSaved()
+        @lifeCycle.setupToolbar @toolBar
+
+  startStatusCheck: () ->
+    @statusCheckInterval= window.setInterval () =>
+      @statusCheck()
+    , STATUS_CHECK_INTERVAL if @statusCheckInterval < 0
+
+  stopStatusCheck: () ->
+    window.clearInterval @statusCheckInterval
+    @statusCheckInterval = -1
+
   doSaveOrPublish: (action) ->
     promise = null
     if action == "save"

LifeCycle = require './util/lifecycle'
Configuration = require './util/configuration'
git = require './util/git'

module.exports = AdvancedWebEditor =
  configurationView: null

      .then (branch) =>
        @lifeCycle.statusStarted()
        @lifeCycle.setupToolbar(@toolBar)
        @startStatusCheck()
        atom.notifications.addInfo("Created branch #{branch}")
      .fail (e) -> atom.notifications.addError "Error occurred",
        description: e.message + "\n" + e.stdout
