.map(node -> new TaxonNodeDto(node)).collect(Collectors.toList());
TaxonNodeDto parentDto = CdmStore.getService(ITaxonNodeService.class).findCommonParentDto(nodeDtos);
UUID taxonUuid = parentDto.getTaxonUuid();
- if(MessagingUtils.confirmDialog(
- "Choose taxon node",
- String.format("Do you want to choose a different taxon for"
- + "the aggregated description than thecommon parent node %s?"
- , parentDto.getTaxonTitleCache()))){
+ int response = MessagingUtils.confirmDialog(
+ "Choose location for the aggregated description",
+ String.format("The aggregated description will be stored at "
+ + "the common parent taxon of this data set:\n%s\n\n"
+ + "Do you want to use this taxon?"
+ , parentDto.getTaxonTitleCache()), "Yes", "Choose taxon", "Cancel");
+ if(response==2){
+ return;
+ }
+ else if(response==1){
Taxon taxon = TaxonSelectionDialog.selectTaxon(getShell(), null);
+ if(taxon==null){
+ return;
+ }
taxonUuid = taxon.getUuid();
}
UpdateResult result = CdmStore.getService(IDescriptionService.class).aggregateDescription(taxonUuid, null, matrix.getDescriptiveDataSet().getUuid());