private void updateFileOverwriteIndicator() throws IOException {
    boolean willOverwrite = getMatchesDatabaseTargetFile().exists();
    diffDatabaseFileName.setBackground(willOverwrite ? OVERWRITE_INDICATION_COLOR : NORMAL_COLOR);
    diffDatabaseOverwrite.setEnabled(willOverwrite);

    willOverwrite =
        getExportBinaryTargetFile(ESide.PRIMARY).exists() && !validateExportName(ESide.PRIMARY);
    primaryExportFileName.setBackground(willOverwrite ? OVERWRITE_INDICATION_COLOR : NORMAL_COLOR);
    primaryExportOverwrite.setEnabled(willOverwrite);
    primaryExportOverwrite.setSelected(willOverwrite && primaryExportOverwrite.isSelected());

    willOverwrite =
        getExportBinaryTargetFile(ESide.SECONDARY).exists() && !validateExportName(ESide.SECONDARY);
    secondaryExportFileName.setBackground(
        willOverwrite ? OVERWRITE_INDICATION_COLOR : NORMAL_COLOR);
    secondaryExportOverwrite.setEnabled(willOverwrite);
    secondaryExportOverwrite.setSelected(willOverwrite && secondaryExportOverwrite.isSelected());
  }
Save dialog for function diff views.
java/ui/src/main/java/com/google/security/zynamics/bindiff/gui/dialogs/SaveFunctionDiffViewDialog.java