public class WarningsPreferences {
  static IPreferenceStore store = ContextManager.getDefault().getPreferenceStore();

  public static boolean getPromptForMissingDebugFiles() {
    return store.getBoolean(PreferenceConstants.PROMPT_FOR_MISSING_DEBUG_FILES);
  }

  public static void setPromptForMissingDebugFiles(boolean prompt) {
    store.setValue(PreferenceConstants.PROMPT_FOR_MISSING_DEBUG_FILES, prompt);
  }

  public static boolean getDefaultPromptForMissingDebugFiles() {
    return store.getDefaultBoolean(PreferenceConstants.PROMPT_FOR_MISSING_DEBUG_FILES);
  }

  public static boolean getPromptForMissingDependenciesFiles() {
    return store.getBoolean(PreferenceConstants.POP_FOR_MISSING_VC);
  }

  public static void setPromptForMissingDependenciesFiles(boolean prompt) {
    store.setValue(PreferenceConstants.POP_FOR_MISSING_VC, prompt);
  }

  public static boolean getDefaultPromptForMissingDependenciesFiles() {
    return store.getDefaultBoolean(PreferenceConstants.POP_FOR_MISSING_VC);
  }

  public static Map<String, Boolean> getCodeSignWarnStatus(Map<String, Boolean> statusTable) {
    boolean keyStatus = false;
    for (String key : statusTable.keySet()) {
      keyStatus = store.getBoolean(PreferenceConstants.WARN_ABOUT_CODESIGN_MSG + key);
      statusTable.put(key, Boolean.valueOf(keyStatus));
    }
    return statusTable;
  }

  public static void setCodeSignWarnStatus(Map<String, Boolean> statusTable) {
    for (String key : statusTable.keySet()) {
      store.setValue(
          PreferenceConstants.WARN_ABOUT_CODESIGN_MSG + key, statusTable.get(key).booleanValue());
    }
  }

  public static void setDefaultCodeSignWarnStatus(Map<String, Boolean> statusTable) {
    boolean defaultValue = store.getDefaultBoolean(PreferenceConstants.WARN_ABOUT_CODESIGN_MSG);
    for (String key : statusTable.keySet()) {
      statusTable.put(key, Boolean.valueOf(defaultValue));
    }
  }

  public static boolean getWarnStatus(String keyLabel) {
    return store.getBoolean(PreferenceConstants.WARN_ABOUT_CODESIGN_MSG + keyLabel);
  }

  public static void setWarnStatus(String keyLabel, boolean status) {
    store.setValue(PreferenceConstants.WARN_ABOUT_CODESIGN_MSG + keyLabel, status);
  }
}
 /**
  * Gets the default value for displaying the home screen position field in the BB_App_Descriptor
  * editor.
  *
  * @return the default value for displaying the home screen position (don't show)
  */
 public static Integer getDefaultVisibleHomeScreenPosition() {
   return Integer.valueOf(
       ContextManager.getDefault()
           .getPreferenceStore()
           .getInt(IConstants.VISIBLE_HOMESCREENPOSITION_KEY));
 }
 /**
  * Gets the default value for displaying the clean simulator menu entry
  *
  * @return the default value for displaying the clean simulator menu entry
  */
 public static Integer getDefaultVisibleCleanSimulator() {
   return Integer.valueOf(
       ContextManager.getDefault()
           .getPreferenceStore()
           .getInt(IConstants.VISIBLE_CLEAN_SIMULATOR_KEY));
 }
 /**
  * Gets the default project startup tier.
  *
  * @return the default project startup tier
  */
 public static Integer getDefaultProjectStartupTier() {
   return Integer.valueOf(
       ContextManager.getDefault()
           .getPreferenceStore()
           .getInt(IConstants.PROJECT_STARTUP_TIER_KEY));
 }