String () { int totalUnresolved = 0; int alreadyApplied = 0; int notApplied = 0; for (ApplyPatchChange change : myPatchChanges) { if (change.isResolved()) continue; totalUnresolved++; switch (change.getStatus()) { case ALREADY_APPLIED -> alreadyApplied++; case NOT_APPLIED -> notApplied++; case EXACTLY_APPLIED -> { } } } if (totalUnresolved == 0) { return DiffBundle.message("apply.somehow.status.message.all.applied", notApplied); } if (totalUnresolved == notApplied) { return DiffBundle.message("apply.somehow.status.message.cant.apply", notApplied); } else { String message = DiffBundle.message("apply.somehow.status.message.cant.apply.some", notApplied, totalUnresolved); if (alreadyApplied == 0) return message; return message + ". " + DiffBundle.message("apply.somehow.status.message.already.applied", alreadyApplied); } }