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);
    }
  }
private void resetConfig() {
    final String configFileUrl = this.bkConfig.getConfigFileUrl();
    final String preferenceFileUrl = this.bkConfig.getPreferenceFileUrl();
   
    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);
    }
  }
private void resetconfig() { final string configfileurl = this.bkconfig.getconfigfileurl(); final string preferencefileurl = this.bkconfig.getpreferencefileurl(); 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); } }