Ejemplo n.º 1
0
  public static boolean fixErrors(List<DatabaseError> list, ProgressCallbackListener pcl) {
    DriveMap.tryWait();

    pcl.setMax(list.size());
    pcl.reset();

    boolean fullsuccess = true;

    for (int i = 0; i < list.size(); i++) {
      pcl.step();

      DatabaseError error = list.get(i);

      if (!canFix(list, error)) continue;

      boolean succval = error.autoFix();

      if (!succval) {
        CCLog.addWarning(
            LocaleBundle.getFormattedString(
                "CheckDatabaseDialog.Autofix.problem",
                error.getErrorString(),
                error.getElement1Name())); // $NON-NLS-1$
        fullsuccess = false;
      }
    }

    pcl.reset();

    return fullsuccess;
  }