public @NotNull Set<X509Certificate> getSelectedCertificates(boolean addFromOrganization) {
    Set<X509Certificate> selected = new HashSet<>();
    TreeUtil.collectSelectedUserObjects(myTree).forEach(o -> {
      if (o instanceof CertificateDescriptor) {
        selected.add(((CertificateDescriptor)o).getElement().getCertificate());
      }
      else if (o instanceof OrganizationDescriptor) {
        if (addFromOrganization) {
          selected.addAll(getCertificatesByOrganization(((OrganizationDescriptor)o).getElement()));
        }
      }
      else if (o instanceof RootDescriptor) {
        // nop
      }
      else {
        Logger.getInstance(getClass()).error("Unknown tree node object of type: " + o.getClass().getName());
      }
    });
    return selected;
  }
public @NotNull Set<X509Certificate> getSelectedCertificates(boolean addFromOrganization)