// TODO, assume the url is a file path for now.
private void resetConfig() {
    final String configFileUrl = this.bkConfig.getConfigFileUrl();
    final String preferenceFileUrl = this.bkConfig.getPreferenceFileUrl();
    // TODO, assume the url is a file path for now.
    java.nio.file.Path configFile = Paths.get(configFileUrl);
    java.nio.file.Path preferenceFile = Paths.get(preferenceFileUrl);
    try {
      JSONParser parser = new JSONParser();
      JSONObject configJsonObject =
          (JSONObject) parser.parse(this.utils.readFile(configFile));
      JSONObject preferenceJsonObject =
          (JSONObject) parser.parse(this.utils.readFile(preferenceFile));
      String isAllowTracking = mergeBooleanSetting(
          "allow-anonymous-usage-tracking",
          configJsonObject,
          preferenceJsonObject);
      setPreference("allow-anonymous-usage-tracking", isAllowTracking);
      String isUseAdvancedMode = mergeBooleanSetting(
          "advanced-mode",
          configJsonObject,
          preferenceJsonObject);
      setPreference("advanced-mode", isUseAdvancedMode);
      String mergedEditMode = mergeStringSetting(
          "edit-mode",
          configJsonObject,
          preferenceJsonObject);
      setPreference("edit-mode", mergedEditMode);
      this.initPlugins.addAll(
          mergeListSetting("init", configJsonObject, preferenceJsonObject));
      this.controlPanelMenuPlugins.addAll(
          mergeListSetting("control-panel-menu-plugins", configJsonObject, preferenceJsonObject));
      this.menuPlugins.addAll(
          mergeListSetting("notebook-app-menu-plugins", configJsonObject, preferenceJsonObject));
      this.cellMenuPlugins.addAll(
          mergeListSetting("notebook-cell-menu-plugins", configJsonObject, preferenceJsonObject));
    } catch (ParseException e) {
      throw new RuntimeException("failed getting beaker configurations from config file", e);
    }
  }
final String configFileUrl = this.bkConfig.getConfigFileUrl();
final String preferenceFileUrl = this.bkConfig.getPreferenceFileUrl();
// TODO, assume the url is a file path for now.
java.nio.file.Path configFile = Paths.get(configFileUrl);
java.nio.file.Path preferenceFile = Paths.get(preferenceFileUrl);
private void resetConfig() {
final String configFileUrl = this.bkConfig.getConfigFileUrl();
final String preferenceFileUrl = this.bkConfig.getPreferenceFileUrl();
// TODO, assume the url is a file path for now.
java.nio.file.Path configFile = Paths.get(configFileUrl);
java.nio.file.Path preferenceFile = Paths.get(preferenceFileUrl);
try {
JSONParser parser = new JSONParser();
JSONObject configJsonObject =
(JSONObject) parser.parse(this.utils.readFile(configFile));
JSONObject preferenceJsonObject =
(JSONObject) parser.parse(this.utils.readFile(preferenceFile));
String isAllowTracking = mergeBooleanSetting(
"allow-anonymous-usage-tracking",
private void resetConfig() {
final String configFileUrl = this.bkConfig.getConfigFileUrl();
final String preferenceFileUrl = this.bkConfig.getPreferenceFileUrl();
// TODO, assume the url is a file path for now.
java.nio.file.Path configFile = Paths.get(configFileUrl);
java.nio.file.Path preferenceFile = Paths.get(preferenceFileUrl);
try {
JSONParser parser = new JSONParser();
JSONObject configJsonObject =
(JSONObject) parser.parse(this.utils.readFile(configFile));
JSONObject preferenceJsonObject =
(JSONObject) parser.parse(this.utils.readFile(preferenceFile));
String isAllowTracking = mergeBooleanSetting(
"allow-anonymous-usage-tracking",
configJsonObject,
preferenceJsonObject);
setPreference("allow-anonymous-usage-tracking", isAllowTracking);
String isUseAdvancedMode = mergeBooleanSetting(
"advanced-mode",
configJsonObject,
preferenceJsonObject);
setPreference("advanced-mode", isUseAdvancedMode);
String mergedEditMode = mergeStringSetting(
"edit-mode",