anchor.diff:      dependencies[Notifier] = this;
       dependencies[preferences.PreferenceStore] = localPrefs;
   
  -    initPreferences();
  +
       initEventBus();
   
  -    initAnalytics();
  -
  -    initWorkspace();
  -    initPackageManagers();
  -    initServices();
  -    initScmManager();
  -    initAceManager();
  -    initEditorManager();
  -    initEditorArea();
  -    initNavigationManager();
  -    initAndroidRSA();
  -
  -    if (SparkFlags.gitSalt) {
  -      initGitSalt();
  -    }
  -
  -    createActions();
  -
  -    initFilesController();
  -
  -    initToolbar();
  -    buildMenu();
  -    initSplitView();
  -    initSaveStatusListener();
  -
  -    initLaunchManager();
  -
  -    window.onFocus.listen((Event e) {
  -      // When the user switch to an other application, he might change the
  -      // content of the workspace from other applications. For that reason, when
  -      // the user switch back to Spark, we want to check whether the content of
  -      // the workspace changed.
  -      _refreshOpenFiles();
  -    });
  -
  -    // Add various builders.
  -    addBuilder(new DartBuilder(this.services));
  -    if (SparkFlags.performJavaScriptAnalysis) {
  -      addBuilder(new JavaScriptBuilder());
  -    }
  -    addBuilder(new JsonBuilder());
  -    addBuilder(new AppManifestBuilder());
  -
  -    return restoreWorkspace().then((_) {
  -      return restoreLocationManager().then((_) {
  -        // Location manager might have overridden the Ace-related flags from
  -        // "<project location>/.spark.json".
  -        initAceManagers();
  -        initSearchController();
  +    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();
  +          });
  +        });
         });
       });
     }
  
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:         _textFileExtensions.addAll(JSON.decode(value));
        }
      });
  
      if (workspace.getFiles().length == 0) {
        // No files, just focus the editor.
        aceManager.focus();
      }
  
      _aceThemeManager = new ThemeManager(
          _aceManager, prefs, getUIElement('#changeTheme .settings-value'));
      _aceKeysManager = new KeyBindingManager(
          _aceManager, prefs, getUIElement('#changeKeys .settings-value'));
      _aceFontManager = new AceFontManager(
          _aceManager, prefs, getUIElement('#changeFont .settings-value'));
    }
  
    void initEditorManager() {
  