void (AnActionButton button) { // allow to delete several certificates at once for (X509Certificate certificate : myTreeBuilder.getSelectedCertificates(true)) { myCertificates.remove(certificate); myTreeBuilder.removeCertificate(certificate); } if (myCertificates.isEmpty()) { showCard(EMPTY_PANEL); } else { myTreeBuilder.selectFirstCertificate(); } }