Project

General

Profile

« Previous | Next » 

Revision 97ed6049

Added by Patrick Plitzner almost 6 years ago

ref #7509 Enhance aggregation dialog

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/matrix/CharacterMatrixBottomToolbar.java
137 137
                        .map(node -> new TaxonNodeDto(node)).collect(Collectors.toList());
138 138
                TaxonNodeDto parentDto = CdmStore.getService(ITaxonNodeService.class).findCommonParentDto(nodeDtos);
139 139
                UUID taxonUuid = parentDto.getTaxonUuid();
140
                if(MessagingUtils.confirmDialog(
141
                        "Choose taxon node",
142
                        String.format("Do you want to choose a different taxon for"
143
                                + "the aggregated description than thecommon parent node %s?"
144
                                , parentDto.getTaxonTitleCache()))){
140
                int response = MessagingUtils.confirmDialog(
141
                        "Choose location for the aggregated description",
142
                        String.format("The aggregated description will be stored at "
143
                                + "the common parent taxon of this data set:\n%s\n\n"
144
                                + "Do you want to use this taxon?"
145
                                , parentDto.getTaxonTitleCache()), "Yes", "Choose taxon", "Cancel");
146
                if(response==2){
147
                    return;
148
                }
149
                else if(response==1){
145 150
                    Taxon taxon = TaxonSelectionDialog.selectTaxon(getShell(), null);
151
                    if(taxon==null){
152
                        return;
153
                    }
146 154
                    taxonUuid = taxon.getUuid();
147 155
                }
148 156
                UpdateResult result = CdmStore.getService(IDescriptionService.class).aggregateDescription(taxonUuid, null, matrix.getDescriptiveDataSet().getUuid());

Also available in: Unified diff