anchor.diff:    // Parts of init():
     //
   
  -  void initPreferences() {
  +  Future initPreferences() {
       prefs = new preferences.SparkPreferences(localPrefs);
   
  -    LocalStateManager.create().then((StateManager state) {
  +    return LocalStateManager.create().then((StateManager state) {
         dependencies[StateManager] = state;
       });
     }
  
positive.code:   }
  
    Future restoreWorkspace() {
      return workspace.restore().then((value) {
        if (workspace.getFiles().length == 0) {
          // No files, just focus the editor.
          aceManager.focus();
        }
      });
    }
  
    Future restoreLocationManager() {
      return filesystem.restoreManager(localPrefs);
    }
  
    //
  
negative.code:     dependencies[Notifier] = this;
      dependencies[preferences.PreferenceStore] = localPrefs;
  
  
      initEventBus();
  
      return initPreferences().then((_) {
        return restoreWorkspace().then((_) {
          return restoreLocationManager().then((_) {
            // Besides direct dependencies of the below modules on [Workspace] and
            // [LocationManager], [restoreLocationManager] may also read
            // updated [SparkFlags] from `<project location>/.spark.json`.
  
            initAnalytics();
  
            initPackageManagers();
            initServices();
            initScmManager();
            initAceManager();
  
            initAndroidRSA();
  
            if (SparkFlags.gitSalt) {
              initGitSalt();
            }
  
            initEditorManager();
            initNavigationManager();
  
            createActions();
  
            initFilesController();
  
            initLaunchManager();
            initBuilders();
  
            initEditorArea();
            initToolbar();
            buildMenu();
            initSplitView();
            initSaveStatusListener();
  
            initSearchController();
  
            window.onFocus.listen((Event e) {
              // On unfocusing/refocusing CDE, refresh the workspace to account
              // for possible external changes.
              _refreshOpenFiles();
            });
          });
        });
      });
    }
  