+ if (idMatch.isEmpty() && searchResults == null)
+ {
+ JvOptionPane.showInternalMessageDialog(this,
+ MessageManager.getString("label.finished_searching"), null,
+ JvOptionPane.PLAIN_MESSAGE);
+ }
+ else
+ {
+ if (doFindAll)
+ {
+ // then we report the matches that were found
+ StringBuilder message = new StringBuilder();
+ if (idMatch.size() > 0)
+ {
+ message.append(idMatch.size()).append(" IDs");
+ }
+ if (searchResults != null)
+ {
+ if (idMatch.size() > 0 && searchResults.getCount() > 0)
+ {
+ message.append(" ").append(MessageManager.getString("label.and")
+ .toLowerCase(Locale.ROOT)).append(" ");
+ }
+ message.append(MessageManager.formatMessage(
+ "label.subsequence_matches_found",
+ searchResults.getCount()));
+ }
+ JvOptionPane.showInternalMessageDialog(this, message.toString(),
+ null, JvOptionPane.INFORMATION_MESSAGE);
+ }
+ }
+ }
+
+ /**
+ * Displays an error dialog, and answers false, if the search string is
+ * invalid, else answers true.
+ *
+ * @param searchString
+ * @return
+ */
+ protected boolean isInvalidSearchString(String searchString)
+ {
+ String error = getSearchValidationError(searchString);
+ if (error == null)