void (String text) { if (Objects.equals(text, getText())) { return; } super.setText(text); if (text == null) return; switch (myVerboseLevel) { case 0 -> { } case 1 -> { String prefix = getPrefix(text); if (prefix.equals(lastPrefix)) { reportMessageNoLineBreak(1, "."); } else { lastPrefix = prefix; reportMessage(1, ""); reportMessage(1, prefix); } } case 2 -> reportMessage(2, text); case 3 -> { int percent = (int)(getFraction() * 100); if (!isIndeterminate() && getFraction() > 0 && myLastPercent != percent && nestingLevel == 0) { // do not print duplicate "processing xx%" // do not print nested excessively verbose "Searching for this symbol.... done" myLastPercent = percent; String msg = getPrefix(text) + " " + percent + "%"; reportMessage(2, msg); } } } }